/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromEdsvsearchresults(ref DataRow row, Edsvsearchresults entity) { row.SetField("contractno", entity.contractno); row.SetField("custno", entity.custno); row.SetField("customernotes", entity.customernotes); row.SetField("custrebty", entity.custrebty); row.SetField("custtype", entity.custtype); row.SetField("keyindex", entity.keyindex); row.SetField("operinit", entity.operinit); row.SetField("rowpointer", entity.rowpointer); row.SetField("shipto", entity.shipto); row.SetField("shiptonotes", entity.shiptonotes); row.SetField("transdt", entity.transdt); row.SetField("transproc", entity.transproc); row.SetField("transtm", entity.transtm); row.SetField("typecd", entity.typecd); row.SetField("user1", entity.user1); row.SetField("user2", entity.user2); row.SetField("user3", entity.user3); row.SetField("user4", entity.user4); row.SetField("user5", entity.user5); row.SetField("user6", entity.user6); row.SetField("user7", entity.user7); row.SetField("user8", entity.user8); row.SetField("user9", entity.user9); row.SetField("vendno", entity.vendno); row.SetField("vendornotes", entity.vendornotes); row.SetField("vendorid", entity.vendorid); row.SetField("whse", entity.whse); row.SetField("wordindexfl", entity.wordindexfl); row.SetField("rowid-edsv", entity.rowidEdsv.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Edsvsearchresults BuildEdsvsearchresultsFromRow(DataRow row) { Edsvsearchresults entity = new Edsvsearchresults(); entity.contractno = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.customernotes = row.IsNull("customernotes") ? string.Empty : row.Field <string>("customernotes"); entity.custrebty = row.IsNull("custrebty") ? string.Empty : row.Field <string>("custrebty"); entity.custtype = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype"); entity.keyindex = row.IsNull("keyindex") ? string.Empty : row.Field <string>("keyindex"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.rowpointer = row.IsNull("rowpointer") ? string.Empty : row.Field <string>("rowpointer"); entity.shipto = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto"); entity.shiptonotes = row.IsNull("shiptonotes") ? string.Empty : row.Field <string>("shiptonotes"); entity.transdt = row.Field <DateTime?>("transdt"); entity.transproc = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc"); entity.transtm = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm"); entity.typecd = row.IsNull("typecd") ? string.Empty : row.Field <string>("typecd"); entity.user1 = row.IsNull("user1") ? string.Empty : row.Field <string>("user1"); entity.user2 = row.IsNull("user2") ? string.Empty : row.Field <string>("user2"); entity.user3 = row.IsNull("user3") ? string.Empty : row.Field <string>("user3"); entity.user4 = row.IsNull("user4") ? string.Empty : row.Field <string>("user4"); entity.user5 = row.IsNull("user5") ? string.Empty : row.Field <string>("user5"); entity.user6 = row.Field <decimal?>("user6"); entity.user7 = row.Field <decimal?>("user7"); entity.user8 = row.Field <DateTime?>("user8"); entity.user9 = row.Field <DateTime?>("user9"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendornotes = row.IsNull("vendornotes") ? string.Empty : row.Field <string>("vendornotes"); entity.vendorid = row.IsNull("vendorid") ? string.Empty : row.Field <string>("vendorid"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.wordindexfl = row.Field <bool>("wordindexfl"); entity.rowidEdsv = row.Field <byte[]>("rowid-edsv").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }