Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVasplinechange(ref DataRow row, Vasplinechange 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("cubes", entity.cubes);
     row.SetField("cutofflength", entity.cutofflength);
     row.SetField("cutoffty", entity.cutoffty);
     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("prodcat", entity.prodcat);
     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("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("updatelaborty", entity.updatelaborty);
     row.SetField("usagefl", entity.usagefl);
     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("xrefcatflasked", entity.xrefcatflasked);
     row.SetField("xrefcatflanswer", entity.xrefcatflanswer);
     row.SetField("promptedxreflookup", entity.promptedxreflookup);
     row.SetField("xreflookupoutprod", entity.xreflookupoutprod);
     row.SetField("xreflookupouttype", entity.xreflookupouttype);
     row.SetField("createcatflasked", entity.createcatflasked);
     row.SetField("createcatflanswer", entity.createcatflanswer);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Vasplinechange BuildVasplinechangeFromRow(DataRow row)
        {
            Vasplinechange entity = new Vasplinechange();

            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.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.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.prodcat            = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            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.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.updatelaborty      = row.IsNull("updatelaborty") ? string.Empty : row.Field <string>("updatelaborty");
            entity.usagefl            = row.Field <bool>("usagefl");
            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.xrefcatflasked     = row.Field <bool>("xrefcatflasked");
            entity.xrefcatflanswer    = row.Field <bool>("xrefcatflanswer");
            entity.promptedxreflookup = row.Field <bool>("promptedxreflookup");
            entity.xreflookupoutprod  = row.IsNull("xreflookupoutprod") ? string.Empty : row.Field <string>("xreflookupoutprod");
            entity.xreflookupouttype  = row.IsNull("xreflookupouttype") ? string.Empty : row.Field <string>("xreflookupouttype");
            entity.createcatflasked   = row.Field <bool>("createcatflasked");
            entity.createcatflanswer  = row.Field <bool>("createcatflanswer");
            entity.rowid              = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }