public ActionResult FilterAuditReport(DateTime?StartDate, DateTime?EndDate) { AuditReportFilterModel arm = new AuditReportFilterModel() { StartDate = StartDate, EndDate = EndDate }; return(Json(Url.Action("AuditReport", "Report", new { StartDate = StartDate, EndDate = EndDate }))); }
// GET: Report public ActionResult AuditReport(DateTime?StartDate, DateTime?EndDate) { AuditReportFilterModel arm = new AuditReportFilterModel(); arm.StartDate = StartDate; arm.EndDate = EndDate; if (StartDate != null && EndDate != null) { ViewBag.StartDate = StartDate.ToString(); ViewBag.EndDate = EndDate.ToString(); } else { ViewBag.StartDate = ""; ViewBag.EndDate = ""; } return(View(arm)); }