public static Vaeubuildvalistresults BuildVaeubuildvalistresultsFromRow(DataRow row) { Vaeubuildvalistresults entity = new Vaeubuildvalistresults(); entity.vano = row.IsNull("vano") ? 0 : row.Field <int>("vano"); entity.vasuf = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf"); entity.cVANotes = row.IsNull("cVANotes") ? string.Empty : row.Field <string>("cVANotes"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.stagecdx = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.nonstockty = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.verno = row.IsNull("verno") ? 0 : row.Field <int>("verno"); entity.cProdNotes = row.IsNull("cProdNotes") ? string.Empty : row.Field <string>("cProdNotes"); entity.cProdDesc = row.IsNull("cProdDesc") ? string.Empty : row.Field <string>("cProdDesc"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.qtyship = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.enterdt = row.Field <DateTime?>("enterdt"); entity.reqshipdt = row.Field <DateTime?>("reqshipdt"); entity.promisedt = row.Field <DateTime?>("promisedt"); entity.estcompdt = row.Field <DateTime?>("estcompdt"); entity.ordertypedspl = row.IsNull("ordertypedspl") ? string.Empty : row.Field <string>("ordertypedspl"); entity.orderaltno = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno"); entity.ordercustno = row.IsNull("ordercustno") ? decimal.Zero : row.Field <decimal>("ordercustno"); entity.custnotesfl = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl"); entity.ordercustpo = row.IsNull("ordercustpo") ? string.Empty : row.Field <string>("ordercustpo"); entity.takenby = row.IsNull("takenby") ? string.Empty : row.Field <string>("takenby"); entity.estcost = row.IsNull("estcost") ? decimal.Zero : row.Field <decimal>("estcost"); entity.availtobuild = row.IsNull("availtobuild") ? decimal.Zero : row.Field <decimal>("availtobuild"); entity.alreadybuilt = row.IsNull("alreadybuilt") ? decimal.Zero : row.Field <decimal>("alreadybuilt"); entity.pndaddons = row.IsNull("pndaddons") ? decimal.Zero : row.Field <decimal>("pndaddons"); entity.pndextrnamt = row.IsNull("pndextrnamt") ? decimal.Zero : row.Field <decimal>("pndextrnamt"); entity.pndintrnamt = row.IsNull("pndintrnamt") ? decimal.Zero : row.Field <decimal>("pndintrnamt"); entity.pndintrnest = row.IsNull("pndintrnest") ? decimal.Zero : row.Field <decimal>("pndintrnest"); entity.pndinvamt = row.IsNull("pndinvamt") ? decimal.Zero : row.Field <decimal>("pndinvamt"); entity.pndinvinamt = row.IsNull("pndinvinamt") ? decimal.Zero : row.Field <decimal>("pndinvinamt"); entity.origcost = row.IsNull("origcost") ? decimal.Zero : row.Field <decimal>("origcost"); entity.newpndaddons = row.IsNull("newpndaddons") ? decimal.Zero : row.Field <decimal>("newpndaddons"); entity.newpndextrnamt = row.IsNull("newpndextrnamt") ? decimal.Zero : row.Field <decimal>("newpndextrnamt"); entity.newpndintrnamt = row.IsNull("newpndintrnamt") ? decimal.Zero : row.Field <decimal>("newpndintrnamt"); entity.newpndintrnest = row.IsNull("newpndintrnest") ? decimal.Zero : row.Field <decimal>("newpndintrnest"); entity.newpndinvamt = row.IsNull("newpndinvamt") ? decimal.Zero : row.Field <decimal>("newpndinvamt"); entity.newpndinvinamt = row.IsNull("newpndinvinamt") ? decimal.Zero : row.Field <decimal>("newpndinvinamt"); entity.newvercost = row.IsNull("newvercost") ? decimal.Zero : row.Field <decimal>("newvercost"); entity.withintolerance = row.Field <bool>("withintolerance"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVaeubuildvalistresults(ref DataRow row, Vaeubuildvalistresults entity) { row.SetField("vano", entity.vano); row.SetField("vasuf", entity.vasuf); row.SetField("cVANotes", entity.cVANotes); row.SetField("transtype", entity.transtype); row.SetField("stagecdx", entity.stagecdx); row.SetField("whse", entity.whse); row.SetField("nonstockty", entity.nonstockty); row.SetField("shipprod", entity.shipprod); row.SetField("verno", entity.verno); row.SetField("cProdNotes", entity.cProdNotes); row.SetField("cProdDesc", entity.cProdDesc); row.SetField("qtyord", entity.qtyord); row.SetField("qtyship", entity.qtyship); row.SetField("unit", entity.unit); row.SetField("enterdt", entity.enterdt); row.SetField("reqshipdt", entity.reqshipdt); row.SetField("promisedt", entity.promisedt); row.SetField("estcompdt", entity.estcompdt); row.SetField("ordertypedspl", entity.ordertypedspl); row.SetField("orderaltno", entity.orderaltno); row.SetField("ordercustno", entity.ordercustno); row.SetField("custnotesfl", entity.custnotesfl); row.SetField("ordercustpo", entity.ordercustpo); row.SetField("takenby", entity.takenby); row.SetField("estcost", entity.estcost); row.SetField("availtobuild", entity.availtobuild); row.SetField("alreadybuilt", entity.alreadybuilt); row.SetField("pndaddons", entity.pndaddons); row.SetField("pndextrnamt", entity.pndextrnamt); row.SetField("pndintrnamt", entity.pndintrnamt); row.SetField("pndintrnest", entity.pndintrnest); row.SetField("pndinvamt", entity.pndinvamt); row.SetField("pndinvinamt", entity.pndinvinamt); row.SetField("origcost", entity.origcost); row.SetField("newpndaddons", entity.newpndaddons); row.SetField("newpndextrnamt", entity.newpndextrnamt); row.SetField("newpndintrnamt", entity.newpndintrnamt); row.SetField("newpndintrnest", entity.newpndintrnest); row.SetField("newpndinvamt", entity.newpndinvamt); row.SetField("newpndinvinamt", entity.newpndinvinamt); row.SetField("newvercost", entity.newvercost); row.SetField("withintolerance", entity.withintolerance); row.SetField("userfield", entity.userfield); }