예제 #1
0
 public EmplController(IEmplService service, ITitleService titleService, IProfileService profileService, ICompanyService companyService,
                       IDepartmentService departmentService, IAccountService accountService, IWorkScheduleService workScheduleService)
 {
     _Service             = service;
     _TitleService        = titleService;
     _ProfileService      = profileService;
     _CompanyService      = companyService;
     _DepartmentService   = departmentService;
     _AccountService      = accountService;
     _WorkScheduleService = workScheduleService;
 }
예제 #2
0
        private void EmplIntegration(string _firstname, string _secondname, string _middlename, string _workphone, string _mobilephone, string _userId, Guid _departmentId, Guid _titleId, Guid _company, string _managerUserId)
        {
            IEmplService         _EmplService         = DependencyResolver.Current.GetService <IEmplService>();
            IWorkScheduleService _WorkScheduleService = DependencyResolver.Current.GetService <IWorkScheduleService>();
            Guid?manageId = null;

            if (_managerUserId != String.Empty)
            {
                if (_EmplService.Contains(x => x.CompanyTableId == _company &&
                                          x.ApplicationUserId == _managerUserId))
                {
                    manageId = _EmplService.FirstOrDefault(x => x.CompanyTableId == _company &&
                                                           x.ApplicationUserId == _managerUserId).Id;
                }
            }

            if (!_EmplService.Contains(x => x.CompanyTableId == _company &&
                                       x.FirstName == _firstname &&
                                       x.MiddleName == _middlename &&
                                       x.SecondName == _secondname))
            {
                _EmplService.SaveDomain(new EmplTable()
                {
                    isIntegratedLDAP    = true,
                    FirstName           = _firstname,
                    SecondName          = _secondname,
                    MiddleName          = _middlename,
                    ApplicationUserId   = _userId,
                    DepartmentTableId   = _departmentId,
                    TitleTableId        = _titleId,
                    CompanyTableId      = _company,
                    WorkScheduleTableId = _WorkScheduleService.FirstOrDefault(x => x.Id != null).Id,
                    ManageId            = manageId
                }, "Admin");
            }
            else
            {
                EmplTable empl = _EmplService.FirstOrDefault(x => x.CompanyTableId == _company &&
                                                             x.FirstName == _firstname &&
                                                             x.MiddleName == _middlename &&
                                                             x.SecondName == _secondname);

                empl.FirstName         = _firstname;
                empl.SecondName        = _secondname;
                empl.MiddleName        = _middlename;
                empl.DepartmentTableId = _departmentId;
                empl.TitleTableId      = _titleId;
                empl.isIntegratedLDAP  = true;
                empl.ManageId          = manageId;
                _EmplService.SaveDomain(empl, "Admin");
            }
        }
예제 #3
0
 public WSController(
     IUserService userService,
     IUserStatusService userStatusService,
     IWorkScheduleVersionService workScheduleVersionService,
     IWorkScheduleService wsmService,
     IMapper mapper)
 {
     _userService       = userService;
     _userStatusService = userStatusService;
     _wsvService        = workScheduleVersionService;
     _wsmService        = wsmService;
     _mapper            = mapper;
 }
예제 #4
0
 public DocumentService(IUnitOfWork uow, INumberSeqService numberSeqService, IProcessService processService,
                        IAccountService accountService, IEmplService emplService, IWorkflowTrackerService workflowTrackerService,
                        IDelegationService delegationService, IDocumentReaderService documentReaderService, IWorkScheduleService workScheduleService)
 {
     _uow                    = uow;
     repoProcess             = uow.GetRepository <ProcessTable>();
     repoDocument            = uow.GetRepository <DocumentTable>();
     repoFile                = uow.GetRepository <FileTable>();
     _NumberSeqService       = numberSeqService;
     _ProcessService         = processService;
     _AccountService         = accountService;
     _EmplService            = emplService;
     _WorkflowTrackerService = workflowTrackerService;
     _DelegationService      = delegationService;
     _DocumentReaderService  = documentReaderService;
     _WorkScheduleService    = workScheduleService;
 }
예제 #5
0
 public ProcessController(IProcessService service, IGroupProcessService groupProcessService, IWorkScheduleService workScheduleService)
 {
     _Service             = service;
     _GroupProcessService = groupProcessService;
     _WorkScheduleService = workScheduleService;
 }
예제 #6
0
 public WorkScheduleController(IWorkScheduleService Service)
 {
     _Service = Service;
 }