예제 #1
0
        public static bool HasComments(this OapGenericCheckListFlatModel question, RigOapChecklist rigOapChecklist)
        {
            IOAPServiceDataModel       dataModel = OAPServiceSystem.GetServiceModel(OAPServiceSystem.OAPDataModelType.Comment);
            IEnumerable <CommentModel> comments  = dataModel.GetItems(string.Format("QuestionId=\"{0}\" AND SourceFormId=\"{1}\"", question.QuestionId, rigOapChecklist.Id.ToString()), "Id").Cast <CommentModel>();

            return(comments.Count() > 0);
        }
예제 #2
0
        public static bool ChecklistIsRelatedToPreviousNoAnswer(this OapGenericCheckListFlatModel question, OapChecklistClient oapChecklistClient, Guid rigOapChecklistId, int oapChecklistId, int oapChecklistQuestionId)
        {
            var noAnswer = oapChecklistClient.GetAllQuestionNoAnswersAsync(oapChecklistId, oapChecklistQuestionId).Result?.Result?.Data;

            return(noAnswer.Where(n => n.SourceRigOapChecklistId == rigOapChecklistId || n.ClosureRigOapChecklistId == rigOapChecklistId).Count() > 0);
        }
예제 #3
0
        public static bool HasActiveNoAnswerControl(this OapGenericCheckListFlatModel question, OapChecklistClient oapChecklistClient, int checklistId, int oapChecklistQuestionId)
        {
            var noAnswer = oapChecklistClient.GetFirstQuestionOpenNoAnswersAsync(checklistId, oapChecklistQuestionId).Result?.Result?.Data;

            return(noAnswer != null);
        }