public ActionResult CloseAbsentNotification(int?id) { if (Session["EmpID"] == null) { return(Content("Access denied")); } if (id != null && id.Value > 0) { Attendance a1 = new Attendance(); a1.CloseNotification(id.Value, Convert.ToInt32(Session["EmpID"])); return(Json(true, JsonRequestBehavior.AllowGet)); } return(Content("Invalid Argument")); }