Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspcustprodresults(ref DataRow row, Pdspcustprodresults entity)
 {
     row.SetField("pdrecno", entity.pdrecno);
     row.SetField("custno", entity.custno);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("custtype", entity.custtype);
     row.SetField("shiptonotesfl", entity.shiptonotesfl);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("prod", entity.prod);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("levelcd", entity.levelcd);
     row.SetField("clevelcd", entity.clevelcd);
     row.SetField("units", entity.units);
     row.SetField("typecode", entity.typecode);
     row.SetField("prodprcty", entity.prodprcty);
     row.SetField("rebatety", entity.rebatety);
     row.SetField("rebsubty", entity.rebsubty);
     row.SetField("prodline", entity.prodline);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("whse", entity.whse);
     row.SetField("statustype", entity.statustype);
     row.SetField("startdt", entity.startdt);
     row.SetField("enddt", entity.enddt);
     row.SetField("promofl", entity.promofl);
     row.SetField("modifiernm", entity.modifiernm);
     row.SetField("pd_rowid", entity.pdRowid.ToByteArray());
     row.SetField("brandcode", entity.brandcode);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("lastuseddt", entity.lastuseddt);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Pdspcustprodresults BuildPdspcustprodresultsFromRow(DataRow row)
        {
            Pdspcustprodresults entity = new Pdspcustprodresults();

            entity.pdrecno       = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno");
            entity.custno        = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custnotesfl   = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.custtype      = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype");
            entity.shiptonotesfl = row.IsNull("shiptonotesfl") ? string.Empty : row.Field <string>("shiptonotesfl");
            entity.vendno        = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnotesfl   = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.prod          = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.prodnotesfl   = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.levelcd       = row.IsNull("levelcd") ? string.Empty : row.Field <string>("levelcd");
            entity.clevelcd      = row.IsNull("clevelcd") ? string.Empty : row.Field <string>("clevelcd");
            entity.units         = row.IsNull("units") ? string.Empty : row.Field <string>("units");
            entity.typecode      = row.IsNull("typecode") ? string.Empty : row.Field <string>("typecode");
            entity.prodprcty     = row.IsNull("prodprcty") ? string.Empty : row.Field <string>("prodprcty");
            entity.rebatety      = row.IsNull("rebatety") ? string.Empty : row.Field <string>("rebatety");
            entity.rebsubty      = row.IsNull("rebsubty") ? string.Empty : row.Field <string>("rebsubty");
            entity.prodline      = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.prodcat       = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.statustype    = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.startdt       = row.Field <DateTime?>("startdt");
            entity.enddt         = row.Field <DateTime?>("enddt");
            entity.promofl       = row.Field <bool>("promofl");
            entity.modifiernm    = row.IsNull("modifiernm") ? string.Empty : row.Field <string>("modifiernm");
            entity.pdRowid       = row.Field <byte[]>("pd_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.lastuseddt    = row.Field <DateTime?>("lastuseddt");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }