コード例 #1
0
 private bool _deleteResultCanExecute()
 {
     if (Workflow == null)
     {
         return(false);
     }
     if (Results?.Selected == null)
     {
         return(false);
     }
     if (!Acl.IsGranted(AnalysisRights.AnalysisAddResult))
     {
         return(false);
     }
     if (Workflow.CurrentStage != SampleTestWorkflow.Running)
     {
         return(false);
     }
     if (Results.Selected.Stage != null && Results.Selected.Stage != SampleTestResultWorkflow.Running)
     {
         return(false);
     }
     if (Model.Result == null)
     {
         return(true);
     }
     if (Model.Result.Id == Results.Selected.Id)
     {
         return(false);
     }
     return(true);
 }
コード例 #2
0
        private bool _addResultCanExecute()
        {
            if (!Acl.IsGranted(AnalysisRights.AnalysisAddResult))
            {
                return(false);
            }
            if (Workflow.CurrentStage != SampleTestWorkflow.Running)
            {
                return(false);
            }

            return(true);
        }