Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVasplinelistresults(ref DataRow row, Vasplinelistresults entity)
 {
     row.SetField("shipprod", entity.shipprod);
     row.SetField("whse", entity.whse);
     row.SetField("seqno", entity.seqno);
     row.SetField("arpprodline", entity.arpprodline);
     row.SetField("arpvendno", entity.arpvendno);
     row.SetField("arpwhse", entity.arpwhse);
     row.SetField("availqtydspl", entity.availqtydspl);
     row.SetField("cubes", entity.cubes);
     row.SetField("cutofflength", entity.cutofflength);
     row.SetField("cutoffty", entity.cutoffty);
     row.SetField("dspldesc", entity.dspldesc);
     row.SetField("hours", entity.hours);
     row.SetField("icspecrecno", entity.icspecrecno);
     row.SetField("icspstatus", entity.icspstatus);
     row.SetField("labordata", entity.labordata);
     row.SetField("laborflatrtfl", entity.laborflatrtfl);
     row.SetField("labortype", entity.labortype);
     row.SetField("laborunits", entity.laborunits);
     row.SetField("lgthcompfl", entity.lgthcompfl);
     row.SetField("lineno", entity.lineno);
     row.SetField("maxlaborcalcqty", entity.maxlaborcalcqty);
     row.SetField("minutes", entity.minutes);
     row.SetField("netavail", entity.netavail);
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("prodcost", entity.prodcost);
     row.SetField("prodcostdspl", entity.prodcostdspl);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("proddesc2", entity.proddesc2);
     row.SetField("qtybasetotfl", entity.qtybasetotfl);
     row.SetField("qtyneeded", entity.qtyneeded);
     row.SetField("rushfl", entity.rushfl);
     row.SetField("scrapfctr", entity.scrapfctr);
     row.SetField("sctntype", entity.sctntype);
     row.SetField("stkqtyneed", entity.stkqtyneed);
     row.SetField("timeactty", entity.timeactty);
     row.SetField("timecomment", entity.timecomment);
     row.SetField("timeelapsed", entity.timeelapsed);
     row.SetField("timeslsrep", entity.timeslsrep);
     row.SetField("timeworkdt", entity.timeworkdt);
     row.SetField("unit", entity.unit);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("usagefl", entity.usagefl);
     row.SetField("vafabfl", entity.vafabfl);
     row.SetField("vaprod", entity.vaprod);
     row.SetField("vawhse", entity.vawhse);
     row.SetField("vaverno", entity.vaverno);
     row.SetField("weight", entity.weight);
     row.SetField("leadtm", entity.leadtm);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("brandcode", entity.brandcode);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Vasplinelistresults BuildVasplinelistresultsFromRow(DataRow row)
        {
            Vasplinelistresults entity = new Vasplinelistresults();

            entity.shipprod        = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.seqno           = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.arpprodline     = row.IsNull("arpprodline") ? string.Empty : row.Field <string>("arpprodline");
            entity.arpvendno       = row.IsNull("arpvendno") ? decimal.Zero : row.Field <decimal>("arpvendno");
            entity.arpwhse         = row.IsNull("arpwhse") ? string.Empty : row.Field <string>("arpwhse");
            entity.availqtydspl    = row.IsNull("availqtydspl") ? string.Empty : row.Field <string>("availqtydspl");
            entity.cubes           = row.IsNull("cubes") ? decimal.Zero : row.Field <decimal>("cubes");
            entity.cutofflength    = row.IsNull("cutofflength") ? decimal.Zero : row.Field <decimal>("cutofflength");
            entity.cutoffty        = row.IsNull("cutoffty") ? string.Empty : row.Field <string>("cutoffty");
            entity.dspldesc        = row.IsNull("dspldesc") ? string.Empty : row.Field <string>("dspldesc");
            entity.hours           = row.IsNull("hours") ? 0 : row.Field <int>("hours");
            entity.icspecrecno     = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno");
            entity.icspstatus      = row.IsNull("icspstatus") ? string.Empty : row.Field <string>("icspstatus");
            entity.labordata       = row.IsNull("labordata") ? string.Empty : row.Field <string>("labordata");
            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.lgthcompfl      = row.Field <bool>("lgthcompfl");
            entity.lineno          = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.maxlaborcalcqty = row.IsNull("maxlaborcalcqty") ? 0 : row.Field <int>("maxlaborcalcqty");
            entity.minutes         = row.IsNull("minutes") ? 0 : row.Field <int>("minutes");
            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.prodcat         = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.prodcost        = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost");
            entity.prodcostdspl    = row.IsNull("prodcostdspl") ? string.Empty : row.Field <string>("prodcostdspl");
            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.rushfl          = row.Field <bool>("rushfl");
            entity.scrapfctr       = row.IsNull("scrapfctr") ? decimal.Zero : row.Field <decimal>("scrapfctr");
            entity.sctntype        = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype");
            entity.stkqtyneed      = row.IsNull("stkqtyneed") ? decimal.Zero : row.Field <decimal>("stkqtyneed");
            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.timeslsrep      = row.IsNull("timeslsrep") ? string.Empty : row.Field <string>("timeslsrep");
            entity.timeworkdt      = row.Field <DateTime?>("timeworkdt");
            entity.unit            = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.unitconv        = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.usagefl         = row.Field <bool>("usagefl");
            entity.vafabfl         = row.Field <bool>("vafabfl");
            entity.vaprod          = row.IsNull("vaprod") ? string.Empty : row.Field <string>("vaprod");
            entity.vawhse          = row.IsNull("vawhse") ? string.Empty : row.Field <string>("vawhse");
            entity.vaverno         = row.IsNull("vaverno") ? 0 : row.Field <int>("vaverno");
            entity.weight          = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.leadtm          = row.IsNull("leadtm") ? 0 : row.Field <int>("leadtm");
            entity.rowid           = row.Field <byte[]>("rowid").ToStringEncoded();
            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.msdsfl          = row.Field <bool>("msdsfl");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }