Exemplo n.º 1
0
        protected void PreLoadData()
        {
            //获取已编辑过的任务ID
            editedWorkID = wc.GetThisWeekEditedWorkID(userID);

            //获取一年中所有月份的每个月包含的周数量
            weeksOfMonth = tool.GetWeeksOfAllMonth();

            userWorkID = wc.GetUserWorkID(userID);
            int[] existTaskMonths;
            existMonths = new Dictionary <Guid, int[]>();
            existWeeks  = new Dictionary <Guid, Dictionary <int, int> >();
            foreach (Guid wid in userWorkID)
            {
                existTaskMonths = sc.GetExistTaskMonths(wid);
                //判断此项工作是否有月节点计划
                if (existTaskMonths != null)
                {
                    existMonths.Add(wid, sc.GetExistTaskMonths(wid));
                }
                existWeeks.Add(wid, sc.GetExistTaskWeeksAndState(wid, true));
            }

            ViewState["weeksOfMonth"] = weeksOfMonth;
            ViewState["userWorkID"]   = userWorkID;
            ViewState["existMonths"]  = existMonths;
            ViewState["existWeeks"]   = existWeeks;
            ViewState["editedWorkID"] = editedWorkID;
        }