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); } }
public static ImportExportItem GetProductData(IList <string> rowData, IList <string> columnNames) { ImportExportItem entity = (ImportExportItem)Activator.CreateInstance(typeof(ImportExportItem)); GetValue(entity, rowData, columnNames); return(entity); }