摘要: public static class QRcodeUtils { private static string QrSaveUrl = "/img/QRcodeFile/"; /// <summary> ///生成二维码 /// </summary> /// <param name="QrConte 阅读全文
posted @ 2018-07-06 16:00 GU天乐乐乐! 阅读(216) 评论(1) 推荐(0)
摘要: public static class EncryptUtils { /// <summary> /// 解析二次加密后的token /// </summary> /// <param name="token"></param> /// <param name="userId">返回解密后的User 阅读全文
posted @ 2018-07-06 15:58 GU天乐乐乐! 阅读(160) 评论(1) 推荐(0)
摘要: /// Table转换成实体 public static T ToEntity<T>(this DataTable table) where T : class, new() { if (table == null || table.Rows == null || table.Rows.Count 阅读全文
posted @ 2018-07-06 15:56 GU天乐乐乐! 阅读(324) 评论(1) 推荐(0)
摘要: /// Cookie帮助类 public class CookieUtils { /// 写cookie值 public static void WriteCookie(string strName, string strValue) { HttpCookie cookie = HttpContex 阅读全文
posted @ 2018-07-06 15:54 GU天乐乐乐! 阅读(173) 评论(1) 推荐(0)
摘要: /// <summary> /// 数据类型转换 /// </summary> /// <typeparam name="T">类型</typeparam> /// <param name="value">源数据</param> /// <param name="defaultValue">默认值< 阅读全文
posted @ 2018-07-06 15:53 GU天乐乐乐! 阅读(421) 评论(1) 推荐(0)
摘要: /// <summary> /// 截取字符串 /// </summary> /// <param name="text">需要截取的字符串</param> /// <param name="maxLength">长度</param> /// <param name="ishaspoint">是否需 阅读全文
posted @ 2018-07-06 15:48 GU天乐乐乐! 阅读(294) 评论(1) 推荐(0)
摘要: #region 根据ip获取地点 /// 获取Ip归属地 /// </summary> /// <param name="ip">ip</param> /// <returns>归属地</returns> public static string GetIpAddress(string ip) { 阅读全文
posted @ 2018-07-06 15:44 GU天乐乐乐! 阅读(590) 评论(1) 推荐(0)
摘要: #region 生成随机字符 /// <summary> /// 生成随机字符 /// </summary> /// <param name="iLength">生成字符串的长度</param> /// <returns>返回随机字符串</returns> public static string 阅读全文
posted @ 2018-07-06 15:43 GU天乐乐乐! 阅读(409) 评论(1) 推荐(0)
摘要: /// <summary> /// unix时间转换为datetime /// </summary> /// <param name="timeStamp"></param> /// <returns></returns> public static DateTime UnixTimeToTime( 阅读全文
posted @ 2018-07-06 15:39 GU天乐乐乐! 阅读(2682) 评论(3) 推荐(0)
摘要: public static bool HasChinese(string str) { return Regex.IsMatch(str, @"[\u4e00-\u9fa5]"); } 阅读全文
posted @ 2018-07-06 15:35 GU天乐乐乐! 阅读(263) 评论(2) 推荐(1)
摘要: public static string Secretkey() { var Secretkey = Guid.NewGuid().ToString("N") .Remove(25, 1) .Remove(23, 1) .Remove(20, 1) .Remove(18, 1) .Remove(15 阅读全文
posted @ 2018-07-06 15:33 GU天乐乐乐! 阅读(314) 评论(5) 推荐(0)
摘要: /// <summary> /// 计算某一年 某一周 的起始时间和结束时间 /// </summary> /// <param name="year"></param> /// <param name="week"></param> /// <param name="first"></param> 阅读全文
posted @ 2018-07-06 15:24 GU天乐乐乐! 阅读(990) 评论(2) 推荐(0)