Exemple #1
0
        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." }));
        }
Exemple #2
0
 public ActionResult Delete(department d)
 {
     Models.Department.Department objDepartment = new Models.Department.Department();
     objDepartment.DeleteDepartment(d);
     return(View());
 }