/// <summary> /// Maps the values from each row in the file to a class in the enumerable. /// </summary> /// <param name="mapObject">The map object.</param> /// <param name="rowIndex">Index of the row.</param> /// <param name="row">The row coming in from the file. A Dynamic object, with a property per column</param> /// <param name="validator">The validator.</param> /// <param name="errors">The errors.</param> public static void Company_FileMapper(ref Company mapObject, int rowIndex, dynamic row, IObjectValidator validator, ref List <string> errors) { mapObject.CompanyId = validator.GetRowValue <int>(row, "CompanyId", ref errors); mapObject.StartDate = validator.GetRowValue <DateTime>(row, "StartDate", ref errors); mapObject.EndDate = validator.GetRowValue <DateTime>(row, "EndDate", ref errors, isNullable: true); mapObject.LegalName = row.LegalName; mapObject.DBAName = row.DBAName; mapObject.ChangeDate = validator.GetRowValue <DateTime>(row, "ChangeDate", ref errors); mapObject.UserId = row.UserId; }
public void MapValues(int rowIndex, dynamic row, IObjectValidator validator, ref List <string> errors) { this.L2SSN = row.L2SSN; this.L1Name = row.L1Name; this.L15Jan = validator.GetRowValue <int>(row, "L15Jan", ref errors); this.L15June = validator.GetRowValue <int>(row, "L15June", ref errors); this.Blah = row.L15All12Months; this.Blah1 = row.L14All12Months; this.Blah2 = row.L16All12Months; }
/// <summary> /// Maps the values. /// </summary> /// <param name="rowIndex">Index of the row.</param> /// <param name="row">The row.</param> /// <param name="validator">The validator.</param> /// <param name="errors">The errors.</param> public void MapValues(int rowIndex, dynamic row, IObjectValidator validator, ref List <string> errors) { this.CompanyId = validator.GetRowValue <int>(row, "CompanyId", ref errors); this.StartDate = validator.GetRowValue <DateTime>(row, "StartDate", ref errors); this.EndDate = validator.GetRowValue <DateTime>(row, "EndDate", ref errors, isNullable: true); this.LegalName = row.LegalName; this.DBAName = row.DBAName; this.ChangeDate = validator.GetRowValue <DateTime>(row, "ChangeDate", ref errors); this.UserId = row.UserId; }
public void MapValues(int rowIndex, dynamic row, IObjectValidator validator, ref List <string> errors) { this.L2EmployeeSSN = row.L2EmployeeSSN; this.aName = row.aName; this.bSSN = row.bSSN; this.cDOB = validator.GetRowValue <DateTime>(row, "cDob", ref errors); }