Example #1
0
 public ActionResult Edit(Warehouse model)
 {
     if (ModelState.IsValid)
     {
         int rowsAffected = repo.Edit(model);
         if (rowsAffected > 0)
         {
             TempData["message"] = "Successfully Updated";
             return(RedirectToAction("Index"));
         }
         else
         {
             return(View(model));
         }
     }
     return(View(model));
 }