Example #1
0
        public bool UpdateAuthorization(bool isAuthorization, params Guid[] id)
        {
            var context = UpdateContextBuilder.Build <Domain.RibbonButton>();

            context.Set(f => f.AuthorizationEnabled, isAuthorization);
            context.Where(f => f.RibbonButtonId.In(id));
            var result = true;

            using (UnitOfWork.Build(_ribbonButtonRepository.DbContext))
            {
                result = _ribbonButtonRepository.Update(context);
                _eventPublisher.Publish(new AuthorizationStateChangedEvent
                {
                    ObjectId = id.ToList()
                    ,
                    State = isAuthorization
                    ,
                    ResourceName = RibbonButtonDefaults.ModuleName
                });
            }
            return(result);
        }
Example #2
0
        public bool UpdateState(IEnumerable <Guid> ids, bool isEnabled)
        {
            Guard.NotEmpty(ids, nameof(ids));
            var context = UpdateContextBuilder.Build <Domain.QueryView>();

            context.Set(f => f.StateCode, isEnabled ? RecordState.Enabled : RecordState.Disabled)
            .Set(f => f.ModifiedOn, DateTime.Now)
            .Set(f => f.ModifiedBy, _currentUser.SystemUserId);
            context.Where(f => f.QueryViewId.In(ids));
            var result = _queryViewRepository.Update(context);

            //cache
            if (result)
            {
                var items = _queryViewRepository.Query(f => f.QueryViewId.In(ids)).ToList();
                foreach (var item in items)
                {
                    _cacheService.SetEntity(item);
                }
            }
            return(result);
        }
Example #3
0
        public bool Update(Func <UpdateContext <Domain.ResourceOwner>, UpdateContext <Domain.ResourceOwner> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <Domain.ResourceOwner>());

            return(_resourceOwnerRepository.Update(ctx));
        }
Example #4
0
        public bool Update(Func <UpdateContext <RoleObjectAccess>, UpdateContext <RoleObjectAccess> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <RoleObjectAccess>());

            return(_roleObjectAccessRepository.Update(ctx));
        }
Example #5
0
        public bool Update(Func <UpdateContext <SystemFormStateRule>, UpdateContext <SystemFormStateRule> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <SystemFormStateRule>());

            return(_systemFormStateRuleRepository.Update(ctx));
        }
        public bool Update(Func <UpdateContext <WorkFlowProcessLog>, UpdateContext <WorkFlowProcessLog> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <WorkFlowProcessLog>());

            return(_workFlowProcessLogRepository.Update(ctx));
        }
Example #7
0
        public bool Update(Func <UpdateContext <WorkFlowInstance>, UpdateContext <WorkFlowInstance> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <WorkFlowInstance>());

            return(_workFlowInstanceRepository.Update(ctx));
        }
Example #8
0
        public bool Update(Func <UpdateContext <EntityPermission>, UpdateContext <EntityPermission> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <EntityPermission>());

            return(_entityPermissionRepository.Update(ctx));
        }
Example #9
0
        public bool Update(Func <UpdateContext <TeamMembership>, UpdateContext <TeamMembership> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <TeamMembership>());

            return(_teamMembershipRepository.Update(ctx));
        }
Example #10
0
        public bool Update(Func <UpdateContext <Domain.Role>, UpdateContext <Domain.Role> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <Domain.Role>());

            return(_roleRepository.Update(ctx));
        }
Example #11
0
        public bool Update(Func <UpdateContext <SystemUser>, UpdateContext <SystemUser> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <SystemUser>());

            return(_repository.Update(ctx));
        }
Example #12
0
        public bool Update(Func <UpdateContext <LocalizedLabel>, UpdateContext <LocalizedLabel> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <LocalizedLabel>());

            return(_localizedLabelRepository.Update(ctx));
        }
Example #13
0
        public bool Update(Func <UpdateContext <ProcessStage>, UpdateContext <ProcessStage> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <ProcessStage>());

            return(_processStageRepository.Update(ctx));
        }
Example #14
0
        public bool Update(Func <UpdateContext <Domain.WebResource>, UpdateContext <Domain.WebResource> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <Domain.WebResource>());

            return(_webResourceRepository.Update(ctx));
        }
Example #15
0
        public bool Update(Func <UpdateContext <Domain.OptionSetDetail>, UpdateContext <Domain.OptionSetDetail> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <Domain.OptionSetDetail>());

            return(_optionSetDetailRepository.Update(ctx));
        }
Example #16
0
        public bool Update(Func <UpdateContext <Topic>, UpdateContext <Topic> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <Topic>());

            return(_topicRepository.Update(ctx));
        }
Example #17
0
        public bool Update(Func <UpdateContext <EventMessage>, UpdateContext <EventMessage> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <EventMessage>());

            return(_eventMessageRepository.Update(ctx));
        }
Example #18
0
        public bool Update(Func <UpdateContext <AttributeMap>, UpdateContext <AttributeMap> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <AttributeMap>());

            return(_attributeMapRepository.Update(ctx));
        }
        public bool Update(Func <UpdateContext <DuplicateRuleCondition>, UpdateContext <DuplicateRuleCondition> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <DuplicateRuleCondition>());

            return(_duplicateRuleConditionRepository.Update(ctx));
        }
Example #20
0
        public bool Update(Func <UpdateContext <Domain.StringMap>, UpdateContext <Domain.StringMap> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <Domain.StringMap>());

            return(_stringMapRepository.Update(ctx));
        }
Example #21
0
        public bool Update(Func <UpdateContext <BusinessUnit>, UpdateContext <BusinessUnit> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <BusinessUnit>());

            return(_businessUnitRepository.Update(ctx));
        }
        public bool Update(Func <UpdateContext <BusinessProcessFlowInstance>, UpdateContext <BusinessProcessFlowInstance> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <BusinessProcessFlowInstance>());

            return(_businessProcessFlowInstanceRepository.Update(ctx));
        }
Example #23
0
        public bool Update(Func <UpdateContext <Domain.Solution>, UpdateContext <Domain.Solution> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <Domain.Solution>());

            return(_solutionRepository.Update(ctx));
        }
Example #24
0
        public bool Update(Func <UpdateContext <Consumer>, UpdateContext <Consumer> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <Consumer>());

            return(_consumerRepository.Update(ctx));
        }
Example #25
0
        public bool Update(Func <UpdateContext <SolutionComponent>, UpdateContext <SolutionComponent> > context)
        {
            var ctx = context(UpdateContextBuilder.Build <SolutionComponent>());

            return(_solutionComponentRepository.Update(ctx));
        }