ruder

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

2009年5月20日

摘要: 原字符串:<div id=s class="s">5<a>s</a><div id=u>sdf</div>sdf<div>sdf<div>sdf</div>sdf</div>sdf</div></div>目的:在这个字符串中打出ID为S的DIV标签的outerHTML... 阅读全文
posted @ 2009-05-20 10:50 徐境 阅读(2830) 评论(3) 推荐(0)

2009年4月29日

摘要: public static void DeleteS(T obj) { try { Delete(obj); } catch { MakeSureExistTableAndColumn... 阅读全文
posted @ 2009-04-29 17:48 徐境 阅读(136) 评论(0) 推荐(0)

摘要: public static void StoreS(T obj) { try { Store(obj); } catch { MakeSureExistTableAndColumns(); ... 阅读全文
posted @ 2009-04-29 17:47 徐境 阅读(97) 评论(0) 推荐(0)

摘要: public static List GetS(string formatStr, params object[] objs) { try { return Get(formatStr,objs); } catch ... 阅读全文
posted @ 2009-04-29 17:47 徐境 阅读(139) 评论(0) 推荐(0)

摘要: public static List GetS(string where) { try { return Get(where); } catch { MakeSureExistTableAndC... 阅读全文
posted @ 2009-04-29 17:46 徐境 阅读(121) 评论(0) 推荐(0)

摘要: #region 确定栏位存在 text.AppendLine("if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[" + CurrentType.Name + @"]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)"); ... 阅读全文
posted @ 2009-04-29 17:43 徐境 阅读(156) 评论(0) 推荐(0)

摘要: public static void MakeSureExistTableAndColumns() { StringBuilder text = new StringBuilder(); #region 如果表不存在 text.AppendLine("if not exists (selec... 阅读全文
posted @ 2009-04-29 17:43 徐境 阅读(160) 评论(0) 推荐(0)

摘要: protected static object GetValueByType(PropertyInfo info,T obj) { if (info.PropertyType.Name == "DateTime" && Convert.ToDateTime(info.GetValue(obj, null))==DateTime.MinValue) ... 阅读全文
posted @ 2009-04-29 17:41 徐境 阅读(141) 评论(0) 推荐(0)

摘要: protected static object GetValueByType(PropertyInfo info, object obj) { object newObj = null; switch (info.PropertyType.Name.ToLower()) { ... 阅读全文
posted @ 2009-04-29 17:41 徐境 阅读(199) 评论(0) 推荐(0)

摘要: protected static string GetSqlType(PropertyInfo info) { string type = String.Empty; switch (info.PropertyType.Name.ToLower()) { ... 阅读全文
posted @ 2009-04-29 17:36 徐境 阅读(173) 评论(0) 推荐(0)