public ActionResult Edit(ItemCategoryDTO obj, int id)
 {
     if (ModelState.IsValid)
     {
         try
         {
             _itemCategoryData.Edited(obj);
             return(RedirectToAction("Index", "ItemCategory", new { id = id }));
         }
         catch
         {
             throw;
         }
     }
     return(View());
 }
 public ActionResult AdminCategoryEdit(ItemCategoryDTO obj, int id)
 {
     TempData["id"] = id;
     if (ModelState.IsValid)
     {
         try
         {
             _itemCategoryData.Edited(obj);
             return(RedirectToAction("AdminCategoryList", "Admin", new { id = id }));
         }
         catch
         {
             throw;
         }
     }
     return(View());
 }