public List <string> GetList(Guid relationToEntityId)
        {
            string entityID = relationToEntityId.ToStringObj();

            using (Db_BPMSEntities db = new Db_BPMSEntities())
            {
                return(db.sysBpmsEntityDefs.Where(d => d.DesignXML.Contains(entityID)).OrderBy(p => p.Name)
                       .Select(c => c.Name).AsNoTracking().ToList());
            }
        }
 public static TAnyType Create(Db_BPMSEntities context)
 {
     if (container == null)
     {
         container = new UnityContainer();
         container.RegisterType <IConditionRepository, ConditionRepository>();
         container.RegisterType <IDBConnectionRepository, DBConnectionRepository>();
         container.RegisterType <IDataBaseQueryRepository, DataBaseQueryRepository>();
         container.RegisterType <IDepartmentMemberRepository, DepartmentMemberRepository>();
         container.RegisterType <IDepartmentRepository, DepartmentRepository>();
         container.RegisterType <IDynamicFormRepository, DynamicFormRepository>();
         container.RegisterType <IElementRepository, ElementRepository>();
         container.RegisterType <IEntityDefRepository, EntityDefRepository>();
         container.RegisterType <IEventRepository, EventRepository>();
         container.RegisterType <IGatewayRepository, GatewayRepository>();
         container.RegisterType <ILURowRepository, LURowRepository>();
         container.RegisterType <ILUTableRepository, LUTableRepository>();
         container.RegisterType <IProcessRepository, ProcessRepository>();
         container.RegisterType <ISequenceFlowRepository, SequenceFlowRepository>();
         container.RegisterType <IStepRepository, StepRepository>();
         container.RegisterType <ITaskRepository, TaskRepository>();
         container.RegisterType <IThreadRepository, ThreadRepository>();
         container.RegisterType <IThreadTaskRepository, ThreadTaskRepository>();
         container.RegisterType <IThreadVariableRepository, ThreadVariableRepository>();
         container.RegisterType <IVariableRepository, VariableRepository>();
         container.RegisterType <ILaneRepository, LaneRepository>();
         container.RegisterType <IUserRepository, UserRepository>();
         container.RegisterType <IDocumentFolderRepository, DocumentFolderRepository>();
         container.RegisterType <IDocumentDefRepository, DocumentDefRepository>();
         container.RegisterType <IDocumentRepository, DocumentRepository>();
         container.RegisterType <IVariableDependencyRepository, VariableDependencyRepository>();
         container.RegisterType <IEmailAccountRepository, EmailAccountRepository>();
         container.RegisterType <IThreadEventRepository, ThreadEventRepository>();
         container.RegisterType <IApplicationPageRepository, ApplicationPageRepository>();
         container.RegisterType <IApplicationPageAccessRepository, ApplicationPageAccessRepository>();
         container.RegisterType <IAPIAccessRepository, APIAccessRepository>();
         container.RegisterType <IMessageTypeRepository, MessageTypeRepository>();
         container.RegisterType <IProcessGroupRepository, ProcessGroupRepository>();
         container.RegisterType <IConfigurationRepository, ConfigurationRepository>();
     }
     return(container.Resolve <TAnyType>(new ResolverOverride[] { new ParameterOverride("context", context) }));
 }
        public List <sysBpmsApplicationPageAccess> GetList(Guid?applicationPageID, PagingProperties currentPaging)
        {
            using (Db_BPMSEntities db = new Db_BPMSEntities())
            {
                if (currentPaging != null)
                {
                    currentPaging.RowsCount = db.sysBpmsApplicationPageAccesses.Where(d => !applicationPageID.HasValue || d.ApplicationPageID == applicationPageID).Count();
                    if (Math.Ceiling(Convert.ToDecimal(currentPaging.RowsCount) / Convert.ToDecimal(currentPaging.PageSize)) < currentPaging.PageIndex)
                    {
                        currentPaging.PageIndex = 1;
                    }

                    return(db.sysBpmsApplicationPageAccesses.Where(d => !applicationPageID.HasValue || d.ApplicationPageID == applicationPageID).OrderByDescending(p => p.ID).Skip((currentPaging.PageIndex - 1) * currentPaging.PageSize).Take(currentPaging.PageSize).AsNoTracking().ToList());
                }
                else
                {
                    return(db.sysBpmsApplicationPageAccesses.Where(d => !applicationPageID.HasValue || d.ApplicationPageID == applicationPageID).AsNoTracking().ToList());
                }
            }
        }
        public List <sysBpmsEntityDef> GetList(string name, bool?isActive, PagingProperties currentPaging)
        {
            using (Db_BPMSEntities db = new Db_BPMSEntities())
            {
                name = name ?? string.Empty;
                var query = db.sysBpmsEntityDefs.Where(d =>
                                                       (name == string.Empty || d.Name.Contains(name) || d.DisplayName.Contains(name)) &&
                                                       (!isActive.HasValue || d.IsActive == isActive));
                if (currentPaging != null)
                {
                    currentPaging.RowsCount = query.Count();
                    if (Math.Ceiling(Convert.ToDecimal(currentPaging.RowsCount) / Convert.ToDecimal(currentPaging.PageSize)) < currentPaging.PageIndex)
                    {
                        currentPaging.PageIndex = 1;
                    }

                    return(query.OrderBy(p => p.Name).Skip((currentPaging.PageIndex - 1) * currentPaging.PageSize).Take(currentPaging.PageSize).AsNoTracking().ToList());
                }
                else
                {
                    return(query.OrderBy(p => p.Name).AsNoTracking().ToList());
                }
            }
        }
 public DepartmentRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 6
0
 public UnitOfWork(Db_BPMSEntities db_BPMS)
 {
     this.Context = db_BPMS;
 }
Esempio n. 7
0
 public GatewayRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
 public DBConnectionRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 9
0
 public LURowRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
 public ApplicationPageRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 11
0
 public ThreadRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
 public EntityDefRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 13
0
 public UserRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 14
0
 public DynamicFormRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
 public VariableDependencyRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 16
0
 public MessageTypeRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 17
0
 public APIAccessRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 18
0
 public SequenceFlowRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 19
0
 public DocumentFolderRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
 public ProcessGroupRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 21
0
 public EmailAccountRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
 public ConfigurationRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }
Esempio n. 23
0
 public DataBaseQueryRepository(Db_BPMSEntities context)
 {
     this.Context = context;
 }