Esempio n. 1
0
 public ActionResult UpdateCategory(ProductCategoryViewModel model)
 {
     try
     {
         var category = model.ToEntity();
         GenericFactory.Business.UpdateCategory(category);
         return(Json(""));
     }
     catch (Exception ex)
     {
         var msg = ex.Message;
     }
     return(Json(null));
 }
Esempio n. 2
0
 public JsonResult CreateCategory(ProductCategoryViewModel model)
 {
     try
     {
         model.Id = Guid.NewGuid().ToString();
         var category = model.ToEntity();
         GenericFactory.Business.CreateCategory(category);
         return(Json(""));
     }
     catch (Exception ex)
     {
         var msg = ex.Message;
     }
     return(Json(null));
 }