public JsonResult CreateHoliday(string Holiday_Name, DateTime Holiday_Date, int HolidayType_Id, int Status) { string res = ""; try { res = mdb_layer.CreateHoliday(Holiday_Name, Holiday_Date, HolidayType_Id, Convert.ToInt32(Session["Emp_id"].ToString()), Status); if (res == "Success") { mm.SuccessMsg = Holiday_Name + " is successfully created."; } else { mm.ErrorMsg = res; } } catch (Exception ex) { mm.ErrorMsg = ex.Message; } return(Json(mm, JsonRequestBehavior.AllowGet)); }