Beispiel #1
0
 public ActionResult AddProducts(ProductEntity product)
 {
     try
     {
         using (var product_temp = new CRUD_Service.CRUDClient())
         {
             return(Json(product_temp.AddProducts(product)));
         }
     }
     catch (Exception x)
     {
         throw new Exception(x.Message);
     }
 }
Beispiel #2
0
 /// <summary>
 /// GET SUPPLIERS
 /// </summary>
 /// <returns>
 /// ActionResult
 /// </returns>
 public ActionResult GetSuppliers()
 {
     try
     {
         using (var supp = new CRUD_Service.CRUDClient())
         {
             return(Json(supp.GetSuppliers()));
         }
     }
     catch (Exception x)
     {
         throw new Exception(x.Message);
     }
 }
Beispiel #3
0
 public ActionResult GetCategories()
 {
     try
     {
         using (var cat = new CRUD_Service.CRUDClient())
         {
             return(Json(cat.GetCategories()));
         }
     }
     catch (Exception x)
     {
         throw new Exception(x.Message);
     }
 }
Beispiel #4
0
 public ActionResult ConsultProducts([Microsoft.AspNetCore.Mvc.FromBody] int?ProductID)
 {
     try
     {
         using (var product_temp = new CRUD_Service.CRUDClient())
         {
             return(Json(product_temp.ConsultProducts(ProductID)));
         }
     }
     catch (Exception x)
     {
         throw new Exception(x.Message);
     }
 }
Beispiel #5
0
 public ActionResult GetProducts()
 {
     try
     {
         using (var product_temp = new CRUD_Service.CRUDClient())
         {
             //var get = product_temp.GetProducts();
             return(Json(product_temp.GetProducts()));
         }
     }
     catch (Exception x)
     {
         throw;
     }
 }