摘要:
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... 阅读全文
摘要:
http://www.planeart.cn/demo/artDialog/ 阅读全文
摘要:
定义过滤类:public class TestFilter : ActionFilterAttribute { /// /// 行为执行前 /// /// public override void OnActionExecuting(ActionExecutingContext filterContext) { //ToDoing if (filterContext.ActionDescriptor.ActionName.ToLower() == "tes... 阅读全文
摘要:
在添加多个Area时,如添加:AreaTest ,需求修改AreaTestAreaRegistration.csView Code public class AreaTestAreaRegistration : AreaRegistration { public override string AreaName { get { return "AreaTest"; } } public override void RegisterArea... 阅读全文
摘要:
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 阅读全文
摘要:
在使用Web Service/WCF获取一组对象集合时,这时必须对返回的对象进行序列化.View Code public class SerializerHelper { /// <summary> /// 反序列化对象 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="dataString"></param> /// <param name="compress"> 阅读全文
摘要:
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()) ... 阅读全文