/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVaheaderallcomponent(ref DataRow row, Vaheaderallcomponent entity) { row.SetField("commentfl", entity.commentfl); row.SetField("icspstatus", entity.icspstatus); row.SetField("laborflatrtfl", entity.laborflatrtfl); row.SetField("labortype", entity.labortype); row.SetField("laborunits", entity.laborunits); row.SetField("leadtm", entity.leadtm); row.SetField("lineno", entity.lineno); row.SetField("netavail", entity.netavail); row.SetField("nonstockty", entity.nonstockty); row.SetField("notesfl", entity.notesfl); row.SetField("prodcost", entity.prodcost); row.SetField("proddesc", entity.proddesc); row.SetField("proddesc2", entity.proddesc2); row.SetField("qtybasetotfl", entity.qtybasetotfl); row.SetField("qtyneeded", entity.qtyneeded); row.SetField("qtyshort", entity.qtyshort); row.SetField("sctncode", entity.sctncode); row.SetField("sctndesc", entity.sctndesc); row.SetField("sctntype", entity.sctntype); row.SetField("seqno", entity.seqno); row.SetField("shipprod", entity.shipprod); row.SetField("vano", entity.vano); row.SetField("vaprod", entity.vaprod); row.SetField("vasuf", entity.vasuf); row.SetField("vawhse", entity.vawhse); row.SetField("unit", entity.unit); row.SetField("unitconv", entity.unitconv); row.SetField("whse", entity.whse); row.SetField("availqtydspl", entity.availqtydspl); row.SetField("boseqno", entity.boseqno); row.SetField("cancelty", entity.cancelty); row.SetField("completefl", entity.completefl); row.SetField("cSctnNotes", entity.cSctnNotes); row.SetField("cutoffty", entity.cutoffty); row.SetField("cVANotes", entity.cVANotes); row.SetField("directfl", entity.directfl); row.SetField("dispavailfl", entity.dispavailfl); row.SetField("dispqtyneedfl", entity.dispqtyneedfl); row.SetField("hours", entity.hours); row.SetField("icspecrecno", entity.icspecrecno); row.SetField("labordata", entity.labordata); row.SetField("lgthcompfl", entity.lgthcompfl); row.SetField("linealtno", entity.linealtno); row.SetField("maxlaborcalcqty", entity.maxlaborcalcqty); row.SetField("minutes", entity.minutes); row.SetField("netamt", entity.netamt); row.SetField("netamtdspl", entity.netamtdspl); row.SetField("orderaltno", entity.orderaltno); row.SetField("orderalttype", entity.orderalttype); row.SetField("orderduedt", entity.orderduedt); row.SetField("ordertype", entity.ordertype); row.SetField("ordertypedspl", entity.ordertypedspl); row.SetField("prodcostdspl", entity.prodcostdspl); row.SetField("qtyord", entity.qtyord); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("scrapfctr", entity.scrapfctr); row.SetField("serlotoverfl", entity.serlotoverfl); row.SetField("serlottype", entity.serlottype); row.SetField("statustype", entity.statustype); row.SetField("stkqtyneed", entity.stkqtyneed); row.SetField("stkqtyord", entity.stkqtyord); row.SetField("timeactty", entity.timeactty); row.SetField("timecomment", entity.timecomment); row.SetField("timeelapsed", entity.timeelapsed); row.SetField("timeelapseddspl", entity.timeelapseddspl); row.SetField("timeslsrep", entity.timeslsrep); row.SetField("timeworkdt", entity.timeworkdt); row.SetField("usagefl", entity.usagefl); row.SetField("brandcode", entity.brandcode); row.SetField("mfgprod", entity.mfgprod); row.SetField("vendprod", entity.vendprod); row.SetField("userfield", entity.userfield); }
public static Vaheaderallcomponent BuildVaheaderallcomponentFromRow(DataRow row) { Vaheaderallcomponent entity = new Vaheaderallcomponent(); entity.commentfl = row.Field <bool>("commentfl"); entity.icspstatus = row.IsNull("icspstatus") ? string.Empty : row.Field <string>("icspstatus"); entity.laborflatrtfl = row.Field <bool>("laborflatrtfl"); entity.labortype = row.IsNull("labortype") ? string.Empty : row.Field <string>("labortype"); entity.laborunits = row.IsNull("laborunits") ? decimal.Zero : row.Field <decimal>("laborunits"); entity.leadtm = row.IsNull("leadtm") ? 0 : row.Field <int>("leadtm"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.netavail = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail"); entity.nonstockty = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.prodcost = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.proddesc2 = row.IsNull("proddesc2") ? string.Empty : row.Field <string>("proddesc2"); entity.qtybasetotfl = row.Field <bool>("qtybasetotfl"); entity.qtyneeded = row.IsNull("qtyneeded") ? decimal.Zero : row.Field <decimal>("qtyneeded"); entity.qtyshort = row.IsNull("qtyshort") ? decimal.Zero : row.Field <decimal>("qtyshort"); entity.sctncode = row.IsNull("sctncode") ? string.Empty : row.Field <string>("sctncode"); entity.sctndesc = row.IsNull("sctndesc") ? string.Empty : row.Field <string>("sctndesc"); entity.sctntype = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.vano = row.IsNull("vano") ? 0 : row.Field <int>("vano"); entity.vaprod = row.IsNull("vaprod") ? string.Empty : row.Field <string>("vaprod"); entity.vasuf = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf"); entity.vawhse = row.IsNull("vawhse") ? string.Empty : row.Field <string>("vawhse"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.unitconv = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.availqtydspl = row.IsNull("availqtydspl") ? string.Empty : row.Field <string>("availqtydspl"); entity.boseqno = row.IsNull("boseqno") ? 0 : row.Field <int>("boseqno"); entity.cancelty = row.IsNull("cancelty") ? string.Empty : row.Field <string>("cancelty"); entity.completefl = row.Field <bool>("completefl"); entity.cSctnNotes = row.IsNull("cSctnNotes") ? string.Empty : row.Field <string>("cSctnNotes"); entity.cutoffty = row.IsNull("cutoffty") ? string.Empty : row.Field <string>("cutoffty"); entity.cVANotes = row.IsNull("cVANotes") ? string.Empty : row.Field <string>("cVANotes"); entity.directfl = row.Field <bool>("directfl"); entity.dispavailfl = row.Field <bool>("dispavailfl"); entity.dispqtyneedfl = row.Field <bool>("dispqtyneedfl"); entity.hours = row.IsNull("hours") ? 0 : row.Field <int>("hours"); entity.icspecrecno = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno"); entity.labordata = row.IsNull("labordata") ? string.Empty : row.Field <string>("labordata"); entity.lgthcompfl = row.Field <bool>("lgthcompfl"); entity.linealtno = row.IsNull("linealtno") ? 0 : row.Field <int>("linealtno"); entity.maxlaborcalcqty = row.IsNull("maxlaborcalcqty") ? 0 : row.Field <int>("maxlaborcalcqty"); entity.minutes = row.IsNull("minutes") ? 0 : row.Field <int>("minutes"); entity.netamt = row.IsNull("netamt") ? decimal.Zero : row.Field <decimal>("netamt"); entity.netamtdspl = row.IsNull("netamtdspl") ? string.Empty : row.Field <string>("netamtdspl"); entity.orderaltno = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno"); entity.orderalttype = row.IsNull("orderalttype") ? string.Empty : row.Field <string>("orderalttype"); entity.orderduedt = row.Field <DateTime?>("orderduedt"); entity.ordertype = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype"); entity.ordertypedspl = row.IsNull("ordertypedspl") ? string.Empty : row.Field <string>("ordertypedspl"); entity.prodcostdspl = row.IsNull("prodcostdspl") ? string.Empty : row.Field <string>("prodcostdspl"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); entity.scrapfctr = row.IsNull("scrapfctr") ? decimal.Zero : row.Field <decimal>("scrapfctr"); entity.serlotoverfl = row.Field <bool>("serlotoverfl"); entity.serlottype = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype"); entity.statustype = row.Field <bool>("statustype"); entity.stkqtyneed = row.IsNull("stkqtyneed") ? decimal.Zero : row.Field <decimal>("stkqtyneed"); entity.stkqtyord = row.IsNull("stkqtyord") ? decimal.Zero : row.Field <decimal>("stkqtyord"); entity.timeactty = row.IsNull("timeactty") ? string.Empty : row.Field <string>("timeactty"); entity.timecomment = row.IsNull("timecomment") ? string.Empty : row.Field <string>("timecomment"); entity.timeelapsed = row.IsNull("timeelapsed") ? 0 : row.Field <int>("timeelapsed"); entity.timeelapseddspl = row.IsNull("timeelapseddspl") ? string.Empty : row.Field <string>("timeelapseddspl"); entity.timeslsrep = row.IsNull("timeslsrep") ? string.Empty : row.Field <string>("timeslsrep"); entity.timeworkdt = row.Field <DateTime?>("timeworkdt"); entity.usagefl = row.Field <bool>("usagefl"); 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.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }