public static ConfigureScheduleView ( |
||
db | ||
calculateEffectiveSchedule | bool | |
return |
// GET: RouteSchedules public ActionResult Index() { ViewBag.DaysOfWeek = BuildScheduleView.daysOfWeek; ViewBag.ServerTime = UTCToLocalTime.LocalTimeFromUTC(DateTime.UtcNow).ToString("MM-dd-yyyy HH:mm:ss"); ViewBag.CssFile = Url.Content("~/Content/RouteScheduleSummary.css"); return(View(BuildScheduleView.ConfigureScheduleView(false))); }
// GET: RouteSchedules public ActionResult Index() { //var routeSchedules = db.RouteSchedules.Include(r => r.Route); ViewBag.DaysOfWeek = BuildScheduleView.daysOfWeek; ViewBag.ServerTime = UTCToLocalTime.LocalTimeFromUTC(DateTime.UtcNow).ToString("MM-dd-yyyy HH:mm:ss"); ViewBag.CssFile = Url.Content("~/Content/RouteScheduleSummary.css"); return(View(BuildScheduleView.ConfigureScheduleView(db, false))); //return View(routeSchedules.ToList()); }
// GET: RouteScheduleOverrides public ActionResult Index() { //var routeScheduleOverrides = db.RouteScheduleOverrides.Include(r => r.Route); var routeScheduleOverrides = from rso in db.RouteScheduleOverrides.Include(rso => rso.NewRoute) orderby rso.OverrideDate, rso.StartTime, rso.NewRoute.ShortName select rso; ViewBag.CssFile = Url.Content("~/Content/RouteScheduleSummary.css"); var routeScheduleView = BuildScheduleView.ConfigureScheduleView(db, true); //routeScheduleView.EffectiveRouteSchedules = BuildScheduleView.ConfigureScheduleView(db); routeScheduleView.RouteScheduleOverrides = (System.Data.Entity.Infrastructure.DbQuery <RouteScheduleOverride>)routeScheduleOverrides; return(View(routeScheduleView)); }
// GET: RouteScheduleOverrides public ActionResult Index() { List <RouteScheduleOverride> routeScheduleOverrides = null; using (var db = new TrolleyTrackerContext()) { routeScheduleOverrides = (from rso in db.RouteScheduleOverrides.Include(rso => rso.NewRoute).Include(rso => rso.OverriddenRoute) orderby rso.OverrideDate, rso.StartTime, rso.NewRoute.ShortName select rso).ToList(); } ViewBag.CssFile = Url.Content("~/Content/RouteScheduleSummary.css"); var routeScheduleView = BuildScheduleView.ConfigureScheduleView(true); routeScheduleView.RouteScheduleOverrides = routeScheduleOverrides; return(View(routeScheduleView)); }