摘要: public static string GetChineseDate(DateTime dateTime,bool usingOldFont=true) { string resultString = ""; resultString += GetChineseDate2(dateTime.Year, 1, usingOldFont) + "年" + GetChineseDate2(dateTime.Month, 2, usingOldFont) + "月" + GetChineseDate2(dateTime.Day... 阅读全文
posted @ 2012-02-03 18:10 南阳·源 阅读(474) 评论(0) 推荐(0) 编辑
摘要: http://www.planeart.cn/demo/artDialog/ 阅读全文
posted @ 2012-02-03 16:21 南阳·源 阅读(411) 评论(2) 推荐(0) 编辑
摘要: 定义过滤类:public class TestFilter : ActionFilterAttribute { /// /// 行为执行前 /// /// public override void OnActionExecuting(ActionExecutingContext filterContext) { //ToDoing if (filterContext.ActionDescriptor.ActionName.ToLower() == "tes... 阅读全文
posted @ 2012-02-03 16:17 南阳·源 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 在添加多个Area时,如添加:AreaTest ,需求修改AreaTestAreaRegistration.csView Code public class AreaTestAreaRegistration : AreaRegistration { public override string AreaName { get { return "AreaTest"; } } public override void RegisterArea... 阅读全文
posted @ 2012-02-03 16:07 南阳·源 阅读(998) 评论(2) 推荐(0) 编辑
摘要: View Code public class JsonHelper { /// <summary> /// 生成Json格式 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="obj"></param> /// <returns></returns> public static string GetJson<T>(T obj) { DataContractJso 阅读全文
posted @ 2012-02-03 15:48 南阳·源 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 在使用Web Service/WCF获取一组对象集合时,这时必须对返回的对象进行序列化.View Code public class SerializerHelper { /// <summary> /// 反序列化对象 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="dataString"></param> /// <param name="compress"> 阅读全文
posted @ 2012-02-03 15:43 南阳·源 阅读(369) 评论(0) 推荐(0) 编辑
摘要: public class Enum2 { public Dictionary<string, int> GetEnumItems<T>() { Dictionary<string, int> dicResult = new Dictionary<string, int>(); T obj = default(T); Type type = obj.GetType(); foreach (string s in type.GetEnumNames()) ... 阅读全文
posted @ 2012-02-03 15:01 南阳·源 阅读(411) 评论(0) 推荐(0) 编辑