コード例 #1
0
 public void AddToCart(List <Cart> cart)
 {
     try
     {
         MOSBusinesslayer.MOSBusinesslayer bll = new MOSBusinesslayer.MOSBusinesslayer();
         bll.AddToCart(cart);
     }
     catch (Exception ex)
     {
         throw new MOSException(ex.Message);
     }
 }
コード例 #2
0
 public void DeleteFromCart(int id)
 {
     try
     {
         MOSBusinesslayer.MOSBusinesslayer bll = new MOSBusinesslayer.MOSBusinesslayer();
         bll.DeleteFromCart(id);
     }
     catch (Exception ex)
     {
         throw new MOSException(ex.Message);
     }
 }
コード例 #3
0
 public Product GetProductDetailsById(int id)
 {
     try
     {
         MOSBusinesslayer.MOSBusinesslayer bll = new MOSBusinesslayer.MOSBusinesslayer();
         var product = bll.GetProductDetailsById(id);
         return(product);
     }
     catch (Exception ex)
     {
         throw new MOSException(ex.Message);
     }
 }
コード例 #4
0
 public List <Category> GetAllCategories()
 {
     try
     {
         MOSBusinesslayer.MOSBusinesslayer bll = new MOSBusinesslayer.MOSBusinesslayer();
         var lstcategories = bll.GetAllCategories();
         return(lstcategories);
     }
     catch (Exception ex)
     {
         throw new MOSException(ex.Message);
     }
 }
コード例 #5
0
 public List <Product> SearchProductByName(string name)
 {
     try
     {
         MOSBusinesslayer.MOSBusinesslayer bll = new MOSBusinesslayer.MOSBusinesslayer();
         var lstproducts = bll.SearchProductByName(name);
         return(lstproducts);
     }
     catch (Exception ex)
     {
         throw new MOSException(ex.Message);
     }
 }