Exemplo n.º 1
0
        /// <summary>
        /// 转到计划首页
        /// </summary>
        /// <param name="sDate"></param>
        /// <returns></returns>
        public ActionResult Index(DateTime?sDate)
        {
            DateTime          currentDate = sDate == null ? DateTime.Today : sDate.Value;
            List <PlanPeriod> times       = dbp.GetStartTime();

            ViewData["times"] = times;
            DateTime StartDate = currentDate.AddDays(1 - (int)currentDate.DayOfWeek);

            ViewData["StartDate"] = StartDate;
            List <List <TimeForPlan> > weekPlan = PlanDataHelper.GetWeekPlan(dbp.GetAllPlan(1), 1, StartDate, times, int.Parse(Session["currentUser"].ToString()));

            return(View(weekPlan));
        }