/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdspcustprodloadresults(ref DataRow row, Pdspcustprodloadresults entity) { row.SetField("pdrecno", entity.pdrecno); row.SetField("clevelcd", entity.clevelcd); row.SetField("custno", entity.custno); row.SetField("customerName", entity.customerName); row.SetField("custprcty", entity.custprcty); row.SetField("custprctyDesc", entity.custprctyDesc); row.SetField("shipto", entity.shipto); row.SetField("shiptoName", entity.shiptoName); row.SetField("vendno", entity.vendno); row.SetField("vendorName", entity.vendorName); row.SetField("prod", entity.prod); row.SetField("prodDesc", entity.prodDesc); row.SetField("units", entity.units); row.SetField("prodprcty", entity.prodprcty); row.SetField("prodprctyDesc", entity.prodprctyDesc); row.SetField("rebatety", entity.rebatety); row.SetField("rebatetyDesc", entity.rebatetyDesc); row.SetField("rebsubty", entity.rebsubty); row.SetField("rebsubtyDesc", entity.rebsubtyDesc); row.SetField("prodline", entity.prodline); row.SetField("prodlineDesc", entity.prodlineDesc); row.SetField("prodcat", entity.prodcat); row.SetField("prodcatDesc", entity.prodcatDesc); row.SetField("whse", entity.whse); row.SetField("whseName", entity.whseName); row.SetField("region", entity.region); row.SetField("startdt", entity.startdt); row.SetField("enddt", entity.enddt); row.SetField("statustype", entity.statustype); row.SetField("refer", entity.refer); row.SetField("promofl", entity.promofl); row.SetField("jobno", entity.jobno); row.SetField("quoteno", entity.quoteno); row.SetField("termsdiscfl", entity.termsdiscfl); row.SetField("termspct", entity.termspct); row.SetField("commtype", entity.commtype); row.SetField("prctyperb", entity.prctyperb); row.SetField("prctype", entity.prctype); row.SetField("pricesheet", entity.pricesheet); row.SetField("priceeffectivedate", entity.priceeffectivedate); row.SetField("prcontyli", entity.prcontyli); row.SetField("prcontypd", entity.prcontypd); row.SetField("prcontyshli", entity.prcontyshli); row.SetField("prcontyshpd", entity.prcontyshpd); row.SetField("priceonty", entity.priceonty); row.SetField("qtytyli", entity.qtytyli); row.SetField("qtytypd", entity.qtytypd); row.SetField("qtytype", entity.qtytype); row.SetField("qtybrktyli", entity.qtybrktyli); row.SetField("qtybrktypd", entity.qtybrktypd); row.SetField("qtybreakty", entity.qtybreakty); row.SetField("contractno", entity.contractno); row.SetField("modifiernm", entity.modifiernm); row.SetField("modifierrebfl", entity.modifierrebfl); row.SetField("minqty", entity.minqty); row.SetField("maxqty", entity.maxqty); row.SetField("actqty", entity.actqty); row.SetField("maxqtytyli", entity.maxqtytyli); row.SetField("maxqtytypd", entity.maxqtytypd); row.SetField("maxqtytype", entity.maxqtytype); row.SetField("hardmaxqtyfl", entity.hardmaxqtyfl); row.SetField("hardpricefl", entity.hardpricefl); row.SetField("proundli", entity.proundli); row.SetField("proundpd", entity.proundpd); row.SetField("pround", entity.pround); row.SetField("ptargetli", entity.ptargetli); row.SetField("ptargetpd", entity.ptargetpd); row.SetField("ptarget", entity.ptarget); row.SetField("pexactrnd", entity.pexactrnd); row.SetField("lastuseddt", entity.lastuseddt); row.SetField("lastuseddtenabled", entity.lastuseddtenabled); row.SetField("ovrridepctup", entity.ovrridepctup); row.SetField("ovrridepctdown", entity.ovrridepctdown); row.SetField("produnit", entity.produnit); row.SetField("produnitfl", entity.produnitfl); row.SetField("baseprice", entity.baseprice); row.SetField("basepricefl", entity.basepricefl); row.SetField("listprice", entity.listprice); row.SetField("listpricefl", entity.listpricefl); row.SetField("icswcost", entity.icswcost); row.SetField("icswcostfl", entity.icswcostfl); row.SetField("prcmult1", entity.prcmult1); row.SetField("prcmult2", entity.prcmult2); row.SetField("prcmult3", entity.prcmult3); row.SetField("prcmult4", entity.prcmult4); row.SetField("prcmult5", entity.prcmult5); row.SetField("prcmult6", entity.prcmult6); row.SetField("prcmult7", entity.prcmult7); row.SetField("prcmult8", entity.prcmult8); row.SetField("prcmult9", entity.prcmult9); row.SetField("qtybrk1", entity.qtybrk1); row.SetField("qtybrk2", entity.qtybrk2); row.SetField("qtybrk3", entity.qtybrk3); row.SetField("qtybrk4", entity.qtybrk4); row.SetField("qtybrk5", entity.qtybrk5); row.SetField("qtybrk6", entity.qtybrk6); row.SetField("qtybrk7", entity.qtybrk7); row.SetField("qtybrk8", entity.qtybrk8); row.SetField("prcdisc1", entity.prcdisc1); row.SetField("prcdisc2", entity.prcdisc2); row.SetField("prcdisc3", entity.prcdisc3); row.SetField("prcdisc4", entity.prcdisc4); row.SetField("prcdisc5", entity.prcdisc5); row.SetField("prcdisc6", entity.prcdisc6); row.SetField("prcdisc7", entity.prcdisc7); row.SetField("prcdisc8", entity.prcdisc8); row.SetField("prcdisc9", entity.prcdisc9); 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("userfield", entity.userfield); }
public static Pdspcustprodloadresults BuildPdspcustprodloadresultsFromRow(DataRow row) { Pdspcustprodloadresults entity = new Pdspcustprodloadresults(); entity.pdrecno = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno"); entity.clevelcd = row.IsNull("clevelcd") ? string.Empty : row.Field <string>("clevelcd"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.customerName = row.IsNull("customerName") ? string.Empty : row.Field <string>("customerName"); entity.custprcty = row.IsNull("custprcty") ? string.Empty : row.Field <string>("custprcty"); entity.custprctyDesc = row.IsNull("custprctyDesc") ? string.Empty : row.Field <string>("custprctyDesc"); entity.shipto = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto"); entity.shiptoName = row.IsNull("shiptoName") ? string.Empty : row.Field <string>("shiptoName"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendorName = row.IsNull("vendorName") ? string.Empty : row.Field <string>("vendorName"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.prodDesc = row.IsNull("prodDesc") ? string.Empty : row.Field <string>("prodDesc"); entity.units = row.IsNull("units") ? string.Empty : row.Field <string>("units"); entity.prodprcty = row.IsNull("prodprcty") ? string.Empty : row.Field <string>("prodprcty"); entity.prodprctyDesc = row.IsNull("prodprctyDesc") ? string.Empty : row.Field <string>("prodprctyDesc"); entity.rebatety = row.IsNull("rebatety") ? string.Empty : row.Field <string>("rebatety"); entity.rebatetyDesc = row.IsNull("rebatetyDesc") ? string.Empty : row.Field <string>("rebatetyDesc"); entity.rebsubty = row.IsNull("rebsubty") ? string.Empty : row.Field <string>("rebsubty"); entity.rebsubtyDesc = row.IsNull("rebsubtyDesc") ? string.Empty : row.Field <string>("rebsubtyDesc"); entity.prodline = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline"); entity.prodlineDesc = row.IsNull("prodlineDesc") ? string.Empty : row.Field <string>("prodlineDesc"); entity.prodcat = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat"); entity.prodcatDesc = row.IsNull("prodcatDesc") ? string.Empty : row.Field <string>("prodcatDesc"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.whseName = row.IsNull("whseName") ? string.Empty : row.Field <string>("whseName"); entity.region = row.IsNull("region") ? string.Empty : row.Field <string>("region"); entity.startdt = row.Field <DateTime?>("startdt"); entity.enddt = row.Field <DateTime?>("enddt"); entity.statustype = row.Field <bool>("statustype"); entity.refer = row.IsNull("refer") ? string.Empty : row.Field <string>("refer"); entity.promofl = row.Field <bool>("promofl"); entity.jobno = row.IsNull("jobno") ? string.Empty : row.Field <string>("jobno"); entity.quoteno = row.IsNull("quoteno") ? string.Empty : row.Field <string>("quoteno"); entity.termsdiscfl = row.Field <bool>("termsdiscfl"); entity.termspct = row.IsNull("termspct") ? decimal.Zero : row.Field <decimal>("termspct"); entity.commtype = row.IsNull("commtype") ? string.Empty : row.Field <string>("commtype"); entity.prctyperb = row.IsNull("prctyperb") ? string.Empty : row.Field <string>("prctyperb"); entity.prctype = row.IsNull("prctype") ? string.Empty : row.Field <string>("prctype"); entity.pricesheet = row.IsNull("pricesheet") ? string.Empty : row.Field <string>("pricesheet"); entity.priceeffectivedate = row.Field <DateTime?>("priceeffectivedate"); entity.prcontyli = row.IsNull("prcontyli") ? string.Empty : row.Field <string>("prcontyli"); entity.prcontypd = row.IsNull("prcontypd") ? string.Empty : row.Field <string>("prcontypd"); entity.prcontyshli = row.IsNull("prcontyshli") ? string.Empty : row.Field <string>("prcontyshli"); entity.prcontyshpd = row.IsNull("prcontyshpd") ? string.Empty : row.Field <string>("prcontyshpd"); entity.priceonty = row.IsNull("priceonty") ? string.Empty : row.Field <string>("priceonty"); entity.qtytyli = row.IsNull("qtytyli") ? string.Empty : row.Field <string>("qtytyli"); entity.qtytypd = row.IsNull("qtytypd") ? string.Empty : row.Field <string>("qtytypd"); entity.qtytype = row.IsNull("qtytype") ? string.Empty : row.Field <string>("qtytype"); entity.qtybrktyli = row.IsNull("qtybrktyli") ? string.Empty : row.Field <string>("qtybrktyli"); entity.qtybrktypd = row.IsNull("qtybrktypd") ? string.Empty : row.Field <string>("qtybrktypd"); entity.qtybreakty = row.IsNull("qtybreakty") ? string.Empty : row.Field <string>("qtybreakty"); entity.contractno = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno"); entity.modifiernm = row.IsNull("modifiernm") ? string.Empty : row.Field <string>("modifiernm"); entity.modifierrebfl = row.Field <bool>("modifierrebfl"); entity.minqty = row.IsNull("minqty") ? decimal.Zero : row.Field <decimal>("minqty"); entity.maxqty = row.IsNull("maxqty") ? decimal.Zero : row.Field <decimal>("maxqty"); entity.actqty = row.IsNull("actqty") ? decimal.Zero : row.Field <decimal>("actqty"); entity.maxqtytyli = row.IsNull("maxqtytyli") ? string.Empty : row.Field <string>("maxqtytyli"); entity.maxqtytypd = row.IsNull("maxqtytypd") ? string.Empty : row.Field <string>("maxqtytypd"); entity.maxqtytype = row.IsNull("maxqtytype") ? string.Empty : row.Field <string>("maxqtytype"); entity.hardmaxqtyfl = row.Field <bool>("hardmaxqtyfl"); entity.hardpricefl = row.Field <bool>("hardpricefl"); entity.proundli = row.IsNull("proundli") ? string.Empty : row.Field <string>("proundli"); entity.proundpd = row.IsNull("proundpd") ? string.Empty : row.Field <string>("proundpd"); entity.pround = row.IsNull("pround") ? string.Empty : row.Field <string>("pround"); entity.ptargetli = row.IsNull("ptargetli") ? string.Empty : row.Field <string>("ptargetli"); entity.ptargetpd = row.IsNull("ptargetpd") ? string.Empty : row.Field <string>("ptargetpd"); entity.ptarget = row.IsNull("ptarget") ? 0 : row.Field <int>("ptarget"); entity.pexactrnd = row.IsNull("pexactrnd") ? decimal.Zero : row.Field <decimal>("pexactrnd"); entity.lastuseddt = row.Field <DateTime?>("lastuseddt"); entity.lastuseddtenabled = row.Field <bool>("lastuseddtenabled"); entity.ovrridepctup = row.IsNull("ovrridepctup") ? decimal.Zero : row.Field <decimal>("ovrridepctup"); entity.ovrridepctdown = row.IsNull("ovrridepctdown") ? decimal.Zero : row.Field <decimal>("ovrridepctdown"); entity.produnit = row.IsNull("produnit") ? string.Empty : row.Field <string>("produnit"); entity.produnitfl = row.Field <bool>("produnitfl"); entity.baseprice = row.IsNull("baseprice") ? string.Empty : row.Field <string>("baseprice"); entity.basepricefl = row.Field <bool>("basepricefl"); entity.listprice = row.IsNull("listprice") ? string.Empty : row.Field <string>("listprice"); entity.listpricefl = row.Field <bool>("listpricefl"); entity.icswcost = row.IsNull("icswcost") ? string.Empty : row.Field <string>("icswcost"); entity.icswcostfl = row.Field <bool>("icswcostfl"); entity.prcmult1 = row.IsNull("prcmult1") ? decimal.Zero : row.Field <decimal>("prcmult1"); entity.prcmult2 = row.IsNull("prcmult2") ? decimal.Zero : row.Field <decimal>("prcmult2"); entity.prcmult3 = row.IsNull("prcmult3") ? decimal.Zero : row.Field <decimal>("prcmult3"); entity.prcmult4 = row.IsNull("prcmult4") ? decimal.Zero : row.Field <decimal>("prcmult4"); entity.prcmult5 = row.IsNull("prcmult5") ? decimal.Zero : row.Field <decimal>("prcmult5"); entity.prcmult6 = row.IsNull("prcmult6") ? decimal.Zero : row.Field <decimal>("prcmult6"); entity.prcmult7 = row.IsNull("prcmult7") ? decimal.Zero : row.Field <decimal>("prcmult7"); entity.prcmult8 = row.IsNull("prcmult8") ? decimal.Zero : row.Field <decimal>("prcmult8"); entity.prcmult9 = row.IsNull("prcmult9") ? decimal.Zero : row.Field <decimal>("prcmult9"); entity.qtybrk1 = row.IsNull("qtybrk1") ? 0 : row.Field <int>("qtybrk1"); entity.qtybrk2 = row.IsNull("qtybrk2") ? 0 : row.Field <int>("qtybrk2"); entity.qtybrk3 = row.IsNull("qtybrk3") ? 0 : row.Field <int>("qtybrk3"); entity.qtybrk4 = row.IsNull("qtybrk4") ? 0 : row.Field <int>("qtybrk4"); entity.qtybrk5 = row.IsNull("qtybrk5") ? 0 : row.Field <int>("qtybrk5"); entity.qtybrk6 = row.IsNull("qtybrk6") ? 0 : row.Field <int>("qtybrk6"); entity.qtybrk7 = row.IsNull("qtybrk7") ? 0 : row.Field <int>("qtybrk7"); entity.qtybrk8 = row.IsNull("qtybrk8") ? 0 : row.Field <int>("qtybrk8"); entity.prcdisc1 = row.IsNull("prcdisc1") ? decimal.Zero : row.Field <decimal>("prcdisc1"); entity.prcdisc2 = row.IsNull("prcdisc2") ? decimal.Zero : row.Field <decimal>("prcdisc2"); entity.prcdisc3 = row.IsNull("prcdisc3") ? decimal.Zero : row.Field <decimal>("prcdisc3"); entity.prcdisc4 = row.IsNull("prcdisc4") ? decimal.Zero : row.Field <decimal>("prcdisc4"); entity.prcdisc5 = row.IsNull("prcdisc5") ? decimal.Zero : row.Field <decimal>("prcdisc5"); entity.prcdisc6 = row.IsNull("prcdisc6") ? decimal.Zero : row.Field <decimal>("prcdisc6"); entity.prcdisc7 = row.IsNull("prcdisc7") ? decimal.Zero : row.Field <decimal>("prcdisc7"); entity.prcdisc8 = row.IsNull("prcdisc8") ? decimal.Zero : row.Field <decimal>("prcdisc8"); entity.prcdisc9 = row.IsNull("prcdisc9") ? decimal.Zero : row.Field <decimal>("prcdisc9"); 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.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }