public ActionResult Save(department d) { if (!ModelState.IsValid) { return(Json(new { ResponseCode = 0, ResponseMessage = "ServerSideModelValidationFailed" })); } Models.Department.Department objDepartment = new Models.Department.Department(); objDepartment.SaveDepartment(d); return(RedirectToAction("Index")); return(Json(new { ResponseCode = 3, ResponseMessage = "Error occured while saving conatct us." })); }
public ActionResult Delete(department d) { Models.Department.Department objDepartment = new Models.Department.Department(); objDepartment.DeleteDepartment(d); return(View()); }