Ejemplo n.º 1
0
 public JsonResult GetPolishTypeDetails(int id)
 {
     using (var db = new PolishWarehouseEntities())
     {
         try
         {
             var m = new PolishTypeModel(id);
             return(Json(m));
         }
         catch (Exception ex)
         {
             return(Json(ex.Message));
         }
     }
 }
Ejemplo n.º 2
0
        public ActionResult DeletePolishType(PolishTypeModel model)
        {
            try
            {
                var resp = model.Delete();
                if (resp.WasSuccessful)
                {
                    TempData["Messages"] = "Polish Type Deleted!";
                }
                else
                {
                    TempData["Errors"] = resp.Message;
                }
            }
            catch (Exception ex)
            {
                TempData["Errors"] = ex.Message;
            }

            return(RedirectToAction("PolishTypes"));
        }