public JsonResult CheckDate(string FromDate, string ToDate, string EmpName) { DateTime FD = Convert.ToDateTime(FromDate); DateTime TD = Convert.ToDateTime(ToDate); string message = "Success"; var details = _CommissionService.CheckDate(FD, TD, EmpName); if (details != null) { message = "Error"; } return(Json(message, JsonRequestBehavior.AllowGet)); }