//GET: Categories/Category/Edit public ActionResult Edit(int id) { var cp = new ASF.UI.Process.CategoryProcess(); var categoria = cp.Find(id); return(View(categoria)); }
// GET: Categories/Category public ActionResult Index() { var cp = new ASF.UI.Process.CategoryProcess(); var lista = cp.SelectList(); return(View(lista)); }
public ActionResult Delete(ASF.Entities.Category model) { if (ModelState.IsValid) { var cp = new ASF.UI.Process.CategoryProcess(); cp.Delete(model.Id); } return(RedirectToAction("Index")); }
public ActionResult Create(ASF.Entities.Category model) { if (ModelState.IsValid) { var cp = new ASF.UI.Process.CategoryProcess(); model.CreatedOn = DateTime.Now; model.ChangedOn = DateTime.Now; cp.Create(model); } return(RedirectToAction("Index")); }