Ejemplo n.º 1
0
 /// <summary>
 /// Constructor to set all model variables for ADO.net BLCartItem model.
 /// </summary>
 /// <param name="product"></param>
 /// <param name="size"></param>
 /// <param name="quantity"></param>
 public BLCartItem(BLProduct product, string size, int quantity)
 {
     Product   = product;
     Size      = size;
     Quantity  = quantity;
     ItemTotal = Product.prodPrice * Quantity;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds a product to the database and returns success status.
        /// </summary>
        /// <param name="newProduct"></param>
        /// <returns></returns>
        public static bool addProduct(BLProduct newProduct)
        {
            DALInsert product = new DALInsert();

            int rows = product.addNewProduct(newProduct);

            return(rows > 0);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Updates a specified product according to the specifics of the ADO.net model
 /// provided.
 /// </summary>
 /// <param name="product"></param>
 /// <returns></returns>
 public static bool updateProduct(BLProduct product)
 {
     return(DALUpdate.updateProduct(product));
 }