Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspcustprodcriteria(ref DataRow row, Pdspcustprodcriteria entity)
 {
     row.SetField("clevelcd", entity.clevelcd);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("unit", entity.unit);
     row.SetField("prodpricety", entity.prodpricety);
     row.SetField("vendno", entity.vendno);
     row.SetField("prodline", entity.prodline);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("rebtype", entity.rebtype);
     row.SetField("rebsubty", entity.rebsubty);
     row.SetField("custpricety", entity.custpricety);
     row.SetField("startdt", entity.startdt);
     row.SetField("inactivefl", entity.inactivefl);
     row.SetField("expactivefl", entity.expactivefl);
     row.SetField("promosfl", entity.promosfl);
     row.SetField("pricemodifier", entity.pricemodifier);
     row.SetField("pdrecno", entity.pdrecno);
     row.SetField("iRecordlimit", entity.iRecordlimit);
     row.SetField("lastuseddt", entity.lastuseddt);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Pdspcustprodcriteria BuildPdspcustprodcriteriaFromRow(DataRow row)
        {
            Pdspcustprodcriteria entity = new Pdspcustprodcriteria();

            entity.clevelcd      = row.IsNull("clevelcd") ? string.Empty : row.Field <string>("clevelcd");
            entity.custno        = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto        = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.prod          = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.unit          = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.prodpricety   = row.IsNull("prodpricety") ? string.Empty : row.Field <string>("prodpricety");
            entity.vendno        = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.prodline      = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.prodcat       = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.rebtype       = row.IsNull("rebtype") ? string.Empty : row.Field <string>("rebtype");
            entity.rebsubty      = row.IsNull("rebsubty") ? string.Empty : row.Field <string>("rebsubty");
            entity.custpricety   = row.IsNull("custpricety") ? string.Empty : row.Field <string>("custpricety");
            entity.startdt       = row.Field <DateTime?>("startdt");
            entity.inactivefl    = row.Field <bool>("inactivefl");
            entity.expactivefl   = row.Field <bool>("expactivefl");
            entity.promosfl      = row.Field <bool>("promosfl");
            entity.pricemodifier = row.IsNull("pricemodifier") ? string.Empty : row.Field <string>("pricemodifier");
            entity.pdrecno       = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno");
            entity.iRecordlimit  = row.IsNull("iRecordlimit") ? 0 : row.Field <int>("iRecordlimit");
            entity.lastuseddt    = row.Field <DateTime?>("lastuseddt");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }