上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页
摘要: 1 //必须打开连接,用于事务的创建 2 if (db.Connection.State == ConnectionState.Closed) db.Connection.Open(); 3 using (DbTransaction dbtran = db.Connection.BeginTrans 阅读全文
posted @ 2022-08-27 14:17 极客船长 阅读(7) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 验证是否有效的手机号码 /// </summary> /// <param name="mobilePhone"></param> /// <returns></returns> public static bool IsValidMobilePhone(stri 阅读全文
posted @ 2022-08-27 11:21 极客船长 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 1 /// <summary> 2 /// 验证邮箱格式 3 /// </summary> 4 /// <param name="email"></param> 5 /// <returns></returns> 6 public static bool IsValidEmail(string em 阅读全文
posted @ 2022-08-27 11:17 极客船长 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 在使用 Convert.ChangeType(value,type)对值value进行动态转换时,如type是可空类型,会导致抛出如下异常: changetype 从“System.Int32”到“System.Nullable`1[[System.Int32, mscorlib 1 if (typ 阅读全文
posted @ 2022-08-25 10:30 极客船长 阅读(213) 评论(0) 推荐(0) 编辑
摘要: SELECT stuff( (SELECT ',' +CAST(BigMidO2OCategroyId as varchar(10)) FROM TenantIndustryData WHERE TenantDataID = 10000 FOR xml path('')), 1, 1, '' )AS 阅读全文
posted @ 2022-08-24 14:44 极客船长 阅读(112) 评论(0) 推荐(0) 编辑
摘要: public static List<T> TableToListModel<T>(DataTable dt) where T : new() { // 定义集合 List<T> ts = new List<T>(); // 获得此模型的类型 Type type = typeof(T); strin 阅读全文
posted @ 2022-08-17 13:36 极客船长 阅读(220) 评论(0) 推荐(0) 编辑
摘要: var converter = new HtmlConverter(); string html = string.Format("<html><meta http-equiv='content-type' content='text/html; charset=utf-8'><div style= 阅读全文
posted @ 2022-08-16 10:11 极客船长 阅读(300) 评论(0) 推荐(0) 编辑
摘要: http://pic.sogou.com/napi/pc/searchList?mode=21&start=1&xml_len=100&query=" + keyword 阅读全文
posted @ 2022-08-16 10:09 极客船长 阅读(89) 评论(0) 推荐(0) 编辑
摘要: public static void getRank() { var personFaker = new Faker<RandomUA>() .RuleFor(x => x.userAgent, x => x.Internet.UserAgent()); bool hasFound = false; 阅读全文
posted @ 2022-08-16 10:07 极客船长 阅读(167) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 宽带连接,成功返回true,失败返回 false /// </summary> /// <param name="PPPOEname">宽带连接名称</param> /// <param name="username">宽带账号</param> /// <para 阅读全文
posted @ 2022-08-16 10:03 极客船长 阅读(53) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页