public static Vaifbuildvahdrlistresults BuildVaifbuildvahdrlistresultsFromRow(DataRow row) { Vaifbuildvahdrlistresults entity = new Vaifbuildvahdrlistresults(); entity.vano = row.IsNull("vano") ? 0 : row.Field <int>("vano"); entity.vasuf = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.verno = row.IsNull("verno") ? 0 : row.Field <int>("verno"); 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.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.vacfgfl = row.Field <bool>("vacfgfl"); entity.pndintrnestamt = row.IsNull("pndintrnestamt") ? decimal.Zero : row.Field <decimal>("pndintrnestamt"); entity.pndintrnestsecs = row.IsNull("pndintrnestsecs") ? 0 : row.Field <int>("pndintrnestsecs"); entity.pndintrnesthrs = row.IsNull("pndintrnesthrs") ? string.Empty : row.Field <string>("pndintrnesthrs"); entity.pndintrnactamt = row.IsNull("pndintrnactamt") ? decimal.Zero : row.Field <decimal>("pndintrnactamt"); entity.pndintrnactsecs = row.IsNull("pndintrnactsecs") ? 0 : row.Field <int>("pndintrnactsecs"); entity.pndintrnacthrs = row.IsNull("pndintrnacthrs") ? string.Empty : row.Field <string>("pndintrnacthrs"); 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.msdsfl = row.Field <bool>("msdsfl"); entity.lockinfo = row.IsNull("lockinfo") ? string.Empty : row.Field <string>("lockinfo"); 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 UpdateRowFromVaifbuildvahdrlistresults(ref DataRow row, Vaifbuildvahdrlistresults entity) { row.SetField("vano", entity.vano); row.SetField("vasuf", entity.vasuf); row.SetField("shipprod", entity.shipprod); row.SetField("verno", entity.verno); 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("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("vacfgfl", entity.vacfgfl); row.SetField("pndintrnestamt", entity.pndintrnestamt); row.SetField("pndintrnestsecs", entity.pndintrnestsecs); row.SetField("pndintrnesthrs", entity.pndintrnesthrs); row.SetField("pndintrnactamt", entity.pndintrnactamt); row.SetField("pndintrnactsecs", entity.pndintrnactsecs); row.SetField("pndintrnacthrs", entity.pndintrnacthrs); row.SetField("estcost", entity.estcost); row.SetField("availtobuild", entity.availtobuild); row.SetField("alreadybuilt", entity.alreadybuilt); row.SetField("msdsfl", entity.msdsfl); row.SetField("lockinfo", entity.lockinfo); row.SetField("userfield", entity.userfield); }