public ActionResult ReportVacationTodayByVacationType() { ReportVacationTodayByVacationTypeViewModel VM = new ReportVacationTodayByVacationTypeViewModel() { StartDate = DateTime.Now.AddDays(-7), EndDate = DateTime.Now, }; return(View(VM)); }
public ActionResult VacationTodayByVacationType(ReportVacationTodayByVacationTypeViewModel VM) { int VacationTypeID = VM.VacationTypeID.HasValue ? VM.VacationTypeID.Value : 0; string url = string.Format("Reports/VacationTodayByVacationType.aspx?VacationTypeID={0}&StartDate={1}&EndDate={2}", VacationTypeID, VM.StartDate.ToString(ConfigurationManager.AppSettings["DateFormat"]), VM.EndDate.ToString(ConfigurationManager.AppSettings["DateFormat"])); return(Json(new { url = url }, JsonRequestBehavior.AllowGet)); //int VacationTypeID = int.Parse(Request.QueryString["VacationTypeID"].ToString()); //return Redirect(string.Format("~/WebForms/Reports/VacationTodayByVacationType.aspx?VacationTypeID={0}", VacationTypeID)); }