static public void AddLateIncompleteReason() { ViewModel vm = ViewModel.Current; View vw = ViewModel.Current.SelectedView; bool isOpenlateReasonDialog = true; if ((vw & View.vwAssignedTasks) > 0) { var qryNotOutstandingReassign = from x in vm.Tasks where x.Status != CamlHelper.IN_PROGRESS_STATUS && x.Status != CamlHelper.REASSIGN_STATUS && x.IsSelected == true select x; if (qryNotOutstandingReassign != null && qryNotOutstandingReassign.Count() > 0) { isOpenlateReasonDialog = false; C1MessageBox.Show("All selected tasks must have status Outstanding or Reassign to use this feature.", "Add Late/Incomplete Reason", C1MessageBoxButton.OK, C1MessageBoxIcon.Information); } } if ((vw & View.vwManagedTasks) > 0) { var qryNotOutstandingReassignComplete = from x in vm.Tasks where ((x.Status != CamlHelper.IN_PROGRESS_STATUS && x.Status != CamlHelper.REASSIGN_STATUS && x.Status != CamlHelper.COMPLETED_STATUS) || x.ManagementSignOff == CamlHelper.APPROVED_SIGNOFF) && x.IsSelected == true select x; if (qryNotOutstandingReassignComplete != null && qryNotOutstandingReassignComplete.Count() > 0) { isOpenlateReasonDialog = false; C1MessageBox.Show("All selected tasks must have status Outstanding or Reassign or Complete and Management sign-off Pending to use this feature.", "Add Late/Incomplete Reason", C1MessageBoxButton.OK, C1MessageBoxIcon.Information); } } if (isOpenlateReasonDialog) { var dlg = new AddLateIncompleteReasonDialog(); dlg.CenterOnScreen(); dlg.Closed += new EventHandler(dlgBulkLateIncompleteReason_Closed); dlg.ShowModal(); } }
static public void BulkCompleteWithLateIncompleteReasonConfirmationHandler(MessageBoxResult result) { ViewModel vm = ViewModel.Current; if (result == MessageBoxResult.Cancel) return; var dlg = new AddLateIncompleteReasonDialog(); dlg.CenterOnScreen(); dlg.Closed += new EventHandler(dlgBulkCompleteLateIncompleteReason_Closed); dlg.ShowModal(); }