Beispiel #1
0
        public Report()
        {
            IDbFactory factory = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            _reportDefRepo = new DataReport <ReportServer>(factory);
            _reportRepo    = new DataReport <TReport>(factory);
        }
Beispiel #2
0
 public ICDRequestFormService()
 {
     BC = new ICDRequestFormBC(
         DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow),
         DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.WorkflowDoc)
         );
 }
Beispiel #3
0
 public DocumentService()
 {
     _dbFactory          = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.WorkflowDoc);
     _documentRepository = new DocumentRepository(_dbFactory);
     _work      = new UnitOfWork(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.WorkflowDoc));
     _webHelper = new WebHelper();
 }
Beispiel #4
0
        public NotificationService()
        {
            var dbContext = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            dataProcessingProvider = new TicketDataProcessingProvider(dbContext);
            ticketEnquiry          = new TicketDataProcessingProvider(dbContext);
        }
Beispiel #5
0
 public AttachmentService()
 {
     _dbFactory          = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.WorkflowDoc);
     _tempFileRepository = new AttachementRepository <FileTemp>(_dbFactory);
     _work      = new UnitOfWork(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.WorkflowDoc));
     _webHelper = new WebHelper();
 }
Beispiel #6
0
        public EFormIntegrated() : base()
        {
            var dbSource = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            requestHeaderRepo  = new RequestHeaderRepository(dbSource);
            formIntegratedRepo = new SimpleRepository <TicketFormIntegrated>(dbSource);
        }
Beispiel #7
0
        public TicketService()
        {
            var dbContext = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            dataProcessingProvider = new TicketDataProcessingProvider(dbContext);
            this.unitOfWork        = new UnitOfWork(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));

            ticketEnquiry = (ITicketEnquiry)dataProcessingProvider;
            load          = new LoadTicketData(dataProcessingProvider);

            this.subCategoryRepo             = new TicketSubCategoryRepository(dbContext);
            this.categoryRepo                = new TicketCategoryRepository(dbContext);
            this.agentRepo                   = new TicketAgentRepository(dbContext);
            this.deptRepo                    = new TicketDeptRepository(dbContext);
            this.groupPolicyRepo             = new TicketGroupPolicyRepository(dbContext);
            this.teamRepo                    = new TicketTeamRepository(dbContext);
            this.teamAgentAssignRepo         = new TicketTeamAgentAssignRepository(dbContext);
            this.ticketItemRepo              = new TicketItemRepository(dbContext);
            this.ticketLookupRepo            = new TicketLookupRepository(dbContext);
            this.slaRepo                     = new TicketSlaRepository(dbContext);
            this.priorityRepo                = new TicketPriorityRepository(dbContext);
            this.groupPolicyTeamAssignRepo   = new TicketGroupPolicyTeamAssignRepository(dbContext);
            this.ticketingRepo               = new TicketingRepository(dbContext);
            this.groupPolicyReportAssignRepo = new TicketGroupPolicyReportAssignRepository(dbContext);
            this.slaMappingRepo              = new TicketSlaMappingRepository(dbContext);
        }
        public PBFRequestFormService()
        {
            var workflow    = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);
            var docWorkflow = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.WorkflowDoc);

            BC = new PBFRequestFormBC(workflow, docWorkflow);
        }
Beispiel #9
0
        public AbstractTicketIntegrated()
        {
            var dbSource = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            ticketService   = new TicketService();
            dataProProvider = new TicketDataProcessingProvider(dbSource);
            empRepo         = new EmployeeRepository(dbSource);
        }
Beispiel #10
0
        public IEnumerable <T> AttachFileTemp <T>(int requestId) where T : FileUpload
        {
            var attachementRepo = new AttachementRepository <T>(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.WorkflowDoc));

            var attachments = attachementRepo.GetAll().Where(t => t.Id == requestId);

            return(attachments);
        }
        public ATTRequestFormService()
        {
            workflow = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);
            var docWorkflow = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.WorkflowDoc);

            BC = new ATTRequestFormBC(workflow, docWorkflow);
            _FlightDetailRepository = new FlightDetailRepository(workflow);
        }
Beispiel #12
0
        public MailEntegrated() : base()
        {
            var dbSource = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            emailRepo        = new SimpleRepository <EmailItem>(dbSource);
            deptRepo         = new TicketDepartmentRepository(dbSource);
            fileUploadRepo   = new UploadFileRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.WorkflowDoc));
            emailAttchedRepo = new SimpleRepository <Domain.Entities.Email.FileAttachement>(dbSource);
        }
Beispiel #13
0
        public WorklistService(string userAccount = null)
        {
            IDbFactory dbFactory = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            _actLog   = new ActivityHistoryRepository(dbFactory);
            _repo     = new WMRepository(dbFactory);
            _provider = new ProcInstProvider(userAccount);
            _account  = userAccount.FQNWithK2Label();
        }
Beispiel #14
0
        protected ScheduleJobBase()
        {
            _EmailService = new EmailService();
            _DbFactory    = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            _JobRepository          = new JobRepository(_DbFactory);
            _EmailContentRepository = new EmailContentRepository(_DbFactory);
            _RecipientRepository    = new RecipientRepository(_DbFactory);

            _Job        = _JobRepository.Get(p => p.KeyValue == KeyValue);
            Attachments = new List <EmailFileAttachment>();
        }
Beispiel #15
0
        public IEnumerable <ItemTypeDto> GetItemTypes(int itemId)
        {
            var sql = "SELECT IT.ID, " +
                      "    IT.ITEM_TYPE_NAME itemTypeName,  " +
                      "    IT.DESCRIPTION description " +
                      "FROM IT.ITEM_ITEM_TYPE IIT " +
                      "    INNER JOIN IT.ITEM_TYPE IT ON IIT.ITEM_TYPE_ID = IT.ID " +
                      "WHERE IIT.ITEM_ID = @itemId ORDER BY IT.SEQUENCE, IT.ITEM_TYPE_NAME ";
            IRequestItemRepository requestItemRepository = new RequestItemRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));

            IEnumerable <ItemTypeDto> itemTypes = requestItemRepository.SqlQuery <ItemTypeDto>(sql, new object[] { new SqlParameter("@itemId", itemId) });

            return(itemTypes);
        }
Beispiel #16
0
        public FormsController()
        {
            _attachmentService  = new Lazy <IAttachmentService>(() => new AttachmentService(), true);
            _documentRepository = new DocumentRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));
            _fileRepository     = new DocumentFileRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.WorkflowDoc));
            _worklistRepository = new WMRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));

            _deprecatedProcCode.Add(PROCESSCODE.ITF);
            _deprecatedProcCode.Add(PROCESSCODE.BCJ);
            _deprecatedProcCode.Add(PROCESSCODE.AVJB);
            _deprecatedProcCode.Add(PROCESSCODE.RSVNFF);
            _deprecatedProcCode.Add(PROCESSCODE.RSVNCR);
            _deprecatedProcCode.Add(PROCESSCODE.ERF);
            _deprecatedProcCode.Add(PROCESSCODE.ATT);
            _deprecatedProcCode.Add(PROCESSCODE.PB);
        }
Beispiel #17
0
        public IEnumerable <ItemRoleDto> GetItemRoles(int itemId, int itemTypeId)
        {
            IRequestItemRepository requestItemRepository = new RequestItemRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));

            var sql = " SELECT IR.ID id, " +
                      "    IR.ROLE_NAME roleName,  " +
                      "    IR.DESCRIPTION description,  " +
                      "     IR.ADMIN isAdmin  " +
                      "FROM IT.ITEM_ITEM_TYPE IIT  " +
                      "    INNER JOIN IT.ITEM_ROLE_MAPPING TM ON IIT.ID = TM.ITEM_ITEM_TYPE_ID  " +
                      "    INNER JOIN IT.ITEM_ROLE IR ON IR.ID = TM.ITEM_ROLE_ID  " +
                      "WHERE IIT.ITEM_ID = @itemId AND IIT.ITEM_TYPE_ID = @itemTypeId ORDER BY IR.SEQUENCE, IR.ROLE_NAME ";

            IEnumerable <ItemRoleDto> itemRoles = requestItemRepository.SqlQuery <ItemRoleDto>(sql, new object[] { new SqlParameter("@itemId", itemId), new SqlParameter("@itemTypeId", itemTypeId) });

            return(itemRoles);
        }
Beispiel #18
0
        protected string GetReferenceNo()
        {
            ILookupRepository lookupReposity = new LookupRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));

            var lookup = lookupReposity.GetLookup("[HR].[EMPLOYEE_REQUISITION].[REFERENCE_NO]");

            if ((HR_RECRUITMENT.Equals(CurrentActivity().ActivityName)) && lookup != null)
            {
                int stockNum = Convert.ToInt32(lookup.Value);
                lookup.Value = (++stockNum).ToString();
                lookupReposity.Update(lookup);
                return(string.Concat(DateTime.Now.ToString("yyyyMMdd"), "-", stockNum.ToString("0000")));
            }
            else
            {
                return(null);
            }
        }
Beispiel #19
0
        protected string GetProjectReference(bool hasRef)
        {
            ILookupRepository lookupReposity = new LookupRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));

            var lookup = lookupReposity.GetLookup("[EVENT].[PROJECT_BRIEF].[PROJECT_REFERENCE]");

            if ((MARCOM_TECHNICAL.Equals(CurrentActivity().ActivityName)) && lookup != null && !hasRef)
            {
                int stockNum = Convert.ToInt32(lookup.Value);
                lookup.Value = (++stockNum).ToString();
                lookupReposity.Update(lookup);
                return(string.Concat(DateTime.Now.ToString("yy"), stockNum.ToString("0000")));
            }
            else
            {
                return(null);
            }
        }
Beispiel #20
0
        public IEnumerable <ItemDto> GetItems(int sessionId, bool deprecated = false)
        {
            var sql = "SELECT ID id, " +
                      "    DEPT_SESSION_ID sessionId, " +
                      "    REQUEST_ITEM_NAME itemName, " +
                      "    DESCRIPTION description, " +
                      "    HOD_REQUIRED hodRequired " +
                      "FROM IT.ITEM " +
                      "WHERE DEPT_SESSION_ID = @sessionId " +
                      (!deprecated ? " AND DEPRECATED = 0 " : string.Empty) +
                      "ORDER BY SEQUENCE, REQUEST_ITEM_NAME ";

            IRequestItemRepository requestItemRepository = new RequestItemRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));

            IEnumerable <ItemDto> items = requestItemRepository.SqlQuery <ItemDto>(sql, new object[] { new SqlParameter("@sessionId", sessionId) });

            return(items);
        }
Beispiel #21
0
        public BcjRequestContentService()
        {
            var workflow = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            _projectDetailRepository = new ProjectDetailRepository(workflow);
        }
Beispiel #22
0
        public RequestHeaderService()
        {
            IDbFactory dbFactory = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            requestHeaderRepo = new RequestHeaderRepository(dbFactory);
        }
Beispiel #23
0
        public GenericFormRpt()
        {
            IDbFactory factory = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            _procInstRepo = new DataReport <GenericForm>(factory);
        }
        public IEnumerable <AttandanceDetailType> GetAttandanceDetailTypeList()
        {
            ATDDetailTypeRepository rep = new ATDDetailTypeRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));

            return(rep.GetAll().ToList());
        }
Beispiel #25
0
        protected IEnumerable <TEntity> SqlQuery <TEntity>(string sql, params object[] parameters) where TEntity : class
        {
            var dbContext = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow).init();

            return(dbContext.Database.SqlQuery <TEntity>(sql, parameters));
        }
Beispiel #26
0
 public RoleRightService()
 {
     _Repository = new RoleRightRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));
 }
Beispiel #27
0
 public AuthRepository() : base(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow))
 {
     userManager = new UserManager <IdentityUser>(new UserStore <IdentityUser>(DbContext));
 }
Beispiel #28
0
 public LookupService()
 {
     menuReposity        = new MenuRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));
     lookupReposity      = new LookupRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));
     lookupChildReposity = new LookupRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));
 }
Beispiel #29
0
        public SchedulerService()
        {
            IDbFactory dbFactory = DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow);

            _JobRepository = new JobRepository(dbFactory);
        }
        public IEnumerable <N2WorkType> GetWorkTypes()
        {
            IN2WorkTypeRepository workTypeRepository = new N2WorkTypeRepository(DbContextSelector.getInstance().getDbFactory(DbContextSelector.DbName.Workflow));

            return(workTypeRepository.GetAll().OrderBy(p => p.Sequence).ToList());
        }