public ActionResult UpdateCategory(ecom_tbl_Category _items, int id) { try { if (!ModelState.IsValid) { return(null); } if (_items != null) { if (id != 0) { var itemInfo = _iGenericService.GetById(id); if (itemInfo != null) { _iGenericService.Update(_items); } } } } catch (Exception ex) { } return(RedirectToAction("UpdateCategory")); }
public ActionResult InsertCategory(ecom_tbl_Category _items) { try { if (_items != null) { _iGenericService.Insert(_items); } } catch (Exception ex) { } return(RedirectToAction("InsertCategory")); }
public ActionResult DeleteCategory(ecom_tbl_Category _items, int id) { try { if (_items != null) { if (id != 0) { var itemInfo = _iGenericService.GetById(id); if (itemInfo != null) { _iGenericService.Delete(id); } } } } catch (Exception ex) { } return(RedirectToAction("DeleteCategory")); }