예제 #1
0
        protected Expression <Func <Comment, bool> > PrepareEchartsDataLamda(Engineering engineering)
        {
            var lamda = CommentService.ExpressionTrue;

            var modelId = engineering.EngineeringFiles.FirstOrDefault(e => e.FileType == FileType.Model)?.Id;

            if (!modelId.HasValue)
            {
                return(lamda = lamda.And(e => false));
            }

            lamda = lamda.And(e => e.EngineeringFileId == modelId);

            var avalibelStates = WorkFlow.AvailableCommentStatusList();

            lamda = lamda.And(e => avalibelStates.Contains(e.Status));

            return(lamda);
        }