/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApeiinvdetpoln(ref DataRow row, Apeiinvdetpoln entity) { row.SetField("groupnm", entity.groupnm); row.SetField("createddt", entity.createddt); row.SetField("groupseqno", entity.groupseqno); row.SetField("detailseqno", entity.detailseqno); row.SetField("addonapplyty", entity.addonapplyty); row.SetField("addonfrompoln", entity.addonfrompoln); row.SetField("addonpolnlist", entity.addonpolnlist); row.SetField("addonseqno", entity.addonseqno); row.SetField("addontopoln", entity.addontopoln); row.SetField("apinvno", entity.apinvno); row.SetField("bundleid", entity.bundleid); row.SetField("closefl", entity.closefl); row.SetField("cNextSuf", entity.cNextSuf); row.SetField("cNextSufNetAmt", entity.cNextSufNetAmt); row.SetField("cNextSufQtyRcv", entity.cNextSufQtyRcv); row.SetField("cNonStockTy", entity.cNonStockTy); row.SetField("compseqno", entity.compseqno); row.SetField("cost", entity.cost); row.SetField("costord", entity.costord); row.SetField("costrcv", entity.costrcv); row.SetField("cOtherSufNetAmt", entity.cOtherSufNetAmt); row.SetField("cOtherSufQtyRcv", entity.cOtherSufQtyRcv); row.SetField("cPOELQtyCosted", entity.cPOELQtyCosted); row.SetField("cPOELQtyRcv", entity.cPOELQtyRcv); row.SetField("cPONotesFl", entity.cPONotesFl); row.SetField("detailty", entity.detailty); row.SetField("dManualAddon", entity.dManualAddon); row.SetField("dPoelExtended", entity.dPoelExtended); row.SetField("dPOELNetRcv", entity.dPOELNetRcv); row.SetField("dPoelQtyOrd", entity.dPoelQtyOrd); row.SetField("eachfl", entity.eachfl); row.SetField("invunit", entity.invunit); row.SetField("lastcostupdtfl", entity.lastcostupdtfl); row.SetField("lineno", entity.lineno); row.SetField("operinit", entity.operinit); row.SetField("podoshipdt", entity.podoshipdt); row.SetField("polnseqno", entity.polnseqno); row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("pounit", entity.pounit); row.SetField("proctype", entity.proctype); row.SetField("proddesc", entity.proddesc); row.SetField("proddesc2", entity.proddesc2); row.SetField("qtyord", entity.qtyord); row.SetField("qtyrcv", entity.qtyrcv); row.SetField("receiverno", entity.receiverno); row.SetField("reconoverfl", entity.reconoverfl); row.SetField("shipprod", entity.shipprod); row.SetField("statustype", entity.statustype); row.SetField("unitconv", entity.unitconv); row.SetField("updatefl", entity.updatefl); row.SetField("vendno", entity.vendno); row.SetField("vendprod", entity.vendprod); row.SetField("whse", entity.whse); row.SetField("closeflenabled", entity.closeflenabled); row.SetField("costenabled", entity.costenabled); row.SetField("costordenabled", entity.costordenabled); row.SetField("lstcstupdtenabled", entity.lstcstupdtenabled); row.SetField("linenoenabled", entity.linenoenabled); row.SetField("manualaddonenabled", entity.manualaddonenabled); row.SetField("perunitenabled", entity.perunitenabled); row.SetField("ponoenabled", entity.ponoenabled); row.SetField("posufenabled", entity.posufenabled); row.SetField("proddescenabled", entity.proddescenabled); row.SetField("proddesc2enabled", entity.proddesc2enabled); row.SetField("qtyordenabled", entity.qtyordenabled); row.SetField("reconoverflenabled", entity.reconoverflenabled); row.SetField("shipprodenabled", entity.shipprodenabled); row.SetField("tallyenabled", entity.tallyenabled); row.SetField("vendprodenabled", entity.vendprodenabled); row.SetField("perunithidden", entity.perunithidden); row.SetField("tallyhidden", entity.tallyhidden); row.SetField("origcost", entity.origcost); row.SetField("origlineno", entity.origlineno); row.SetField("origpono", entity.origpono); row.SetField("origposuf", entity.origposuf); row.SetField("origqtyord", entity.origqtyord); row.SetField("origprod", entity.origprod); row.SetField("apeid-rowid", entity.apeidRowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Apeiinvdetpoln BuildApeiinvdetpolnFromRow(DataRow row) { Apeiinvdetpoln entity = new Apeiinvdetpoln(); entity.groupnm = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm"); entity.createddt = row.Field <DateTime?>("createddt"); entity.groupseqno = row.IsNull("groupseqno") ? 0 : row.Field <int>("groupseqno"); entity.detailseqno = row.IsNull("detailseqno") ? 0 : row.Field <int>("detailseqno"); entity.addonapplyty = row.IsNull("addonapplyty") ? string.Empty : row.Field <string>("addonapplyty"); entity.addonfrompoln = row.IsNull("addonfrompoln") ? 0 : row.Field <int>("addonfrompoln"); entity.addonpolnlist = row.IsNull("addonpolnlist") ? string.Empty : row.Field <string>("addonpolnlist"); entity.addonseqno = row.IsNull("addonseqno") ? 0 : row.Field <int>("addonseqno"); entity.addontopoln = row.IsNull("addontopoln") ? 0 : row.Field <int>("addontopoln"); entity.apinvno = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno"); entity.bundleid = row.IsNull("bundleid") ? string.Empty : row.Field <string>("bundleid"); entity.closefl = row.Field <bool>("closefl"); entity.cNextSuf = row.IsNull("cNextSuf") ? string.Empty : row.Field <string>("cNextSuf"); entity.cNextSufNetAmt = row.IsNull("cNextSufNetAmt") ? string.Empty : row.Field <string>("cNextSufNetAmt"); entity.cNextSufQtyRcv = row.IsNull("cNextSufQtyRcv") ? string.Empty : row.Field <string>("cNextSufQtyRcv"); entity.cNonStockTy = row.IsNull("cNonStockTy") ? string.Empty : row.Field <string>("cNonStockTy"); entity.compseqno = row.IsNull("compseqno") ? 0 : row.Field <int>("compseqno"); entity.cost = row.IsNull("cost") ? decimal.Zero : row.Field <decimal>("cost"); entity.costord = row.IsNull("costord") ? decimal.Zero : row.Field <decimal>("costord"); entity.costrcv = row.IsNull("costrcv") ? decimal.Zero : row.Field <decimal>("costrcv"); entity.cOtherSufNetAmt = row.IsNull("cOtherSufNetAmt") ? string.Empty : row.Field <string>("cOtherSufNetAmt"); entity.cOtherSufQtyRcv = row.IsNull("cOtherSufQtyRcv") ? string.Empty : row.Field <string>("cOtherSufQtyRcv"); entity.cPOELQtyCosted = row.IsNull("cPOELQtyCosted") ? string.Empty : row.Field <string>("cPOELQtyCosted"); entity.cPOELQtyRcv = row.IsNull("cPOELQtyRcv") ? string.Empty : row.Field <string>("cPOELQtyRcv"); entity.cPONotesFl = row.IsNull("cPONotesFl") ? string.Empty : row.Field <string>("cPONotesFl"); entity.detailty = row.IsNull("detailty") ? string.Empty : row.Field <string>("detailty"); entity.dManualAddon = row.IsNull("dManualAddon") ? decimal.Zero : row.Field <decimal>("dManualAddon"); entity.dPoelExtended = row.IsNull("dPoelExtended") ? decimal.Zero : row.Field <decimal>("dPoelExtended"); entity.dPOELNetRcv = row.IsNull("dPOELNetRcv") ? decimal.Zero : row.Field <decimal>("dPOELNetRcv"); entity.dPoelQtyOrd = row.IsNull("dPoelQtyOrd") ? decimal.Zero : row.Field <decimal>("dPoelQtyOrd"); entity.eachfl = row.Field <bool>("eachfl"); entity.invunit = row.IsNull("invunit") ? string.Empty : row.Field <string>("invunit"); entity.lastcostupdtfl = row.Field <bool>("lastcostupdtfl"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.podoshipdt = row.Field <DateTime?>("podoshipdt"); entity.polnseqno = row.IsNull("polnseqno") ? 0 : row.Field <int>("polnseqno"); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.pounit = row.IsNull("pounit") ? string.Empty : row.Field <string>("pounit"); entity.proctype = row.IsNull("proctype") ? string.Empty : row.Field <string>("proctype"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.proddesc2 = row.IsNull("proddesc2") ? string.Empty : row.Field <string>("proddesc2"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.qtyrcv = row.IsNull("qtyrcv") ? decimal.Zero : row.Field <decimal>("qtyrcv"); entity.receiverno = row.IsNull("receiverno") ? string.Empty : row.Field <string>("receiverno"); entity.reconoverfl = row.Field <bool>("reconoverfl"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.statustype = row.Field <bool>("statustype"); entity.unitconv = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv"); entity.updatefl = row.Field <bool>("updatefl"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendprod = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.closeflenabled = row.Field <bool>("closeflenabled"); entity.costenabled = row.Field <bool>("costenabled"); entity.costordenabled = row.Field <bool>("costordenabled"); entity.lstcstupdtenabled = row.Field <bool>("lstcstupdtenabled"); entity.linenoenabled = row.Field <bool>("linenoenabled"); entity.manualaddonenabled = row.Field <bool>("manualaddonenabled"); entity.perunitenabled = row.Field <bool>("perunitenabled"); entity.ponoenabled = row.Field <bool>("ponoenabled"); entity.posufenabled = row.Field <bool>("posufenabled"); entity.proddescenabled = row.Field <bool>("proddescenabled"); entity.proddesc2enabled = row.Field <bool>("proddesc2enabled"); entity.qtyordenabled = row.Field <bool>("qtyordenabled"); entity.reconoverflenabled = row.Field <bool>("reconoverflenabled"); entity.shipprodenabled = row.Field <bool>("shipprodenabled"); entity.tallyenabled = row.Field <bool>("tallyenabled"); entity.vendprodenabled = row.Field <bool>("vendprodenabled"); entity.perunithidden = row.Field <bool>("perunithidden"); entity.tallyhidden = row.Field <bool>("tallyhidden"); entity.origcost = row.IsNull("origcost") ? decimal.Zero : row.Field <decimal>("origcost"); entity.origlineno = row.IsNull("origlineno") ? 0 : row.Field <int>("origlineno"); entity.origpono = row.IsNull("origpono") ? 0 : row.Field <int>("origpono"); entity.origposuf = row.IsNull("origposuf") ? 0 : row.Field <int>("origposuf"); entity.origqtyord = row.IsNull("origqtyord") ? decimal.Zero : row.Field <decimal>("origqtyord"); entity.origprod = row.IsNull("origprod") ? string.Empty : row.Field <string>("origprod"); entity.apeidRowid = row.Field <byte[]>("apeid-rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }