public static List <CalendarModel> GetAssignedSchedules() { string fromString = DateTime.Now.ToString("MM/dd/yyyy"); string toString = DateTime.Now.AddDays(1).ToString("MM/dd/yyyy"); if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["fromString"])) { fromString = HttpContext.Current.Request.QueryString["fromString"].ToString(); } if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["toString"])) { toString = HttpContext.Current.Request.QueryString["toString"].ToString(); } ScheduleController controller = new ScheduleController(); DateTime fromDate = DateTime.Parse(fromString); DateTime toDate = DateTime.Parse(toString); return(controller.GetAssignedSchedules(fromDate, toDate)); }