/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeiolinesresults(ref DataRow row, Oeiolinesresults entity) { row.SetField("lineitemtype", entity.lineitemtype); row.SetField("sortlineno", entity.sortlineno); row.SetField("dspllineno", entity.dspllineno); row.SetField("actllineno", entity.actllineno); row.SetField("shipprod", entity.shipprod); row.SetField("proddesc", entity.proddesc); row.SetField("commentfl", entity.commentfl); row.SetField("specnstype", entity.specnstype); row.SetField("specnstypedspl", entity.specnstypedspl); row.SetField("notesfl", entity.notesfl); row.SetField("unit", entity.unit); row.SetField("unitconv", entity.unitconv); row.SetField("prodcost", entity.prodcost); row.SetField("disctype", entity.disctype); row.SetField("discamt", entity.discamt); row.SetField("discamtdspl", entity.discamtdspl); row.SetField("discpct", entity.discpct); row.SetField("bono", entity.bono); row.SetField("bonodspl", entity.bonodspl); row.SetField("botype", entity.botype); row.SetField("linedodspl", entity.linedodspl); row.SetField("rushfl", entity.rushfl); row.SetField("rushdspl", entity.rushdspl); row.SetField("qtyord", entity.qtyord); row.SetField("qtyship", entity.qtyship); row.SetField("qtyorddspl", entity.qtyorddspl); row.SetField("qtyshipdspl", entity.qtyshipdspl); row.SetField("returnfl", entity.returnfl); row.SetField("reqprod", entity.reqprod); row.SetField("price", entity.price); row.SetField("pricedspl", entity.pricedspl); row.SetField("qtybreakty", entity.qtybreakty); row.SetField("pdrecno", entity.pdrecno); row.SetField("hardpricefl", entity.hardpricefl); row.SetField("netord", entity.netord); row.SetField("netamt", entity.netamt); row.SetField("netamtdspl", entity.netamtdspl); row.SetField("netpricedspl", entity.netpricedspl); row.SetField("enterdt", entity.enterdt); row.SetField("jitpickfl", entity.jitpickfl); row.SetField("jitpickdspl", entity.jitpickdspl); row.SetField("reqshipdt", entity.reqshipdt); row.SetField("promisedt", entity.promisedt); row.SetField("kitfl", entity.kitfl); row.SetField("tallyfl", entity.tallyfl); row.SetField("corertnty", entity.corertnty); row.SetField("origcore", entity.origcore); row.SetField("extrasortasc", entity.extrasortasc); row.SetField("extrasortdsc", entity.extrasortdsc); row.SetField("ordertype", entity.ordertype); row.SetField("ordertypedspl", entity.ordertypedspl); row.SetField("qtyreturn", entity.qtyreturn); row.SetField("qtyreturndspl", entity.qtyreturndspl); row.SetField("orderaltno", entity.orderaltno); row.SetField("netavail", entity.netavail); row.SetField("priceoverfl", entity.priceoverfl); row.SetField("priceclty", entity.priceclty); row.SetField("pricecd", entity.pricecd); row.SetField("lineitemrecid", entity.lineitemrecid); row.SetField("lineitemrowid", entity.lineitemrowid.ToByteArray()); row.SetField("ptlkitbofl", entity.ptlkitbofl); row.SetField("kitsplitamt", entity.kitsplitamt); row.SetField("bonoptl", entity.bonoptl); row.SetField("priceorigcd", entity.priceorigcd); row.SetField("margin", entity.margin); row.SetField("margindspl", entity.margindspl); row.SetField("margpct", entity.margpct); row.SetField("margpctdspl", entity.margpctdspl); row.SetField("cube", entity.cube); row.SetField("weight", entity.weight); row.SetField("fabwhse", entity.fabwhse); row.SetField("csunperstk", entity.csunperstk); row.SetField("specconv", entity.specconv); row.SetField("prccostper", entity.prccostper); row.SetField("speccostty", entity.speccostty); row.SetField("icspecrecno", entity.icspecrecno); row.SetField("speccostdspl", entity.speccostdspl); row.SetField("edierr", entity.edierr); row.SetField("ediexc", entity.ediexc); row.SetField("edilineno", entity.edilineno); row.SetField("custprod", entity.custprod); row.SetField("origlineno", entity.origlineno); row.SetField("chgtolineno", entity.chgtolineno); row.SetField("lostbusty", entity.lostbusty); row.SetField("chgqtyfl", entity.chgqtyfl); row.SetField("extcomfl", entity.extcomfl); row.SetField("inventoryty", entity.inventoryty); row.SetField("invtydspl", entity.invtydspl); row.SetField("otid", entity.otid); row.SetField("otContract", entity.otContract); row.SetField("otamount", entity.otamount); row.SetField("vaassemlgth", entity.vaassemlgth); row.SetField("vavariableunit", entity.vavariableunit); row.SetField("statustype", entity.statustype); row.SetField("ncnr", entity.ncnr); row.SetField("eccnclasscd", entity.eccnclasscd); row.SetField("brandcode", entity.brandcode); row.SetField("mfgprod", entity.mfgprod); row.SetField("vendprod", entity.vendprod); row.SetField("countryoforigin", entity.countryoforigin); row.SetField("tariffcd", entity.tariffcd); row.SetField("upcid", entity.upcid); row.SetField("dPricecd", entity.dPricecd); row.SetField("prodcostdspl", entity.prodcostdspl); row.SetField("restrictcd", entity.restrictcd); row.SetField("restrictdesc", entity.restrictdesc); row.SetField("restrictovrfl", entity.restrictovrfl); row.SetField("restrictovrcom", entity.restrictovrcom); row.SetField("certcode", entity.certcode); row.SetField("certexpdt", entity.certexpdt); row.SetField("certaccptdt", entity.certaccptdt); row.SetField("certaccptuser", entity.certaccptuser); row.SetField("certsaledt", entity.certsaledt); row.SetField("certauthuser", entity.certauthuser); row.SetField("impliedcorefl", entity.impliedcorefl); row.SetField("coreallocationfl", entity.coreallocationfl); row.SetField("overridetype", entity.overridetype); row.SetField("hightolprice", entity.hightolprice); row.SetField("lowtolprice", entity.lowtolprice); row.SetField("custreserveovrfl", entity.custreserveovrfl); row.SetField("custreservecontractno", entity.custreservecontractno); row.SetField("kitsourcefl", entity.kitsourcefl); row.SetField("msdsfl", entity.msdsfl); row.SetField("pickmsds", entity.pickmsds); row.SetField("ehfaddonno", entity.ehfaddonno); row.SetField("ehfaddondesc", entity.ehfaddondesc); row.SetField("ehfamt", entity.ehfamt); row.SetField("ehfexemptamt", entity.ehfexemptamt); row.SetField("ehfnetamt", entity.ehfnetamt); row.SetField("prodcat", entity.prodcat); row.SetField("icspprodcat", entity.icspprodcat); row.SetField("icspstatustype", entity.icspstatustype); 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("crlineno", entity.crlineno); row.SetField("vendretauth", entity.vendretauth); row.SetField("npfl", entity.npfl); row.SetField("pdsnrecno", entity.pdsnrecno); row.SetField("npcd", entity.npcd); row.SetField("userfield", entity.userfield); }
public static Oeiolinesresults BuildOeiolinesresultsFromRow(DataRow row) { Oeiolinesresults entity = new Oeiolinesresults(); entity.lineitemtype = row.IsNull("lineitemtype") ? string.Empty : row.Field <string>("lineitemtype"); entity.sortlineno = row.IsNull("sortlineno") ? 0 : row.Field <int>("sortlineno"); entity.dspllineno = row.IsNull("dspllineno") ? string.Empty : row.Field <string>("dspllineno"); entity.actllineno = row.IsNull("actllineno") ? 0 : row.Field <int>("actllineno"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.commentfl = row.Field <bool>("commentfl"); entity.specnstype = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype"); entity.specnstypedspl = row.IsNull("specnstypedspl") ? string.Empty : row.Field <string>("specnstypedspl"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.unitconv = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv"); entity.prodcost = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost"); entity.disctype = row.Field <bool>("disctype"); entity.discamt = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt"); entity.discamtdspl = row.IsNull("discamtdspl") ? string.Empty : row.Field <string>("discamtdspl"); entity.discpct = row.IsNull("discpct") ? decimal.Zero : row.Field <decimal>("discpct"); entity.bono = row.IsNull("bono") ? 0 : row.Field <int>("bono"); entity.bonodspl = row.IsNull("bonodspl") ? string.Empty : row.Field <string>("bonodspl"); entity.botype = row.IsNull("botype") ? string.Empty : row.Field <string>("botype"); entity.linedodspl = row.IsNull("linedodspl") ? string.Empty : row.Field <string>("linedodspl"); entity.rushfl = row.Field <bool>("rushfl"); entity.rushdspl = row.IsNull("rushdspl") ? string.Empty : row.Field <string>("rushdspl"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.qtyship = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship"); entity.qtyorddspl = row.IsNull("qtyorddspl") ? decimal.Zero : row.Field <decimal>("qtyorddspl"); entity.qtyshipdspl = row.IsNull("qtyshipdspl") ? decimal.Zero : row.Field <decimal>("qtyshipdspl"); entity.returnfl = row.Field <bool>("returnfl"); entity.reqprod = row.IsNull("reqprod") ? string.Empty : row.Field <string>("reqprod"); entity.price = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price"); entity.pricedspl = row.IsNull("pricedspl") ? string.Empty : row.Field <string>("pricedspl"); entity.qtybreakty = row.IsNull("qtybreakty") ? string.Empty : row.Field <string>("qtybreakty"); entity.pdrecno = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno"); entity.hardpricefl = row.Field <bool>("hardpricefl"); entity.netord = row.IsNull("netord") ? decimal.Zero : row.Field <decimal>("netord"); entity.netamt = row.IsNull("netamt") ? decimal.Zero : row.Field <decimal>("netamt"); entity.netamtdspl = row.IsNull("netamtdspl") ? string.Empty : row.Field <string>("netamtdspl"); entity.netpricedspl = row.IsNull("netpricedspl") ? string.Empty : row.Field <string>("netpricedspl"); entity.enterdt = row.Field <DateTime?>("enterdt"); entity.jitpickfl = row.Field <bool>("jitpickfl"); entity.jitpickdspl = row.IsNull("jitpickdspl") ? string.Empty : row.Field <string>("jitpickdspl"); entity.reqshipdt = row.Field <DateTime?>("reqshipdt"); entity.promisedt = row.Field <DateTime?>("promisedt"); entity.kitfl = row.Field <bool>("kitfl"); entity.tallyfl = row.Field <bool>("tallyfl"); entity.corertnty = row.IsNull("corertnty") ? string.Empty : row.Field <string>("corertnty"); entity.origcore = row.IsNull("origcore") ? string.Empty : row.Field <string>("origcore"); entity.extrasortasc = row.IsNull("extrasortasc") ? string.Empty : row.Field <string>("extrasortasc"); entity.extrasortdsc = row.IsNull("extrasortdsc") ? string.Empty : row.Field <string>("extrasortdsc"); entity.ordertype = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype"); entity.ordertypedspl = row.IsNull("ordertypedspl") ? string.Empty : row.Field <string>("ordertypedspl"); entity.qtyreturn = row.IsNull("qtyreturn") ? decimal.Zero : row.Field <decimal>("qtyreturn"); entity.qtyreturndspl = row.IsNull("qtyreturndspl") ? string.Empty : row.Field <string>("qtyreturndspl"); entity.orderaltno = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno"); entity.netavail = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail"); entity.priceoverfl = row.Field <bool>("priceoverfl"); entity.priceclty = row.IsNull("priceclty") ? string.Empty : row.Field <string>("priceclty"); entity.pricecd = row.IsNull("pricecd") ? decimal.Zero : row.Field <decimal>("pricecd"); entity.lineitemrecid = row.IsNull("lineitemrecid") ? 0 : row.Field <long>("lineitemrecid"); entity.lineitemrowid = row.Field <byte[]>("lineitemrowid").ToStringEncoded(); entity.ptlkitbofl = row.Field <bool>("ptlkitbofl"); entity.kitsplitamt = row.IsNull("kitsplitamt") ? decimal.Zero : row.Field <decimal>("kitsplitamt"); entity.bonoptl = row.IsNull("bonoptl") ? 0 : row.Field <int>("bonoptl"); entity.priceorigcd = row.IsNull("priceorigcd") ? string.Empty : row.Field <string>("priceorigcd"); entity.margin = row.IsNull("margin") ? decimal.Zero : row.Field <decimal>("margin"); entity.margindspl = row.IsNull("margindspl") ? string.Empty : row.Field <string>("margindspl"); entity.margpct = row.IsNull("margpct") ? decimal.Zero : row.Field <decimal>("margpct"); entity.margpctdspl = row.IsNull("margpctdspl") ? string.Empty : row.Field <string>("margpctdspl"); entity.cube = row.IsNull("cube") ? decimal.Zero : row.Field <decimal>("cube"); entity.weight = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight"); entity.fabwhse = row.IsNull("fabwhse") ? string.Empty : row.Field <string>("fabwhse"); entity.csunperstk = row.IsNull("csunperstk") ? decimal.Zero : row.Field <decimal>("csunperstk"); entity.specconv = row.IsNull("specconv") ? 0 : row.Field <int>("specconv"); entity.prccostper = row.IsNull("prccostper") ? string.Empty : row.Field <string>("prccostper"); entity.speccostty = row.IsNull("speccostty") ? string.Empty : row.Field <string>("speccostty"); entity.icspecrecno = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno"); entity.speccostdspl = row.IsNull("speccostdspl") ? string.Empty : row.Field <string>("speccostdspl"); entity.edierr = row.IsNull("edierr") ? 0 : row.Field <int>("edierr"); entity.ediexc = row.IsNull("ediexc") ? 0 : row.Field <int>("ediexc"); entity.edilineno = row.IsNull("edilineno") ? string.Empty : row.Field <string>("edilineno"); entity.custprod = row.IsNull("custprod") ? string.Empty : row.Field <string>("custprod"); entity.origlineno = row.IsNull("origlineno") ? 0 : row.Field <int>("origlineno"); entity.chgtolineno = row.IsNull("chgtolineno") ? 0 : row.Field <int>("chgtolineno"); entity.lostbusty = row.IsNull("lostbusty") ? string.Empty : row.Field <string>("lostbusty"); entity.chgqtyfl = row.Field <bool>("chgqtyfl"); entity.extcomfl = row.Field <bool>("extcomfl"); entity.inventoryty = row.IsNull("inventoryty") ? string.Empty : row.Field <string>("inventoryty"); entity.invtydspl = row.IsNull("invtydspl") ? string.Empty : row.Field <string>("invtydspl"); entity.otid = row.IsNull("otid") ? string.Empty : row.Field <string>("otid"); entity.otContract = row.IsNull("otContract") ? string.Empty : row.Field <string>("otContract"); entity.otamount = row.IsNull("otamount") ? decimal.Zero : row.Field <decimal>("otamount"); entity.vaassemlgth = row.IsNull("vaassemlgth") ? decimal.Zero : row.Field <decimal>("vaassemlgth"); entity.vavariableunit = row.IsNull("vavariableunit") ? string.Empty : row.Field <string>("vavariableunit"); entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype"); entity.ncnr = row.IsNull("ncnr") ? string.Empty : row.Field <string>("ncnr"); entity.eccnclasscd = row.IsNull("eccnclasscd") ? string.Empty : row.Field <string>("eccnclasscd"); 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.countryoforigin = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin"); entity.tariffcd = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd"); entity.upcid = row.IsNull("upcid") ? string.Empty : row.Field <string>("upcid"); entity.dPricecd = row.IsNull("dPricecd") ? decimal.Zero : row.Field <decimal>("dPricecd"); entity.prodcostdspl = row.IsNull("prodcostdspl") ? string.Empty : row.Field <string>("prodcostdspl"); entity.restrictcd = row.IsNull("restrictcd") ? string.Empty : row.Field <string>("restrictcd"); entity.restrictdesc = row.IsNull("restrictdesc") ? string.Empty : row.Field <string>("restrictdesc"); entity.restrictovrfl = row.Field <bool>("restrictovrfl"); entity.restrictovrcom = row.IsNull("restrictovrcom") ? string.Empty : row.Field <string>("restrictovrcom"); entity.certcode = row.IsNull("certcode") ? string.Empty : row.Field <string>("certcode"); entity.certexpdt = row.Field <DateTime?>("certexpdt"); entity.certaccptdt = row.Field <DateTime?>("certaccptdt"); entity.certaccptuser = row.IsNull("certaccptuser") ? string.Empty : row.Field <string>("certaccptuser"); entity.certsaledt = row.Field <DateTime?>("certsaledt"); entity.certauthuser = row.IsNull("certauthuser") ? string.Empty : row.Field <string>("certauthuser"); entity.impliedcorefl = row.Field <bool>("impliedcorefl"); entity.coreallocationfl = row.Field <bool>("coreallocationfl"); entity.overridetype = row.IsNull("overridetype") ? string.Empty : row.Field <string>("overridetype"); entity.hightolprice = row.IsNull("hightolprice") ? decimal.Zero : row.Field <decimal>("hightolprice"); entity.lowtolprice = row.IsNull("lowtolprice") ? decimal.Zero : row.Field <decimal>("lowtolprice"); entity.custreserveovrfl = row.Field <bool>("custreserveovrfl"); entity.custreservecontractno = row.IsNull("custreservecontractno") ? string.Empty : row.Field <string>("custreservecontractno"); entity.kitsourcefl = row.Field <bool>("kitsourcefl"); entity.msdsfl = row.Field <bool>("msdsfl"); entity.pickmsds = row.IsNull("pickmsds") ? string.Empty : row.Field <string>("pickmsds"); entity.ehfaddonno = row.IsNull("ehfaddonno") ? 0 : row.Field <int>("ehfaddonno"); entity.ehfaddondesc = row.IsNull("ehfaddondesc") ? string.Empty : row.Field <string>("ehfaddondesc"); entity.ehfamt = row.IsNull("ehfamt") ? decimal.Zero : row.Field <decimal>("ehfamt"); entity.ehfexemptamt = row.IsNull("ehfexemptamt") ? decimal.Zero : row.Field <decimal>("ehfexemptamt"); entity.ehfnetamt = row.IsNull("ehfnetamt") ? decimal.Zero : row.Field <decimal>("ehfnetamt"); entity.prodcat = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat"); entity.icspprodcat = row.IsNull("icspprodcat") ? string.Empty : row.Field <string>("icspprodcat"); entity.icspstatustype = row.IsNull("icspstatustype") ? string.Empty : row.Field <string>("icspstatustype"); 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.crlineno = row.IsNull("crlineno") ? 0 : row.Field <int>("crlineno"); entity.vendretauth = row.IsNull("vendretauth") ? string.Empty : row.Field <string>("vendretauth"); entity.npfl = row.Field <bool>("npfl"); entity.pdsnrecno = row.IsNull("pdsnrecno") ? 0 : row.Field <int>("pdsnrecno"); entity.npcd = row.IsNull("npcd") ? string.Empty : row.Field <string>("npcd"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }