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); } }
/// <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); } }
public ActionResult GetCategories() { try { using (var cat = new CRUD_Service.CRUDClient()) { return(Json(cat.GetCategories())); } } catch (Exception x) { throw new Exception(x.Message); } }
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); } }
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; } }