/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeipdisplayresults(ref DataRow row, Oeipdisplayresults entity) { row.SetField("custno", entity.custno); row.SetField("shipto", entity.shipto); row.SetField("whse", entity.whse); row.SetField("prod", entity.prod); row.SetField("qty", entity.qty); row.SetField("unit", entity.unit); row.SetField("unitstnd", entity.unitstnd); row.SetField("credittext", entity.credittext); row.SetField("productstatus", entity.productstatus); row.SetField("whseproductstatus", entity.whseproductstatus); row.SetField("quotetext", entity.quotetext); row.SetField("jobtext", entity.jobtext); row.SetField("binloc1", entity.binloc1); row.SetField("binloc2", entity.binloc2); row.SetField("pricelabel", entity.pricelabel); row.SetField("totalprice", entity.totalprice); row.SetField("totaldisc", entity.totaldisc); row.SetField("customerrebate", entity.customerrebate); row.SetField("customerrebatehidden", entity.customerrebatehidden); row.SetField("totalnet", entity.totalnet); row.SetField("netunitlabel", entity.netunitlabel); row.SetField("netunit", entity.netunit); row.SetField("priceunitlabel", entity.priceunitlabel); row.SetField("priceunit", entity.priceunit); row.SetField("discunitlabel", entity.discunitlabel); row.SetField("discunit", entity.discunit); row.SetField("basepricelabel", entity.basepricelabel); row.SetField("baseprice", entity.baseprice); row.SetField("listpricelabel", entity.listpricelabel); row.SetField("listprice", entity.listprice); row.SetField("nextqtybreaklabel", entity.nextqtybreaklabel); row.SetField("nextqtybreak", entity.nextqtybreak); row.SetField("nextqtybreakhidden", entity.nextqtybreakhidden); row.SetField("savingslabel", entity.savingslabel); row.SetField("nextdiscount", entity.nextdiscount); row.SetField("nextdiscounthidden", entity.nextdiscounthidden); row.SetField("nextdiscounttext", entity.nextdiscounttext); row.SetField("prevpricelabel", entity.prevpricelabel); row.SetField("prevprice", entity.prevprice); row.SetField("prevpricehidden", entity.prevpricehidden); row.SetField("prevdatetext", entity.prevdatetext); row.SetField("prevdatetexthidden", entity.prevdatetexthidden); row.SetField("lastreplcostlabel", entity.lastreplcostlabel); row.SetField("lastreplcostdatetext", entity.lastreplcostdatetext); row.SetField("lastreplcostdatetexthidden", entity.lastreplcostdatetexthidden); row.SetField("proddescdesc", entity.proddescdesc); row.SetField("proddesc", entity.proddesc); row.SetField("totalnetdesc", entity.totalnetdesc); row.SetField("totalrebdesc", entity.totalrebdesc); row.SetField("totaldiscdesc", entity.totaldiscdesc); row.SetField("totalpricedesc", entity.totalpricedesc); row.SetField("costlabel", entity.costlabel); row.SetField("aocost", entity.aocost); row.SetField("aocostlabel", entity.aocostlabel); row.SetField("aocosthidden", entity.aocosthidden); row.SetField("vendorrebate", entity.vendorrebate); row.SetField("vendorrebatehidden", entity.vendorrebatehidden); row.SetField("margin", entity.margin); row.SetField("marginhidden", entity.marginhidden); row.SetField("marginpct", entity.marginpct); row.SetField("marginpcthidden", entity.marginpcthidden); row.SetField("startdate", entity.startdate); row.SetField("enddate", entity.enddate); row.SetField("discpct", entity.discpct); row.SetField("lastbasedate", entity.lastbasedate); row.SetField("levelcode", entity.levelcode); row.SetField("levelcodehidden", entity.levelcodehidden); row.SetField("qtylabel", entity.qtylabel); row.SetField("netavail", entity.netavail); row.SetField("qtyonorder", entity.qtyonorder); row.SetField("qtybackorder", entity.qtybackorder); row.SetField("marginlabel", entity.marginlabel); row.SetField("marginlabelhidden", entity.marginlabelhidden); row.SetField("netmargin", entity.netmargin); row.SetField("netmarginhidden", entity.netmarginhidden); row.SetField("msg", entity.msg); row.SetField("vendorrebatenumber", entity.vendorrebatenumber); row.SetField("kitrebatetext", entity.kitrebatetext); row.SetField("prodalt", entity.prodalt); row.SetField("priceorigcd", entity.priceorigcd); row.SetField("pdrecno", entity.pdrecno); row.SetField("xreftext1", entity.xreftext1); row.SetField("xreftext2", entity.xreftext2); row.SetField("xreftext3", entity.xreftext3); row.SetField("replcost", entity.replcost); row.SetField("brandcode", entity.brandcode); row.SetField("mfgprod", entity.mfgprod); row.SetField("vendprod", entity.vendprod); row.SetField("hiprcorderno", entity.hiprcorderno); row.SetField("hiprcordersuf", entity.hiprcordersuf); row.SetField("hiprclineno", entity.hiprclineno); row.SetField("overridetype", entity.overridetype); row.SetField("hightolprice", entity.hightolprice); row.SetField("lowtolprice", entity.lowtolprice); row.SetField("custreserveactivecd", entity.custreserveactivecd); row.SetField("custreserveotherfl", entity.custreserveotherfl); row.SetField("createicspfl", entity.createicspfl); row.SetField("orderasneededfl", entity.orderasneededfl); row.SetField("oannonstockfl", entity.oannonstockfl); row.SetField("rebrecno", entity.rebrecno); row.SetField("rebateamt", entity.rebateamt); row.SetField("altrebrecno", entity.altrebrecno); row.SetField("contractno", entity.contractno); row.SetField("contractlineno", entity.contractlineno); row.SetField("altprodgrp", entity.altprodgrp); row.SetField("sharefl", entity.sharefl); row.SetField("sharepct", entity.sharepct); row.SetField("capsellprice", entity.capsellprice); row.SetField("manualfl", entity.manualfl); row.SetField("userfield", entity.userfield); }
public static Oeipdisplayresults BuildOeipdisplayresultsFromRow(DataRow row) { Oeipdisplayresults entity = new Oeipdisplayresults(); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.shipto = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.qty = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.unitstnd = row.IsNull("unitstnd") ? string.Empty : row.Field <string>("unitstnd"); entity.credittext = row.IsNull("credittext") ? string.Empty : row.Field <string>("credittext"); entity.productstatus = row.IsNull("productstatus") ? string.Empty : row.Field <string>("productstatus"); entity.whseproductstatus = row.IsNull("whseproductstatus") ? string.Empty : row.Field <string>("whseproductstatus"); entity.quotetext = row.IsNull("quotetext") ? string.Empty : row.Field <string>("quotetext"); entity.jobtext = row.IsNull("jobtext") ? string.Empty : row.Field <string>("jobtext"); entity.binloc1 = row.IsNull("binloc1") ? string.Empty : row.Field <string>("binloc1"); entity.binloc2 = row.IsNull("binloc2") ? string.Empty : row.Field <string>("binloc2"); entity.pricelabel = row.IsNull("pricelabel") ? string.Empty : row.Field <string>("pricelabel"); entity.totalprice = row.IsNull("totalprice") ? decimal.Zero : row.Field <decimal>("totalprice"); entity.totaldisc = row.IsNull("totaldisc") ? decimal.Zero : row.Field <decimal>("totaldisc"); entity.customerrebate = row.IsNull("customerrebate") ? decimal.Zero : row.Field <decimal>("customerrebate"); entity.customerrebatehidden = row.Field <bool>("customerrebatehidden"); entity.totalnet = row.IsNull("totalnet") ? decimal.Zero : row.Field <decimal>("totalnet"); entity.netunitlabel = row.IsNull("netunitlabel") ? string.Empty : row.Field <string>("netunitlabel"); entity.netunit = row.IsNull("netunit") ? decimal.Zero : row.Field <decimal>("netunit"); entity.priceunitlabel = row.IsNull("priceunitlabel") ? string.Empty : row.Field <string>("priceunitlabel"); entity.priceunit = row.IsNull("priceunit") ? decimal.Zero : row.Field <decimal>("priceunit"); entity.discunitlabel = row.IsNull("discunitlabel") ? string.Empty : row.Field <string>("discunitlabel"); entity.discunit = row.IsNull("discunit") ? decimal.Zero : row.Field <decimal>("discunit"); entity.basepricelabel = row.IsNull("basepricelabel") ? string.Empty : row.Field <string>("basepricelabel"); entity.baseprice = row.IsNull("baseprice") ? decimal.Zero : row.Field <decimal>("baseprice"); entity.listpricelabel = row.IsNull("listpricelabel") ? string.Empty : row.Field <string>("listpricelabel"); entity.listprice = row.IsNull("listprice") ? decimal.Zero : row.Field <decimal>("listprice"); entity.nextqtybreaklabel = row.IsNull("nextqtybreaklabel") ? string.Empty : row.Field <string>("nextqtybreaklabel"); entity.nextqtybreak = row.IsNull("nextqtybreak") ? decimal.Zero : row.Field <decimal>("nextqtybreak"); entity.nextqtybreakhidden = row.Field <bool>("nextqtybreakhidden"); entity.savingslabel = row.IsNull("savingslabel") ? string.Empty : row.Field <string>("savingslabel"); entity.nextdiscount = row.IsNull("nextdiscount") ? decimal.Zero : row.Field <decimal>("nextdiscount"); entity.nextdiscounthidden = row.Field <bool>("nextdiscounthidden"); entity.nextdiscounttext = row.IsNull("nextdiscounttext") ? string.Empty : row.Field <string>("nextdiscounttext"); entity.prevpricelabel = row.IsNull("prevpricelabel") ? string.Empty : row.Field <string>("prevpricelabel"); entity.prevprice = row.IsNull("prevprice") ? decimal.Zero : row.Field <decimal>("prevprice"); entity.prevpricehidden = row.Field <bool>("prevpricehidden"); entity.prevdatetext = row.IsNull("prevdatetext") ? string.Empty : row.Field <string>("prevdatetext"); entity.prevdatetexthidden = row.Field <bool>("prevdatetexthidden"); entity.lastreplcostlabel = row.IsNull("lastreplcostlabel") ? string.Empty : row.Field <string>("lastreplcostlabel"); entity.lastreplcostdatetext = row.IsNull("lastreplcostdatetext") ? string.Empty : row.Field <string>("lastreplcostdatetext"); entity.lastreplcostdatetexthidden = row.Field <bool>("lastreplcostdatetexthidden"); entity.proddescdesc = row.IsNull("proddescdesc") ? string.Empty : row.Field <string>("proddescdesc"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.totalnetdesc = row.IsNull("totalnetdesc") ? string.Empty : row.Field <string>("totalnetdesc"); entity.totalrebdesc = row.IsNull("totalrebdesc") ? string.Empty : row.Field <string>("totalrebdesc"); entity.totaldiscdesc = row.IsNull("totaldiscdesc") ? string.Empty : row.Field <string>("totaldiscdesc"); entity.totalpricedesc = row.IsNull("totalpricedesc") ? string.Empty : row.Field <string>("totalpricedesc"); entity.costlabel = row.IsNull("costlabel") ? string.Empty : row.Field <string>("costlabel"); entity.aocost = row.IsNull("aocost") ? decimal.Zero : row.Field <decimal>("aocost"); entity.aocostlabel = row.IsNull("aocostlabel") ? string.Empty : row.Field <string>("aocostlabel"); entity.aocosthidden = row.Field <bool>("aocosthidden"); entity.vendorrebate = row.IsNull("vendorrebate") ? decimal.Zero : row.Field <decimal>("vendorrebate"); entity.vendorrebatehidden = row.Field <bool>("vendorrebatehidden"); entity.margin = row.IsNull("margin") ? decimal.Zero : row.Field <decimal>("margin"); entity.marginhidden = row.Field <bool>("marginhidden"); entity.marginpct = row.IsNull("marginpct") ? decimal.Zero : row.Field <decimal>("marginpct"); entity.marginpcthidden = row.Field <bool>("marginpcthidden"); entity.startdate = row.Field <DateTime?>("startdate"); entity.enddate = row.Field <DateTime?>("enddate"); entity.discpct = row.IsNull("discpct") ? decimal.Zero : row.Field <decimal>("discpct"); entity.lastbasedate = row.Field <DateTime?>("lastbasedate"); entity.levelcode = row.IsNull("levelcode") ? 0 : row.Field <int>("levelcode"); entity.levelcodehidden = row.Field <bool>("levelcodehidden"); entity.qtylabel = row.IsNull("qtylabel") ? string.Empty : row.Field <string>("qtylabel"); entity.netavail = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail"); entity.qtyonorder = row.IsNull("qtyonorder") ? decimal.Zero : row.Field <decimal>("qtyonorder"); entity.qtybackorder = row.IsNull("qtybackorder") ? decimal.Zero : row.Field <decimal>("qtybackorder"); entity.marginlabel = row.IsNull("marginlabel") ? string.Empty : row.Field <string>("marginlabel"); entity.marginlabelhidden = row.Field <bool>("marginlabelhidden"); entity.netmargin = row.IsNull("netmargin") ? decimal.Zero : row.Field <decimal>("netmargin"); entity.netmarginhidden = row.Field <bool>("netmarginhidden"); entity.msg = row.IsNull("msg") ? string.Empty : row.Field <string>("msg"); entity.vendorrebatenumber = row.IsNull("vendorrebatenumber") ? string.Empty : row.Field <string>("vendorrebatenumber"); entity.kitrebatetext = row.IsNull("kitrebatetext") ? string.Empty : row.Field <string>("kitrebatetext"); entity.prodalt = row.IsNull("prodalt") ? string.Empty : row.Field <string>("prodalt"); entity.priceorigcd = row.IsNull("priceorigcd") ? string.Empty : row.Field <string>("priceorigcd"); entity.pdrecno = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno"); entity.xreftext1 = row.IsNull("xreftext1") ? string.Empty : row.Field <string>("xreftext1"); entity.xreftext2 = row.IsNull("xreftext2") ? string.Empty : row.Field <string>("xreftext2"); entity.xreftext3 = row.IsNull("xreftext3") ? string.Empty : row.Field <string>("xreftext3"); entity.replcost = row.IsNull("replcost") ? decimal.Zero : row.Field <decimal>("replcost"); entity.brandcode = row.IsNull("brandcode") ? string.Empty : row.Field <string>("brandcode"); entity.mfgprod = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod"); entity.vendprod = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod"); entity.hiprcorderno = row.IsNull("hiprcorderno") ? 0 : row.Field <int>("hiprcorderno"); entity.hiprcordersuf = row.IsNull("hiprcordersuf") ? 0 : row.Field <int>("hiprcordersuf"); entity.hiprclineno = row.IsNull("hiprclineno") ? 0 : row.Field <int>("hiprclineno"); entity.overridetype = row.Field <bool>("overridetype"); entity.hightolprice = row.IsNull("hightolprice") ? decimal.Zero : row.Field <decimal>("hightolprice"); entity.lowtolprice = row.IsNull("lowtolprice") ? decimal.Zero : row.Field <decimal>("lowtolprice"); entity.custreserveactivecd = row.IsNull("custreserveactivecd") ? string.Empty : row.Field <string>("custreserveactivecd"); entity.custreserveotherfl = row.Field <bool>("custreserveotherfl"); entity.createicspfl = row.Field <bool>("createicspfl"); entity.orderasneededfl = row.Field <bool>("orderasneededfl"); entity.oannonstockfl = row.Field <bool>("oannonstockfl"); entity.rebrecno = row.IsNull("rebrecno") ? decimal.Zero : row.Field <decimal>("rebrecno"); entity.rebateamt = row.IsNull("rebateamt") ? decimal.Zero : row.Field <decimal>("rebateamt"); entity.altrebrecno = row.IsNull("altrebrecno") ? decimal.Zero : row.Field <decimal>("altrebrecno"); entity.contractno = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno"); entity.contractlineno = row.IsNull("contractlineno") ? 0 : row.Field <int>("contractlineno"); entity.altprodgrp = row.IsNull("altprodgrp") ? string.Empty : row.Field <string>("altprodgrp"); entity.sharefl = row.Field <bool>("sharefl"); entity.sharepct = row.IsNull("sharepct") ? decimal.Zero : row.Field <decimal>("sharepct"); entity.capsellprice = row.IsNull("capsellprice") ? decimal.Zero : row.Field <decimal>("capsellprice"); entity.manualfl = row.Field <bool>("manualfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }