public ActionResult UpdateMasterCategory(ModelMasterCategory model) { if (_IMasterCategory.Admin_MasterCategoryCheckExists(model.CategoryName, model.CategoryId).Count > 0) { model.ErrorMessage = "Category name already existed"; } else { _IMasterCategory.Admin_MasterCategoryUpdate(model.CategoryId, model.CategoryName, model.ViewTime); Response.Redirect("ManageMasterCategory"); } return(View(model)); }
public ActionResult UpdateMasterCategory(int Category) { ModelMasterCategory model = new ModelMasterCategory(); if (Category > 0) { MasterCategoryDTO _result = _IMasterCategory.Admin_MasterCategoryOnCategoryId(Category); model.CategoryId = _result.CategoryId; model.CategoryName = _result.CategoryName; } return(View(model)); }