コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIciafetchprodresults(ref DataRow row, Iciafetchprodresults entity)
 {
     row.SetField("descrip", entity.descrip);
     row.SetField("xrefnote1", entity.xrefnote1);
     row.SetField("xrefnote2", entity.xrefnote2);
     row.SetField("xrefnote3", entity.xrefnote3);
     row.SetField("invavaildays", entity.invavaildays);
     row.SetField("qtyonorder", entity.qtyonorder);
     row.SetField("kitnote", entity.kitnote);
     row.SetField("qtyonhand", entity.qtyonhand);
     row.SetField("qtyreceived", entity.qtyreceived);
     row.SetField("production", entity.production);
     row.SetField("qtybackord", entity.qtybackord);
     row.SetField("qtyreserved", entity.qtyreserved);
     row.SetField("productiondt", entity.productiondt);
     row.SetField("qtydemand", entity.qtydemand);
     row.SetField("qtycommitted", entity.qtycommitted);
     row.SetField("intransit", entity.intransit);
     row.SetField("arriveddt", entity.arriveddt);
     row.SetField("qtyfuture", entity.qtyfuture);
     row.SetField("qtynow", entity.qtynow);
     row.SetField("atdock", entity.atdock);
     row.SetField("custonhand", entity.custonhand);
     row.SetField("custonorder", entity.custonorder);
     row.SetField("atdockdt", entity.atdockdt);
     row.SetField("atwhse", entity.atwhse);
     row.SetField("binloc1", entity.binloc1);
     row.SetField("buyer", entity.buyer);
     row.SetField("reservety", entity.reservety);
     row.SetField("unldt", entity.unldt);
     row.SetField("binloc2", entity.binloc2);
     row.SetField("cstatus", entity.cstatus);
     row.SetField("reservedays", entity.reservedays);
     row.SetField("lastpowtdt", entity.lastpowtdt);
     row.SetField("lastinvdt", entity.lastinvdt);
     row.SetField("laststockout", entity.laststockout);
     row.SetField("lastrcptdt", entity.lastrcptdt);
     row.SetField("lastcntdt", entity.lastcntdt);
     row.SetField("daysout", entity.daysout);
     row.SetField("altnote", entity.altnote);
     row.SetField("leadtmavg", entity.leadtmavg);
     row.SetField("timesout", entity.timesout);
     row.SetField("optnote", entity.optnote);
     row.SetField("nextreceipt", entity.nextreceipt);
     row.SetField("nextqty", entity.nextqty);
     row.SetField("nextunit", entity.nextunit);
     row.SetField("prereceived", entity.prereceived);
     row.SetField("lblpo", entity.lblpo);
     row.SetField("invavaildayshidden", entity.invavaildayshidden);
     row.SetField("unit", entity.unit);
     row.SetField("warningmsg", entity.warningmsg);
     row.SetField("descrip3", entity.descrip3);
     row.SetField("brandcode", entity.brandcode);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("custreservefoundfl", entity.custreservefoundfl);
     row.SetField("custreserveqtyshort", entity.custreserveqtyshort);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Iciafetchprodresults BuildIciafetchprodresultsFromRow(DataRow row)
        {
            Iciafetchprodresults entity = new Iciafetchprodresults();

            entity.descrip            = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.xrefnote1          = row.IsNull("xrefnote1") ? string.Empty : row.Field <string>("xrefnote1");
            entity.xrefnote2          = row.IsNull("xrefnote2") ? string.Empty : row.Field <string>("xrefnote2");
            entity.xrefnote3          = row.IsNull("xrefnote3") ? string.Empty : row.Field <string>("xrefnote3");
            entity.invavaildays       = row.IsNull("invavaildays") ? decimal.Zero : row.Field <decimal>("invavaildays");
            entity.qtyonorder         = row.IsNull("qtyonorder") ? decimal.Zero : row.Field <decimal>("qtyonorder");
            entity.kitnote            = row.IsNull("kitnote") ? string.Empty : row.Field <string>("kitnote");
            entity.qtyonhand          = row.IsNull("qtyonhand") ? decimal.Zero : row.Field <decimal>("qtyonhand");
            entity.qtyreceived        = row.IsNull("qtyreceived") ? decimal.Zero : row.Field <decimal>("qtyreceived");
            entity.production         = row.IsNull("production") ? decimal.Zero : row.Field <decimal>("production");
            entity.qtybackord         = row.IsNull("qtybackord") ? decimal.Zero : row.Field <decimal>("qtybackord");
            entity.qtyreserved        = row.IsNull("qtyreserved") ? decimal.Zero : row.Field <decimal>("qtyreserved");
            entity.productiondt       = row.Field <DateTime?>("productiondt");
            entity.qtydemand          = row.IsNull("qtydemand") ? decimal.Zero : row.Field <decimal>("qtydemand");
            entity.qtycommitted       = row.IsNull("qtycommitted") ? decimal.Zero : row.Field <decimal>("qtycommitted");
            entity.intransit          = row.IsNull("intransit") ? decimal.Zero : row.Field <decimal>("intransit");
            entity.arriveddt          = row.Field <DateTime?>("arriveddt");
            entity.qtyfuture          = row.IsNull("qtyfuture") ? decimal.Zero : row.Field <decimal>("qtyfuture");
            entity.qtynow             = row.IsNull("qtynow") ? decimal.Zero : row.Field <decimal>("qtynow");
            entity.atdock             = row.IsNull("atdock") ? decimal.Zero : row.Field <decimal>("atdock");
            entity.custonhand         = row.IsNull("custonhand") ? decimal.Zero : row.Field <decimal>("custonhand");
            entity.custonorder        = row.IsNull("custonorder") ? decimal.Zero : row.Field <decimal>("custonorder");
            entity.atdockdt           = row.Field <DateTime?>("atdockdt");
            entity.atwhse             = row.IsNull("atwhse") ? decimal.Zero : row.Field <decimal>("atwhse");
            entity.binloc1            = row.IsNull("binloc1") ? string.Empty : row.Field <string>("binloc1");
            entity.buyer              = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer");
            entity.reservety          = row.IsNull("reservety") ? string.Empty : row.Field <string>("reservety");
            entity.unldt              = row.Field <DateTime?>("unldt");
            entity.binloc2            = row.IsNull("binloc2") ? string.Empty : row.Field <string>("binloc2");
            entity.cstatus            = row.IsNull("cstatus") ? string.Empty : row.Field <string>("cstatus");
            entity.reservedays        = row.IsNull("reservedays") ? 0 : row.Field <int>("reservedays");
            entity.lastpowtdt         = row.Field <DateTime?>("lastpowtdt");
            entity.lastinvdt          = row.Field <DateTime?>("lastinvdt");
            entity.laststockout       = row.Field <DateTime?>("laststockout");
            entity.lastrcptdt         = row.Field <DateTime?>("lastrcptdt");
            entity.lastcntdt          = row.Field <DateTime?>("lastcntdt");
            entity.daysout            = row.IsNull("daysout") ? 0 : row.Field <int>("daysout");
            entity.altnote            = row.IsNull("altnote") ? string.Empty : row.Field <string>("altnote");
            entity.leadtmavg          = row.IsNull("leadtmavg") ? 0 : row.Field <int>("leadtmavg");
            entity.timesout           = row.IsNull("timesout") ? 0 : row.Field <int>("timesout");
            entity.optnote            = row.IsNull("optnote") ? string.Empty : row.Field <string>("optnote");
            entity.nextreceipt        = row.Field <DateTime?>("nextreceipt");
            entity.nextqty            = row.IsNull("nextqty") ? decimal.Zero : row.Field <decimal>("nextqty");
            entity.nextunit           = row.IsNull("nextunit") ? string.Empty : row.Field <string>("nextunit");
            entity.prereceived        = row.IsNull("prereceived") ? string.Empty : row.Field <string>("prereceived");
            entity.lblpo              = row.IsNull("lblpo") ? string.Empty : row.Field <string>("lblpo");
            entity.invavaildayshidden = row.Field <bool>("invavaildayshidden");
            entity.unit                = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.warningmsg          = row.IsNull("warningmsg") ? string.Empty : row.Field <string>("warningmsg");
            entity.descrip3            = row.IsNull("descrip3") ? string.Empty : row.Field <string>("descrip3");
            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.custreservefoundfl  = row.Field <bool>("custreservefoundfl");
            entity.custreserveqtyshort = row.IsNull("custreserveqtyshort") ? decimal.Zero : row.Field <decimal>("custreserveqtyshort");
            entity.userfield           = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }