Exemple #1
0
 public static void Coppy(TEntity source, TEntity desc)
 {
     foreach (var item in typeof(TEntity).GetProperties())
     {
         if (CreateExcelFile.CheckType(item.PropertyType) && item.CanWrite && item.CanRead)
         {
             item.SetValue(desc, item.GetValue(source, null), null);
         }
     }
 }
Exemple #2
0
 public static void GetValue(TEntity data, IList <string> rowData, IList <string> columnNames)
 {
     foreach (var item in typeof(TEntity).GetProperties())
     {
         if (CreateExcelFile.CheckType(item.PropertyType))
         {
             item.SetValue(data, ConvertType(item.PropertyType, rowData[columnNames.IndexOf(item.Name.ToLower())]), null);
         }
         //MaMayIn = Convert.ToInt32(),
     }
 }