摘要: /// /// 生成验证码的类 /// public class ValidateCode { public ValidateCode() { } /// /// 验证码的最大长度 /// public int MaxLength ... 阅读全文
posted @ 2019-06-26 10:00 kuleft 阅读(555) 评论(0) 推荐(0) 编辑
摘要: public class StringChange { /// /// 生成Token值 /// /// static public string GetToken() { return Guid.NewGuid().ToString("N"); ... 阅读全文
posted @ 2019-06-26 09:59 kuleft 阅读(491) 评论(0) 推荐(0) 编辑
摘要: public class JsonHelper { /// /// List转成json /// /// /// /// /// public static string ListToJson(IL... 阅读全文
posted @ 2019-06-26 09:58 kuleft 阅读(182) 评论(0) 推荐(0) 编辑
摘要: public class HttpHelper { /// /// 指定Post地址使用Get 方式获取全部字符串 /// /// 请求后台地址 /// public static string HttpPost(string url, Dictionary ... 阅读全文
posted @ 2019-06-26 09:57 kuleft 阅读(791) 评论(0) 推荐(0) 编辑
摘要: public class DoCookie { /// /// 写入cookie值 /// /// cookie名称 /// cookie值 /// 有效期(单位:天) /// 是否设置成功 public static bool setCookie(str... 阅读全文
posted @ 2019-06-26 09:56 kuleft 阅读(495) 评论(0) 推荐(0) 编辑
摘要: public class DoCatch { /// /// 获取当前应用程序指定CacheKey的Cache对象值 /// /// 索引键值 /// 返回缓存对象 public static object GetCache(string CacheKey) { ... 阅读全文
posted @ 2019-06-26 09:55 kuleft 阅读(307) 评论(0) 推荐(0) 编辑
摘要: public partial class CommonCURD where T : class { //DbContext context = new HMOAContainer(); GdWorldDb context = new GdWorldDb(); //增加 public int Add(T userInfo) ... 阅读全文
posted @ 2019-06-26 09:54 kuleft 阅读(209) 评论(0) 推荐(0) 编辑
摘要: public class ModelToDTO { /// /// 根据模型对象获取扁平类对象 /// /// 模型类 /// 传输类 /// 模型类对象 /// 传输类对象 /// public static T GetDTOModel(... 阅读全文
posted @ 2019-06-26 09:52 kuleft 阅读(371) 评论(0) 推荐(0) 编辑
摘要: //检查登录 public class CheckLoginFilter : IAuthorizationFilter { public void OnAuthorization(AuthorizationContext filterContext) { //不验证属性则只需取值 if (filt... 阅读全文
posted @ 2019-06-26 09:50 kuleft 阅读(380) 评论(0) 推荐(0) 编辑