摘要: public class ModelHelper <T> where T : new() { public static T ConvertModel(DataRow dr) { T t = new T(); Type modelType = t.GetType(); foreach (PropertyInfo p in modelType.GetProperties()) { p.SetValue(t, GetDefaultValue(dr[p.Name], p.PropertyType), null); } ... 阅读全文
posted @ 2013-02-22 22:06 赤狐(zcm123) 阅读(194) 评论(0) 推荐(0) 编辑