Ejemplo n.º 1
0
        /// <summary>
        /// Returns a new ProductTypeDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual ProductTypeDetails GetProductTypeFromReader(DbDataReader reader)
        {
            ProductTypeDetails productType = new ProductTypeDetails();

            if (reader.HasRows)
            {
                productType.ProductTypeId = GetReaderValue_Int32(reader, "ProductTypeId", 0); //From: [Table]
                productType.Name          = GetReaderValue_String(reader, "Name", "");        //From: [Table]
            }
            return(productType);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_ProductType]
 /// </summary>
 public static ProductType Get(System.Int32?productTypeId)
 {
     Rebound.GlobalTrader.DAL.ProductTypeDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.ProductType.Get(productTypeId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         ProductType obj = new ProductType();
         obj.ProductTypeId = objDetails.ProductTypeId;
         obj.Name          = objDetails.Name;
         objDetails        = null;
         return(obj);
     }
 }