private void ViewSingle()
        {
            Dictionary<string, ObservableCollection<PlanEntity>> planListDictionary = new Dictionary<string, ObservableCollection<PlanEntity>>();
            Dictionary<string, int> moduleIndexDictionary = new Dictionary<string, int>();
            if (GetPorjectPlanList(SelectProjectEntity, SelectProjectEntity.PlanVersionID, true, ref planListDictionary, ref moduleIndexDictionary))
            {
                if (planListDictionary.Count > 0)
                {
                    ObservableCollection<PlanListViewModel> planListViewModelList = new ObservableCollection<PlanListViewModel>();
                    foreach (KeyValuePair<string, ObservableCollection<PlanEntity>> kv in planListDictionary)
                    {
                        PlanListViewModel planListViewModel = new PlanListViewModel(kv.Key,
                                                                    planListDictionary[kv.Key],
                                                                    moduleIndexDictionary[kv.Key],
                                                                    departmentIdNameDictionary);
                        planListViewModel.IsReadOnly = true;
                        planListViewModelList.Add(planListViewModel);
                    }

                    PlanExtraEntity planExtraEntity = null;
                    IEnumerable<plan_extra> plan_extras = from c in planManagerDomainContext.plan_extras
                                                          where c.version_id == SelectProjectEntity.PlanVersionID
                                                          && c.manufacture_number == SelectProjectEntity.ManufactureNumber.TrimEnd()
                                                          select c;
                    if (0 != plan_extras.Count())
                    {
                        planExtraEntity = new PlanExtraEntity();
                        planExtraEntity.PlanExtra = plan_extras.First<plan_extra>();
                        planExtraEntity.Update();
                        planExtraEntity.PlanExtra = null;
                    }

                    string title = "跟踪计划" + SelectProjectEntity.ProjectName + " "
                                    + SelectProjectEntity.ManufactureNumber + " "
                                    + SelectProjectEntity.PlanVersionID + " "
                                    + "(红色(超过计划时间);品红(接近计划时间);绿色(按时完成);紫色(超时完成);灰色(无状态))";

                    PlanListTraceWindow planListWindow = new PlanListTraceWindow(title, planListViewModelList,
                                                                        planExtraEntity, this);
                    planListWindow.Closed += new EventHandler(PlanListWindow_Closed);
                    planListWindow.Show();
                }
            }
            else
            {
                string errorMessage = "无相关数据(生产令号:" +
                                        SelectProjectEntity.ManufactureNumber.TrimEnd() +
                                        ",版本号" +
                                        SelectProjectEntity.PlanVersionID
                                        + ")";
                Message.ErrorMessage(errorMessage);
            }
        }
        private void ViewMulti()
        {
            Dictionary<string, ObservableCollection<PlanEntity>> planListDictionary = new Dictionary<string, ObservableCollection<PlanEntity>>();
            Dictionary<string, int> moduleIndexDictionary = new Dictionary<string, int>();

            foreach (ProjectEntity item in SelectedProjectList)
            {
                if (null == item.PlanVersionID
                || null == item.ManufactureNumber
                || string.Empty == item.PlanVersionID
                || string.Empty == item.ManufactureNumber)
                {
                    continue;
                }

                GetPorjectPlanList(item, item.PlanVersionID, true, ref planListDictionary, ref moduleIndexDictionary);
            }

            if (planListDictionary.Count > 0)
            {
                ObservableCollection<PlanListViewModel> planListViewModelList = new ObservableCollection<PlanListViewModel>();
                foreach (KeyValuePair<string, ObservableCollection<PlanEntity>> kv in planListDictionary)
                {
                    PlanListViewModel planListViewModel = new PlanListViewModel(kv.Key,
                                                                planListDictionary[kv.Key],
                                                                moduleIndexDictionary[kv.Key],
                                                                departmentIdNameDictionary);
                    planListViewModel.IsReadOnly = true;
                    planListViewModelList.Add(planListViewModel);
                }

                PlanListTraceWindow planListWindow = new PlanListTraceWindow("跟踪计划(说明:红色(超过计划时间);品红(接近计划时间);绿色(按时完成);紫色(超时完成);灰色(无状态))",
                    planListViewModelList, null, this);
                planListWindow.Closed += new EventHandler(PlanListWindow_Closed);
                planListWindow.Show();
            }
        }