Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinepricingresults(ref DataRow row, Oelinepricingresults entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("unit", entity.unit);
     row.SetField("price", entity.price);
     row.SetField("netamt", entity.netamt);
     row.SetField("netavail", entity.netavail);
     row.SetField("baseprice", entity.baseprice);
     row.SetField("listprice", entity.listprice);
     row.SetField("useprod", entity.useprod);
     row.SetField("usetype", entity.usetype);
     row.SetField("statustype", entity.statustype);
     row.SetField("serlottype", entity.serlottype);
     row.SetField("reservety", entity.reservety);
     row.SetField("reservedays", entity.reservedays);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("pricetypedesc", entity.pricetypedesc);
     row.SetField("prodline", entity.prodline);
     row.SetField("arptype", entity.arptype);
     row.SetField("arpvendno", entity.arpvendno);
     row.SetField("arpwhse", entity.arpwhse);
     row.SetField("binloc1", entity.binloc1);
     row.SetField("binloc2", entity.binloc2);
     row.SetField("leadtmavg", entity.leadtmavg);
     row.SetField("arppushfl", entity.arppushfl);
     row.SetField("bintype", entity.bintype);
     row.SetField("boshortfl", entity.boshortfl);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("famgrptype", entity.famgrptype);
     row.SetField("frtextra1", entity.frtextra1);
     row.SetField("frtextra2", entity.frtextra2);
     row.SetField("frtfreefl", entity.frtfreefl);
     row.SetField("lastpowtdt", entity.lastpowtdt);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("errormess", entity.errormess);
     row.SetField("lineid", entity.lineid);
     row.SetField("dsplnetavail", entity.dsplnetavail);
     row.SetField("marginamt", entity.marginamt);
     row.SetField("marginpct", entity.marginpct);
     row.SetField("nonstandprodcheckfl", entity.nonstandprodcheckfl);
     row.SetField("kitfl", entity.kitfl);
     row.SetField("tallyfl", entity.tallyfl);
     row.SetField("serialfl", entity.serialfl);
     row.SetField("lotfl", entity.lotfl);
     row.SetField("remancorefl", entity.remancorefl);
     row.SetField("impliedcorefl", entity.impliedcorefl);
     row.SetField("dirtycorefl", entity.dirtycorefl);
     row.SetField("eccnfl", entity.eccnfl);
     row.SetField("dnrfl", entity.dnrfl);
     row.SetField("assemblyfl", entity.assemblyfl);
     row.SetField("supersededfl", entity.supersededfl);
     row.SetField("substitutefl", entity.substitutefl);
     row.SetField("promopricefl", entity.promopricefl);
     row.SetField("prodrestrictfl", entity.prodrestrictfl);
     row.SetField("prodrestrictmessage", entity.prodrestrictmessage);
     row.SetField("specpricecostfl", entity.specpricecostfl);
     row.SetField("inactivefl", entity.inactivefl);
 }
Пример #2
0
        public static Oelinepricingresults BuildOelinepricingresultsFromRow(DataRow row)
        {
            Oelinepricingresults entity = new Oelinepricingresults();

            entity.custno              = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto              = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.whse                = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod                = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.qtyord              = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.unit                = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.price               = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.netamt              = row.IsNull("netamt") ? decimal.Zero : row.Field <decimal>("netamt");
            entity.netavail            = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail");
            entity.baseprice           = row.IsNull("baseprice") ? decimal.Zero : row.Field <decimal>("baseprice");
            entity.listprice           = row.IsNull("listprice") ? decimal.Zero : row.Field <decimal>("listprice");
            entity.useprod             = row.IsNull("useprod") ? string.Empty : row.Field <string>("useprod");
            entity.usetype             = row.IsNull("usetype") ? string.Empty : row.Field <string>("usetype");
            entity.statustype          = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.serlottype          = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype");
            entity.reservety           = row.IsNull("reservety") ? string.Empty : row.Field <string>("reservety");
            entity.reservedays         = row.IsNull("reservedays") ? 0 : row.Field <int>("reservedays");
            entity.pricetype           = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.pricetypedesc       = row.IsNull("pricetypedesc") ? string.Empty : row.Field <string>("pricetypedesc");
            entity.prodline            = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.arptype             = row.IsNull("arptype") ? string.Empty : row.Field <string>("arptype");
            entity.arpvendno           = row.IsNull("arpvendno") ? decimal.Zero : row.Field <decimal>("arpvendno");
            entity.arpwhse             = row.IsNull("arpwhse") ? string.Empty : row.Field <string>("arpwhse");
            entity.binloc1             = row.IsNull("binloc1") ? string.Empty : row.Field <string>("binloc1");
            entity.binloc2             = row.IsNull("binloc2") ? string.Empty : row.Field <string>("binloc2");
            entity.leadtmavg           = row.IsNull("leadtmavg") ? 0 : row.Field <int>("leadtmavg");
            entity.arppushfl           = row.Field <bool>("arppushfl");
            entity.bintype             = row.IsNull("bintype") ? string.Empty : row.Field <string>("bintype");
            entity.boshortfl           = row.Field <bool>("boshortfl");
            entity.enterdt             = row.Field <DateTime?>("enterdt");
            entity.famgrptype          = row.IsNull("famgrptype") ? string.Empty : row.Field <string>("famgrptype");
            entity.frtextra1           = row.IsNull("frtextra1") ? decimal.Zero : row.Field <decimal>("frtextra1");
            entity.frtextra2           = row.IsNull("frtextra2") ? decimal.Zero : row.Field <decimal>("frtextra2");
            entity.frtfreefl           = row.Field <bool>("frtfreefl");
            entity.lastpowtdt          = row.Field <DateTime?>("lastpowtdt");
            entity.vendprod            = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod");
            entity.proddesc            = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.user1               = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2               = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3               = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4               = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5               = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6               = row.Field <decimal?>("user6");
            entity.user7               = row.Field <decimal?>("user7");
            entity.user8               = row.Field <DateTime?>("user8");
            entity.user9               = row.Field <DateTime?>("user9");
            entity.errormess           = row.IsNull("errormess") ? string.Empty : row.Field <string>("errormess");
            entity.lineid              = row.IsNull("lineid") ? string.Empty : row.Field <string>("lineid");
            entity.dsplnetavail        = row.IsNull("dsplnetavail") ? string.Empty : row.Field <string>("dsplnetavail");
            entity.marginamt           = row.IsNull("marginamt") ? decimal.Zero : row.Field <decimal>("marginamt");
            entity.marginpct           = row.IsNull("marginpct") ? decimal.Zero : row.Field <decimal>("marginpct");
            entity.nonstandprodcheckfl = row.Field <bool>("nonstandprodcheckfl");
            entity.kitfl               = row.Field <bool>("kitfl");
            entity.tallyfl             = row.Field <bool>("tallyfl");
            entity.serialfl            = row.Field <bool>("serialfl");
            entity.lotfl               = row.Field <bool>("lotfl");
            entity.remancorefl         = row.Field <bool>("remancorefl");
            entity.impliedcorefl       = row.Field <bool>("impliedcorefl");
            entity.dirtycorefl         = row.Field <bool>("dirtycorefl");
            entity.eccnfl              = row.Field <bool>("eccnfl");
            entity.dnrfl               = row.Field <bool>("dnrfl");
            entity.assemblyfl          = row.Field <bool>("assemblyfl");
            entity.supersededfl        = row.Field <bool>("supersededfl");
            entity.substitutefl        = row.Field <bool>("substitutefl");
            entity.promopricefl        = row.Field <bool>("promopricefl");
            entity.prodrestrictfl      = row.Field <bool>("prodrestrictfl");
            entity.prodrestrictmessage = row.IsNull("prodrestrictmessage") ? string.Empty : row.Field <string>("prodrestrictmessage");
            entity.specpricecostfl     = row.Field <bool>("specpricecostfl");
            entity.inactivefl          = row.Field <bool>("inactivefl");
            return(entity);
        }