随笔分类 -  asp.net

把URL传递参数转变成自定义实体方法
摘要:先定义下要获取的实体: public class InputClass { public long Id { get; set; } public int Status { get; set; } public DateTime UdpateTime... 阅读全文

posted @ 2015-05-28 22:40 Karson007 阅读(990) 评论(0) 推荐(0)

【转载】C#后台声明式验证,远离if验证
摘要:ViewModel public class ViewModel { [Required(ErrorMessage="标题不能为空")] public string Title { get; set; } public string Name { ge... 阅读全文

posted @ 2015-05-26 22:12 Karson007 阅读(182) 评论(0) 推荐(0)

N个数随机相加得出固定值的排列组合
摘要:static double[] iArr = new double[10] { 1,2,3,4,5,6,7,8,9,10 }; static Stack stack = new Stack(); static double tempNum = 0; ... 阅读全文

posted @ 2015-01-15 16:39 Karson007 阅读(932) 评论(0) 推荐(0)

ChineseCalender类
摘要:using System;using System.Collections.Generic;using System.Text;namespace ChineseCalender{ #region ChineseCalendarException /// <summary> /// 中国日历异常处理 /// </summary> public class ChineseCalendarException : System.Exception { public ChineseCalendarException(string msg) ... 阅读全文

posted @ 2013-05-02 12:36 Karson007 阅读(317) 评论(0) 推荐(0)