/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPderclookupresults(ref DataRow row, Pderclookupresults entity) { row.SetField("claimno", entity.claimno); row.SetField("vendno", entity.vendno); row.SetField("vendnotes", entity.vendnotes); row.SetField("statustype", entity.statustype); row.SetField("claimDate", entity.claimDate); row.SetField("claimAmount", entity.claimAmount); row.SetField("claimType", entity.claimType); row.SetField("currencyty", entity.currencyty); row.SetField("userfield", entity.userfield); }
public static Pderclookupresults BuildPderclookupresultsFromRow(DataRow row) { Pderclookupresults entity = new Pderclookupresults(); entity.claimno = row.IsNull("claimno") ? 0 : row.Field <int>("claimno"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendnotes = row.IsNull("vendnotes") ? string.Empty : row.Field <string>("vendnotes"); entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype"); entity.claimDate = row.Field <DateTime?>("claimDate"); entity.claimAmount = row.IsNull("claimAmount") ? decimal.Zero : row.Field <decimal>("claimAmount"); entity.claimType = row.IsNull("claimType") ? string.Empty : row.Field <string>("claimType"); entity.currencyty = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }