Пример #1
0
        public MaintenanceViewModel()
        {
            OverdueActivities   = PTMainViewModel.LoadFilteredColl(GetOverdueMonthlyUpdates);
            RequiringCompletion = PTMainViewModel.LoadFilteredColl(GetProjectsRequiringCompletion);
            IncompleteEPs       = PTMainViewModel.LoadFilteredColl(GetIncompleteEPs);
            MissingEPs          = PTMainViewModel.LoadFilteredColl(GetMissingEPs);
            MilestonesDue       = PTMainViewModel.LoadFilteredColl(GetOverdueMilestones);

            EvaluationPlansLabel     = MakeLabel(incompleteepslabel, IncompleteEPs.Count);
            RequiringCompletionLabel = MakeLabel(requiringcompletionlabel, RequiringCompletion.Count);
            OverdueActivitiesLabel   = MakeLabel(overdueactivitieslabel, OverdueActivities.Count);
            MilestonesDueLabel       = MakeLabel(milestonesduelabel, MilestonesDue.Count);

            OverdueActivities.ItemPropertyChanged   += OverdueActivities_ItemPropertyChanged;
            RequiringCompletion.ItemPropertyChanged += RequiringCompletion_ItemPropertyChanged;
            IncompleteEPs.ItemPropertyChanged       += IncompleteEPs_ItemPropertyChanged;
            MissingEPs.ItemPropertyChanged          += MissingEPs_ItemPropertyChanged;
            MilestonesDue.ItemPropertyChanged       += MilestonesDue_ItemPropertyChanged;

            cancopyoverduelist       = false;
            cancopyincompleteeplist  = false;
            cancopyreqcompletionlist = false;
            cancopymissingeplist     = false;
            cancopymilestoneduelist  = false;

            canemailoverduereminder  = false;
            canemailincompleteeplist = false;
            canemailmissingeplist    = false;
            canemailreqcompletion    = false;
            canemailmilestoneduelist = false;

            CopyOverdueList         = new RelayCommand(ExecuteCopyOverdueList, CanExecuteCopyOverdue);
            CopyRequiringCompletion = new RelayCommand(ExecuteCopyRequiringCompletion, CanExecutecopyReqCompletion);
            CopyIncompleteEPList    = new RelayCommand(ExecuteCopyIncompleteEPList, CanExecuteCopyIncompleteEPList);
            CopyMissingEPList       = new RelayCommand(ExecuteCopyMissingEPList, CanExecuteCopyMissingEPList);
            CopyMilestoneDueList    = new RelayCommand(ExecuteCopyMilestoneDueList, CanExecuteCopyMilestoneDueList);

            OpenComments            = new RelayCommand(ExecuteOpenComments, CanExecuteOpenComments);
            OpenIncompleteEP        = new RelayCommand(ExecuteOpenIncompleteEP, CanExecuteOpenIncompleteEP);
            OpenMilestoneDue        = new RelayCommand(ExecuteOpenMilestoneDue, CanExecuteOpenMilestoneDue);
            OpenMissingEPProject    = new RelayCommand(ExecuteOpenMissingEPProject, CanExecuteOpenMissingEPProject);
            OpenRequiringCompletion = new RelayCommand(ExecuteOpenReqCompletion, CanExecuteOpenReqCompletion);

            EmailOverdueReminder          = new RelayCommand(ExecuteEmailOverdue, CanExecuteEmailOverdue);
            EmailReqCompletionReminder    = new RelayCommand(ExecuteEmailRequiringCompletion, CanExecuteEmailReqCompletion);
            EmailIncompleteEPListReminder = new RelayCommand(ExecuteEmailIncompleteEPList, CanExecuteEmailIncompleteEPList);
            EmailMissingEPListReminder    = new RelayCommand(ExecuteEmailMissingEPList, CanExecuteEmailMissingEPList);
            EmailMilestoneDueListReminder = new RelayCommand(ExecuteEmailMilestoneDueList, CanExecuteEmailMilestoneDueList);
            UseEmail = Config.UseEmail;
        }
Пример #2
0
        public UserReminderViewModel(PTMainViewModel ptmvm)
        {
            PTMVM = ptmvm;

            WindowTitle = title;
            if (StaticCollections.CurrentUser.LastAccessed != null)
            {
                WindowTitle = WindowTitle + "      Last Accessed: " + StaticCollections.CurrentUser.LastAccessed.Value.ToString("dd-MMM-yyyy h:mm tt");
            }

            PTMVM.OverdueActivities   = PTMainViewModel.LoadFilteredColl(GetOverdueMonthlyUpdates);
            PTMVM.RequiringCompletion = PTMainViewModel.LoadFilteredColl(GetProjectsRequiringCompletion);
            PTMVM.IncompleteEPs       = PTMainViewModel.LoadFilteredColl(GetIncompleteEPs);
            PTMVM.MissingEPs          = PTMainViewModel.LoadFilteredColl(GetMissingEPs);
            PTMVM.MilestonesDue       = PTMainViewModel.LoadFilteredColl(GetOverdueMilestones);

            OverdueActivitiesLabel         = MakeLabel(overdueactivitieslabel, PTMVM.OverdueActivities.Count);
            IncompleteEvaluationPlansLabel = MakeLabel(incompleteepslabel, PTMVM.IncompleteEPs.Count);
            MissingEvaluationPlansLabel    = MakeLabel(missingepslabel, PTMVM.MissingEPs.Count);
            RequiringCompletionLabel       = MakeLabel(requiringcompletionlabel, PTMVM.RequiringCompletion.Count);
            MilestonesDueLabel             = MakeLabel(milestonesduelabel, PTMVM.MilestonesDue.Count);

            PTMVM.OverdueActivities.ItemPropertyChanged   += OverdueActivities_ItemPropertyChanged;
            PTMVM.RequiringCompletion.ItemPropertyChanged += RequiringCompletion_ItemPropertyChanged;
            PTMVM.IncompleteEPs.ItemPropertyChanged       += IncompleteEPs_ItemPropertyChanged;
            PTMVM.MissingEPs.ItemPropertyChanged          += MissingEPs_ItemPropertyChanged;
            PTMVM.MilestonesDue.ItemPropertyChanged       += MilestonesDue_ItemPropertyChanged;

            cancopyoverduelist       = false;
            cancopyincompleteeplist  = false;
            cancopyreqcompletionlist = false;
            cancopymissingeplist     = false;
            cancopymilestoneduelist  = false;

            CopyOverdueList         = new RelayCommand(ExecuteCopyOverdueList, CanExecuteCopyOverdue);
            CopyRequiringCompletion = new RelayCommand(ExecuteCopyRequiringCompletion, CanExecutecopyReqCompletion);
            CopyIncompleteEPList    = new RelayCommand(ExecuteCopyIncompleteEPList, CanExecuteCopyIncompleteEPList);
            CopyMissingEPList       = new RelayCommand(ExecuteCopyMissingEPList, CanExecuteCopyMissingEPList);
            CopyMilestoneDueList    = new RelayCommand(ExecuteCopyMilestoneDueList, CanExecuteCopyMilestoneDueList);

            OpenComments = new RelayCommand(ExecuteOpenComments, CanExecuteOpenComments);
            OpenIncompleteEvaluationPlan = new RelayCommand(ExecuteOpenIncompleteEP, CanExecuteOpenIncompleteEP);
            OpenMissingEPProject         = new RelayCommand(ExecuteOpenMissingEPProject, CanExecuteOpenMissingEPProject);
            OpenReqCompletionProject     = new RelayCommand(ExecuteOpenReqCompletionProject, CanExecuteOpenReqCompletionProject);
            OpenMilestoneDue             = new RelayCommand(ExecuteOpenMilestoneDue, CanExecuteOpenMilestoneDue);

            SetTabVisibility();
        }
Пример #3
0
        private void ExecuteOpenComments(object parameter)
        {
            try
            {
                if (parameter != null)
                {
                    IMessageBoxService msgbox = new MessageBoxService();
                    int  id     = SelectedOverdueActivity.ProjectID;
                    bool result = msgbox.OpenProjectCommentsDlg((Window)parameter, id);
                    //if return value is true then Refresh list

                    PTMVM.OverdueActivities = PTMainViewModel.LoadFilteredColl(GetOverdueMonthlyUpdates);
                    OverdueActivitiesLabel  = MakeLabel(overdueactivitieslabel, PTMVM.OverdueActivities.Count);
                    SetTabVisibility();

                    msgbox = null;
                }
            }
            catch { }
        }
Пример #4
0
        private void ExecuteOpenMilestoneDue(object parameter)
        {
            try
            {
                if (parameter != null)
                {
                    IMessageBoxService msgbox = new MessageBoxService();
                    int  id        = SelectedMilestoneDue.ID;
                    int  projectid = SelectedMilestoneDue.ProjectID;
                    bool result    = msgbox.MilestoneDialog((Window)parameter, id, projectid);
                    //if return value is true then Refresh list

                    PTMVM.MilestonesDue = PTMainViewModel.LoadFilteredColl(GetOverdueMilestones);
                    MilestonesDueLabel  = MakeLabel(milestonesduelabel, PTMVM.MilestonesDue.Count);
                    SetTabVisibility();

                    msgbox = null;
                }
            }
            catch { }
        }
Пример #5
0
        private void ExecuteOpenIncompleteEP(object parameter)
        {
            try
            {
                if (parameter != null)
                {
                    IMessageBoxService msgbox = new MessageBoxService();
                    int  id        = SelectedIncompleteEPProject.ID;
                    int  projectid = SelectedIncompleteEPProject.ProjectID;
                    bool result    = msgbox.EvaluationPlanDialog((Window)parameter, id, projectid);
                    //if return value is true then Refresh list

                    PTMVM.IncompleteEPs            = PTMainViewModel.LoadFilteredColl(GetIncompleteEPs);
                    IncompleteEvaluationPlansLabel = MakeLabel(incompleteepslabel, PTMVM.IncompleteEPs.Count);
                    SetTabVisibility();

                    msgbox = null;
                }
            }
            catch { }
        }
Пример #6
0
 private void ExecuteOpenMissingEPProject(object parameter)
 {
     try
     {
         if (parameter != null)
         {
             IMessageBoxService msgbox = new MessageBoxService();
             int  id     = SelectedMissingEPProject.ProjectID;
             bool result = msgbox.OpenProjectDlg((Window)parameter, id);
             //if return value is true then Refresh list
             if (result == true)
             {
                 RequiringCompletion      = PTMainViewModel.LoadFilteredColl(GetProjectsRequiringCompletion);
                 MissingEPs               = PTMainViewModel.LoadFilteredColl(GetMissingEPs);
                 RequiringCompletionLabel = MakeLabel(requiringcompletionlabel, RequiringCompletion.Count);
             }
             msgbox = null;
         }
     }
     catch { }
 }
Пример #7
0
        private void ExecuteOpenIncompleteEP(object parameter)
        {
            try
            {
                if (parameter != null)
                {
                    IMessageBoxService msgbox = new MessageBoxService();
                    int id        = SelectedIncompleteEPProject.ID;
                    int projectid = SelectedIncompleteEPProject.ProjectID;

                    bool result = msgbox.EvaluationPlanDialog((Window)parameter, id, projectid);
                    //if return value is true then Refresh list
                    if (result == true)
                    {
                        IncompleteEPs = PTMainViewModel.LoadFilteredColl(GetIncompleteEPs);
                    }

                    msgbox = null;
                }
            }
            catch { }
        }
Пример #8
0
        private void ExecuteOpenMissingEPProject(object parameter)
        {
            try
            {
                if (parameter != null)
                {
                    IMessageBoxService msgbox = new MessageBoxService();
                    int id = SelectedMissingEPProject.ProjectID;

                    bool result = msgbox.OpenProjectDlg((Window)parameter, id);

                    PTMVM.RequiringCompletion      = PTMainViewModel.LoadFilteredColl(GetProjectsRequiringCompletion);
                    PTMVM.IncompleteEPs            = PTMainViewModel.LoadFilteredColl(GetIncompleteEPs);
                    PTMVM.MissingEPs               = PTMainViewModel.LoadFilteredColl(GetMissingEPs);
                    RequiringCompletionLabel       = MakeLabel(requiringcompletionlabel, PTMVM.RequiringCompletion.Count);
                    IncompleteEvaluationPlansLabel = MakeLabel(incompleteepslabel, PTMVM.IncompleteEPs.Count);
                    MissingEvaluationPlansLabel    = MakeLabel(missingepslabel, PTMVM.MissingEPs.Count);
                    SetTabVisibility();

                    msgbox = null;
                }
            }
            catch { }
        }