/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPoeilinedetail(ref DataRow row, Poeilinedetail entity) { row.SetField("lineno", entity.lineno); row.SetField("shipprod", entity.shipprod); row.SetField("notesfl", entity.notesfl); row.SetField("qtyrcv", entity.qtyrcv); row.SetField("vendprod", entity.vendprod); row.SetField("eachfl", entity.eachfl); row.SetField("unit", entity.unit); row.SetField("cancelfl", entity.cancelfl); row.SetField("nonstockty", entity.nonstockty); row.SetField("serlottype", entity.serlottype); row.SetField("proddesc", entity.proddesc); row.SetField("commentty", entity.commentty); row.SetField("dsplprice", entity.dsplprice); row.SetField("ignoreltfl", entity.ignoreltfl); row.SetField("qtyord", entity.qtyord); row.SetField("binloc1", entity.binloc1); row.SetField("msdsfl", entity.msdsfl); row.SetField("cono", entity.cono); row.SetField("jrnlno", entity.jrnlno); row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("correctionfl", entity.correctionfl); row.SetField("seqno", entity.seqno); row.SetField("reqprod", entity.reqprod); row.SetField("price", entity.price); row.SetField("nosnlots", entity.nosnlots); row.SetField("stkqtyrcv", entity.stkqtyrcv); row.SetField("qtyunavail", entity.qtyunavail); row.SetField("reasunavty", entity.reasunavty); row.SetField("corewarrty", entity.corewarrty); row.SetField("whse", entity.whse); row.SetField("chrgqty", entity.chrgqty); row.SetField("speccostty", entity.speccostty); row.SetField("conv", entity.conv); row.SetField("postfl", entity.postfl); row.SetField("stkadj", entity.stkadj); row.SetField("qtyassign", entity.qtyassign); row.SetField("wmfl", entity.wmfl); row.SetField("wmqtyrcv", entity.wmqtyrcv); row.SetField("trackfl", entity.trackfl); row.SetField("binloc2", entity.binloc2); row.SetField("ties", entity.ties); row.SetField("poeirowid", entity.poeirowid.ToByteArray()); row.SetField("crctqtyrcv", entity.crctqtyrcv); row.SetField("crctstkqtyrcv", entity.crctstkqtyrcv); row.SetField("icsnpofl", entity.icsnpofl); row.SetField("vafakeprodfl", entity.vafakeprodfl); row.SetField("origqtyrcv", entity.origqtyrcv); row.SetField("origunit", entity.origunit); row.SetField("ncnr", entity.ncnr); row.SetField("tallyfl", entity.tallyfl); row.SetField("memomixfl", entity.memomixfl); row.SetField("reqbundleidfl", entity.reqbundleidfl); row.SetField("forcetallymix", entity.forcetallymix); row.SetField("qtyrcv-sensitive", entity.qtyrcvSensitive); row.SetField("unit-sensitive", entity.unitSensitive); row.SetField("cancelfl-sensitive", entity.cancelflSensitive); row.SetField("dsplprice-sensitive", entity.dsplpriceSensitive); row.SetField("eachfl-sensitive", entity.eachflSensitive); row.SetField("binloc-sensitive", entity.binlocSensitive); row.SetField("subsuper-sensitive", entity.subsuperSensitive); row.SetField("extend-sensitive", entity.extendSensitive); row.SetField("serlot-sensitive", entity.serlotSensitive); row.SetField("addons-sensitive", entity.addonsSensitive); row.SetField("repriceoe-sensitive", entity.repriceoeSensitive); row.SetField("tally-sensitive", entity.tallySensitive); row.SetField("bundle-sensitive", entity.bundleSensitive); row.SetField("return-sensitive", entity.returnSensitive); row.SetField("ties-sensitive", entity.tiesSensitive); row.SetField("brandcode", entity.brandcode); row.SetField("mfgprod", entity.mfgprod); row.SetField("upcid", entity.upcid); row.SetField("userfield", entity.userfield); }
public static Poeilinedetail BuildPoeilinedetailFromRow(DataRow row) { Poeilinedetail entity = new Poeilinedetail(); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.qtyrcv = row.IsNull("qtyrcv") ? decimal.Zero : row.Field <decimal>("qtyrcv"); entity.vendprod = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod"); entity.eachfl = row.Field <bool>("eachfl"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.cancelfl = row.Field <bool>("cancelfl"); entity.nonstockty = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty"); entity.serlottype = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.commentty = row.IsNull("commentty") ? string.Empty : row.Field <string>("commentty"); entity.dsplprice = row.IsNull("dsplprice") ? decimal.Zero : row.Field <decimal>("dsplprice"); entity.ignoreltfl = row.Field <bool>("ignoreltfl"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.binloc1 = row.IsNull("binloc1") ? string.Empty : row.Field <string>("binloc1"); entity.msdsfl = row.Field <bool>("msdsfl"); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.correctionfl = row.Field <bool>("correctionfl"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.reqprod = row.IsNull("reqprod") ? string.Empty : row.Field <string>("reqprod"); entity.price = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price"); entity.nosnlots = row.IsNull("nosnlots") ? decimal.Zero : row.Field <decimal>("nosnlots"); entity.stkqtyrcv = row.IsNull("stkqtyrcv") ? decimal.Zero : row.Field <decimal>("stkqtyrcv"); entity.qtyunavail = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail"); entity.reasunavty = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty"); entity.corewarrty = row.IsNull("corewarrty") ? string.Empty : row.Field <string>("corewarrty"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.chrgqty = row.IsNull("chrgqty") ? decimal.Zero : row.Field <decimal>("chrgqty"); entity.speccostty = row.IsNull("speccostty") ? string.Empty : row.Field <string>("speccostty"); entity.conv = row.IsNull("conv") ? decimal.Zero : row.Field <decimal>("conv"); entity.postfl = row.Field <bool>("postfl"); entity.stkadj = row.IsNull("stkadj") ? decimal.Zero : row.Field <decimal>("stkadj"); entity.qtyassign = row.IsNull("qtyassign") ? decimal.Zero : row.Field <decimal>("qtyassign"); entity.wmfl = row.Field <bool>("wmfl"); entity.wmqtyrcv = row.IsNull("wmqtyrcv") ? decimal.Zero : row.Field <decimal>("wmqtyrcv"); entity.trackfl = row.Field <bool>("trackfl"); entity.binloc2 = row.IsNull("binloc2") ? string.Empty : row.Field <string>("binloc2"); entity.ties = row.IsNull("ties") ? string.Empty : row.Field <string>("ties"); entity.poeirowid = row.Field <byte[]>("poeirowid").ToStringEncoded(); entity.crctqtyrcv = row.IsNull("crctqtyrcv") ? decimal.Zero : row.Field <decimal>("crctqtyrcv"); entity.crctstkqtyrcv = row.IsNull("crctstkqtyrcv") ? decimal.Zero : row.Field <decimal>("crctstkqtyrcv"); entity.icsnpofl = row.Field <bool>("icsnpofl"); entity.vafakeprodfl = row.Field <bool>("vafakeprodfl"); entity.origqtyrcv = row.IsNull("origqtyrcv") ? decimal.Zero : row.Field <decimal>("origqtyrcv"); entity.origunit = row.IsNull("origunit") ? string.Empty : row.Field <string>("origunit"); entity.ncnr = row.IsNull("ncnr") ? string.Empty : row.Field <string>("ncnr"); entity.tallyfl = row.Field <bool>("tallyfl"); entity.memomixfl = row.Field <bool>("memomixfl"); entity.reqbundleidfl = row.Field <bool>("reqbundleidfl"); entity.forcetallymix = row.Field <bool>("forcetallymix"); entity.qtyrcvSensitive = row.Field <bool>("qtyrcv-sensitive"); entity.unitSensitive = row.Field <bool>("unit-sensitive"); entity.cancelflSensitive = row.Field <bool>("cancelfl-sensitive"); entity.dsplpriceSensitive = row.Field <bool>("dsplprice-sensitive"); entity.eachflSensitive = row.Field <bool>("eachfl-sensitive"); entity.binlocSensitive = row.Field <bool>("binloc-sensitive"); entity.subsuperSensitive = row.Field <bool>("subsuper-sensitive"); entity.extendSensitive = row.Field <bool>("extend-sensitive"); entity.serlotSensitive = row.Field <bool>("serlot-sensitive"); entity.addonsSensitive = row.Field <bool>("addons-sensitive"); entity.repriceoeSensitive = row.Field <bool>("repriceoe-sensitive"); entity.tallySensitive = row.Field <bool>("tally-sensitive"); entity.bundleSensitive = row.Field <bool>("bundle-sensitive"); entity.returnSensitive = row.Field <bool>("return-sensitive"); entity.tiesSensitive = row.Field <bool>("ties-sensitive"); entity.brandcode = row.IsNull("brandcode") ? string.Empty : row.Field <string>("brandcode"); entity.mfgprod = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod"); entity.upcid = row.IsNull("upcid") ? string.Empty : row.Field <string>("upcid"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }