/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcseccustprodlookupresults(ref DataRow row, Icseccustprodlookupresults entity) { row.SetField("altprod", entity.altprod); row.SetField("custno", entity.custno); row.SetField("shipto", entity.shipto); row.SetField("prod", entity.prod); row.SetField("rectype", entity.rectype); row.SetField("keyno", entity.keyno); row.SetField("icsecrowid", entity.icsecrowid.ToByteArray()); row.SetField("altproddesc", entity.altproddesc); row.SetField("altprodnotesfl", entity.altprodnotesfl); row.SetField("userfield", entity.userfield); }
public static Icseccustprodlookupresults BuildIcseccustprodlookupresultsFromRow(DataRow row) { Icseccustprodlookupresults entity = new Icseccustprodlookupresults(); entity.altprod = row.IsNull("altprod") ? string.Empty : row.Field <string>("altprod"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.shipto = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.rectype = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype"); entity.keyno = row.IsNull("keyno") ? decimal.Zero : row.Field <decimal>("keyno"); entity.icsecrowid = row.Field <byte[]>("icsecrowid").ToStringEncoded(); entity.altproddesc = row.IsNull("altproddesc") ? string.Empty : row.Field <string>("altproddesc"); entity.altprodnotesfl = row.IsNull("altprodnotesfl") ? string.Empty : row.Field <string>("altprodnotesfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }