public ActionResult Edit(int id, ASF.Entities.Category category) { try { categoryProcess.EditCategory(category); return(RedirectToAction("Index")); } catch { return(View()); } }
// // GET: /Dealer/Dealer/Delete/5 public ActionResult Delete(int id) { try { var category = new ASF.Entities.Category(); category.Id = id; categoryProcess.Remove(category); } catch (Exception ex) { throw new Exception(ex.Message); } return(RedirectToAction("Index")); }
public ActionResult Create(ASF.Entities.Category category) { try { // TODO: Add insert logic here //var category = CustomConverterUtils.MapFormCollection<ASF.Entities.Category>(collection); categoryProcess.SaveCategory(category); return(RedirectToAction("Index")); } catch { return(View()); } }