Exemplo n.º 1
0
 public static void GetValue(ImportExportItem data, IList <string> rowData, IList <string> columnNames)
 {
     foreach (var item in typeof(ImportExportItem).GetProperties())
     {
         item.SetValue(data, ConvertType(item.PropertyType, rowData[columnNames.IndexOf(item.Name.ToLower())]), null);
     }
 }
 public static void GetValue(ImportExportItem data, IList<string> rowData, IList<string> columnNames)
 {
     foreach (var item in typeof(ImportExportItem).GetProperties())
     {
         item.SetValue(data, ConvertType(item.PropertyType, rowData[columnNames.IndexOf(item.Name.ToLower())]), null);
     }
 }
Exemplo n.º 3
0
        public static ImportExportItem GetProductData(IList <string> rowData, IList <string> columnNames)
        {
            ImportExportItem entity = (ImportExportItem)Activator.CreateInstance(typeof(ImportExportItem));

            GetValue(entity, rowData, columnNames);
            return(entity);
        }