/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeipcreatequotesprod(ref DataRow row, Oeipcreatequotesprod entity) { row.SetField("custno", entity.custno); row.SetField("shipto", entity.shipto); row.SetField("prod", entity.prod); row.SetField("whse", entity.whse); row.SetField("seqno", entity.seqno); row.SetField("qtyord", entity.qtyord); row.SetField("unit", entity.unit); row.SetField("price", entity.price); row.SetField("discamt", entity.discamt); row.SetField("disctype", entity.disctype); row.SetField("discfl", entity.discfl); row.SetField("origincd", entity.origincd); row.SetField("createfromcat", entity.createfromcat); row.SetField("prodtype", entity.prodtype); row.SetField("countryoforigin", entity.countryoforigin); row.SetField("tariffcd", entity.tariffcd); row.SetField("statustype", entity.statustype); row.SetField("userfield", entity.userfield); }
public static Oeipcreatequotesprod BuildOeipcreatequotesprodFromRow(DataRow row) { Oeipcreatequotesprod entity = new Oeipcreatequotesprod(); 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.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.price = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price"); entity.discamt = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt"); entity.disctype = row.Field <bool>("disctype"); entity.discfl = row.Field <bool>("discfl"); entity.origincd = row.IsNull("origincd") ? string.Empty : row.Field <string>("origincd"); entity.createfromcat = row.Field <bool>("createfromcat"); entity.prodtype = row.IsNull("prodtype") ? string.Empty : row.Field <string>("prodtype"); entity.countryoforigin = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin"); entity.tariffcd = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd"); entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }