Ejemplo n.º 1
0
 public DivisionController()
 {
     _divisionService     = new DivisionService(new DivisionRepository(), new DivisionValidator());
     _departmentService   = new DepartmentService(new DepartmentRepository(), new DepartmentValidator());
     _employeeService     = new EmployeeService(new EmployeeRepository(), new EmployeeValidator());
     _branchOfficeService = new BranchOfficeService(new BranchOfficeRepository(), new BranchOfficeValidator());
 }
Ejemplo n.º 2
0
 public BenefitService(IPointExUow uow, IClock clock, IBranchOfficeService branchOfficeService, INotificationService notificationService)
 {
     _clock = clock;
     _branchOfficeService = branchOfficeService;
     _notificationService = notificationService;
     Uow = uow;
 }
Ejemplo n.º 3
0
 public bool ValidCreateObject(BranchOffice branchOffice, IBranchOfficeService _branchOfficeService, ICompanyInfoService _companyInfoService)
 {
     VHasCompany(branchOffice, _companyInfoService);
     if (!isValid(branchOffice))
     {
         return(false);
     }
     VHasUniqueCode(branchOffice, _branchOfficeService);
     if (!isValid(branchOffice))
     {
         return(false);
     }
     VHasUniqueName(branchOffice, _branchOfficeService);
     if (!isValid(branchOffice))
     {
         return(false);
     }
     VHasAddress(branchOffice);
     if (!isValid(branchOffice))
     {
         return(false);
     }
     VHasPhoneNumber(branchOffice);
     if (!isValid(branchOffice))
     {
         return(false);
     }
     VHasEmail(branchOffice);
     return(isValid(branchOffice));
 }
Ejemplo n.º 4
0
 public BenefitController(IBenefitService benefitService, IShopService shopService, IBenefitFileService benefitFileService, IBranchOfficeService branchOfficeService)
 {
     _benefitService      = benefitService;
     _shopService         = shopService;
     _benefitFileService  = benefitFileService;
     _branchOfficeService = branchOfficeService;
 }
Ejemplo n.º 5
0
 public EmployeeAttendanceController()
 {
     _employeeService            = new RexERP_MVC.BAL.EmployeeService();
     _titleInfoService           = new TitleInfoService(new TitleInfoRepository(), new TitleInfoValidator());
     _employeeAttendanceService  = new EmployeeAttendanceService(new EmployeeAttendanceRepository(), new EmployeeAttendanceValidator());
     _branchOfficeService        = new BranchOfficeService(new BranchOfficeRepository(), new BranchOfficeValidator());
     _employeeWorkingTimeService = new EmployeeWorkingTimeService(new EmployeeWorkingTimeRepository(), new EmployeeWorkingTimeValidator());
 }
Ejemplo n.º 6
0
 public BenefitController(IBenefitService benefitService, ICurrentUser currentUser, IBranchOfficeService branchOffice,
                          INotificationService notificationService)
 {
     _benefitService      = benefitService;
     _notificationService = notificationService;
     _currentUser         = currentUser;
     _branchOfficeService = branchOffice;
 }
Ejemplo n.º 7
0
 public BranchOfficesController(IBranchOfficeService branchOfficeService, IMapper mapper, IHubContext <UserNotificationHub> hubContext, ConnectedClientsRepository connectedClientsRepository, IMediator mediator)
 {
     _branchOfficeService = branchOfficeService ?? throw new ArgumentNullException(nameof(branchOfficeService));
     _mapper     = mapper;
     _hubContext = hubContext;
     _connectedClientsRepository = connectedClientsRepository;
     _mediator = mediator;
 }
Ejemplo n.º 8
0
 public TitleInfoController()
 {
     _titleInfoService = new TitleInfoService(new TitleInfoRepository(), new TitleInfoValidator());
     _divisionService  = new DivisionService(new DivisionRepository(), new DivisionValidator());
     //  _departmentService = new DepartmentService(new DepartmentRepository(), new DepartmentValidator());
     // _employeeService = new EmployeeService();
     _branchOfficeService = new BranchOfficeService(new BranchOfficeRepository(), new BranchOfficeValidator());
 }
Ejemplo n.º 9
0
 public CountryController(
     ICountryService countryService,
     IBranchOfficeService branchOfficeService
     )
 {
     _countryService      = countryService;
     _branchOfficeService = branchOfficeService;
 }
Ejemplo n.º 10
0
        public Department VHasBranchOffice(Department department, IBranchOfficeService _branchOfficeService)
        {
            BranchOffice branchOffice = _branchOfficeService.GetObjectById(department.BranchOfficeId);

            if (branchOffice == null)
            {
                department.Errors.Add("Generic", "BranchOffice Tidak valid");
            }
            return(department);
        }
Ejemplo n.º 11
0
 public BranchOfficeController(IBranchOfficeService dataService, ILocalizationService localizationService,
     ICountryService countryService, IStateProvinceService stateprovinceService,
     IWorkContext workContext, ICacheManager cacheManager )
 {
     this.dataService          = dataService;
     this.localizationService  = localizationService;
     this.cacheManager         = cacheManager;
     this.countryService       = countryService;
     this.stateprovinceService = stateprovinceService;
     this.workContext          = workContext;
 }
 public EmployeeAttendanceController()
 {
     _employeeAttendanceService  = new EmployeeAttendanceService(new EmployeeAttendanceRepository(), new EmployeeAttendanceValidator());
     _employeeService            = new EmployeeService(new EmployeeRepository(), new EmployeeValidator());
     _titleInfoService           = new TitleInfoService(new TitleInfoRepository(), new TitleInfoValidator());
     _divisionService            = new DivisionService(new DivisionRepository(), new DivisionValidator());
     _departmentService          = new DepartmentService(new DepartmentRepository(), new DepartmentValidator());
     _employeeAttendanceService  = new EmployeeAttendanceService(new EmployeeAttendanceRepository(), new EmployeeAttendanceValidator());
     _branchOfficeService        = new BranchOfficeService(new BranchOfficeRepository(), new BranchOfficeValidator());
     _employeeWorkingTimeService = new EmployeeWorkingTimeService(new EmployeeWorkingTimeRepository(), new EmployeeWorkingTimeValidator());
 }
Ejemplo n.º 13
0
 public BranchOffice VHasUniqueName(BranchOffice branchOffice, IBranchOfficeService _branchOfficeService)
 {
     if (String.IsNullOrEmpty(branchOffice.Name) || branchOffice.Name.Trim() == "")
     {
         //  branchOffice.Errors.Add("Name", "Tidak boleh kosong");
     }
     else if (_branchOfficeService.IsNameDuplicated(branchOffice))
     {
         // branchOffice.Errors.Add("Name", "Tidak boleh ada duplikasi");
     }
     return(branchOffice);
 }
Ejemplo n.º 14
0
        protected void PrepareOfficeAssociationModel(IBranchOfficeAssociation model, BaseEntity entity, 
            IBranchOfficeService officeService, ICacheManager cacheManager)
        {
            var associatedOffices = entity.GetAttribute<List<Guid>>(SystemAttributeNames.AssociatedBrancOffices);

            if (associatedOffices != null && associatedOffices.Count > 0)
            {
                var availableOffices = PrepareSelectList(officeService, cacheManager);
                model.Offices = availableOffices
                    .Where(o => associatedOffices.Contains(new Guid(o.Value)))
                    .Select(o => o.Text)
                    .ToList();
            }
            else
                model.Offices = new List<string>();
        }
Ejemplo n.º 15
0
 public ClientController(IClientService clientService, ILocalizationService localizationService,
     ICountryService countryService, IStateProvinceService stateprovinceService, 
     IBranchOfficeService officeService, IGenericAttributeService attributeService, IUserActivityService userActivityService,
     IEncryptionService encryptionService, IWorkContext workContext, ICacheManager cacheManager )
 {
     this.clientService        = clientService;
     this.localizationService  = localizationService;
     this.officeService        = officeService;
     this.userActivityService  = userActivityService;
     this.encryptionService    = encryptionService;
     this.cacheManager         = cacheManager;
     this.countryService       = countryService;
     this.stateprovinceService = stateprovinceService;
     this.workContext          = workContext;
     this.attributeService     = attributeService;
 }
Ejemplo n.º 16
0
 public UserController(IUserService userService, ILocalizationService localizationService,
     IEncryptionService encryptionService, IUserRegistrationService registrationService,
     IWorkflowMessageService messageService, IGenericAttributeService attributeService,
     IWorkContext workContext, ICacheManager cacheManager, 
     IUserActivityService userActivityService, IBranchOfficeService officeService)
 {
     this.localizationService  = localizationService;
     this.cacheManager         = cacheManager;
     this.userActivityService  = userActivityService;
     this.encryptionService    = encryptionService;
     this.officeService        = officeService;
     this.registrationService  = registrationService;
     this.attributeService     = attributeService;
     this.messageService       = messageService;
     this.userService          = userService;
     this.workContext          = workContext;
 }
 public ConsumptionExcelParser(ErcContext ercContext, IBranchOfficeService branchOfficeService)
 {
     _ercContext          = ercContext;
     _branchOfficeService = branchOfficeService;
 }
Ejemplo n.º 18
0
 public Department UpdateObject(Department department, IBranchOfficeService _branchOfficeService)
 {
     return(department = _validator.ValidUpdateObject(department, this, _branchOfficeService) ? _repository.UpdateObject(department) : department);
 }
Ejemplo n.º 19
0
 public Department CreateObject(Department department, IBranchOfficeService _branchOfficeService)
 {
     department.Errors = new Dictionary <String, String>();
     return(_validator.ValidCreateObject(department, this, _branchOfficeService) ? _repository.CreateObject(department) : department);
 }
Ejemplo n.º 20
0
        public Department FindOrCreateObject(int branchOfficeId, string Code, string Name, string Description, IBranchOfficeService _branchOfficeService)
        {
            Department department = GetObjectByCode(Code);

            if (department != null)
            {
                department.Errors = new Dictionary <String, String>();
                return(department);
            }
            ;
            department = new Department
            {
                BranchOfficeId = branchOfficeId,
                Code           = Code,
                Name           = Name,
                Description    = Description,
            };
            return(this.CreateObject(department, _branchOfficeService));
        }
Ejemplo n.º 21
0
        public Department CreateObject(int branchOfficeId, string Code, string Name, string Description, IBranchOfficeService _branchOfficeService)
        {
            Department department = new Department
            {
                BranchOfficeId = branchOfficeId,
                Code           = Code,
                Name           = Name,
                Description    = Description,
            };

            return(this.CreateObject(department, _branchOfficeService));
        }
Ejemplo n.º 22
0
 public PaymentsDbfParser(ErcContext ercContext, IBranchOfficeService branchOfficeService)
 {
     _ercContext          = ercContext;
     _branchOfficeService = branchOfficeService;
 }
 public PaymentBatchesController(ErcContext ercContext, IMediator mediator, IBranchOfficeService branchOfficeService)
 {
     _ercContext          = ercContext ?? throw new ArgumentNullException(nameof(ercContext));
     _mediator            = mediator;
     _branchOfficeService = branchOfficeService;
 }
Ejemplo n.º 24
0
        protected string PrepareOfficeAssociationModel(List<Guid> associatedOffices, 
            IBranchOfficeService officeService, ICacheManager cacheManager)
        {
            if (associatedOffices != null && associatedOffices.Count > 0)
            {
                var availableOffices = PrepareSelectList(officeService, cacheManager);
                return availableOffices
                    .Where(o => associatedOffices.Contains(new Guid(o.Value)))
                    .Select(o => o.Text)
                    .ToDelimitedString();
            }

            return string.Empty;
        }
Ejemplo n.º 25
0
 public bool ValidDeleteObject(CompanyInfo companyInfo, IBranchOfficeService _branchOfficeService)
 {
     companyInfo.Errors.Clear();
     //VDontHaveBranchOffices(companyInfo, _branchOfficeService);
     return(isValid(companyInfo));
 }
Ejemplo n.º 26
0
 public DivisionController()
 {
     _divisionService     = new DivisionService(new DivisionRepository(), new DivisionValidator());
     _branchOfficeService = new BranchOfficeService(new BranchOfficeRepository(), new BranchOfficeValidator());
 }
Ejemplo n.º 27
0
 public bool ValidUpdateObject(BranchOffice branchOffice, IBranchOfficeService _branchOfficeService, ICompanyInfoService _companyInfoService)
 {
     // branchOffice.Errors.Clear();
     return(ValidCreateObject(branchOffice, _branchOfficeService, _companyInfoService));
 }
Ejemplo n.º 28
0
 public CompanyInfo SoftDeleteObject(CompanyInfo companyInfo, IBranchOfficeService _branchOfficeService)
 {
     return(companyInfo = _validator.ValidDeleteObject(companyInfo, _branchOfficeService) ?
                          _repository.SoftDeleteObject(companyInfo) : companyInfo);
 }
Ejemplo n.º 29
0
        protected IList<SelectListItem> PrepareSelectList(IBranchOfficeService officeService, ICacheManager cacheManager,
            PublishingStatus status = PublishingStatus.Active)
        {
            string cacheKey = ModelCacheEventUser.OFFICE_MODEL_KEY.FormatWith(
                "SelectList.{0}".FormatWith(status.ToString()));

            var cacheModel = cacheManager.Get(cacheKey, () =>
            {
                var offices = officeService.GetAll(status)
                    .Select(office =>
                    {
                        return new SelectListItem()
                        {
                            Value = office.RowId.ToString(),
                            Text = office.BranchName
                        };
                    })
                    .ToList();

                return offices;
            });

            return cacheModel;
        }
Ejemplo n.º 30
0
 public bool ValidCreateObject(Department department, IDepartmentService _departmentService, IBranchOfficeService _branchOfficeService)
 {
     VHasBranchOffice(department, _branchOfficeService);
     if (!isValid(department))
     {
         return(false);
     }
     VHasUniqueCode(department, _departmentService);
     if (!isValid(department))
     {
         return(false);
     }
     VHasUniqueName(department, _departmentService);
     return(isValid(department));
 }
Ejemplo n.º 31
0
 public BranchOfficeController()
 {
     _companyInfoService  = new CompanyInfoService(new CompanyInfoRepository(), new CompanyInfoValidator());
     _branchOfficeService = new BranchOfficeService(new BranchOfficeRepository(), new BranchOfficeValidator());
     _departmentService   = new DepartmentService(new DepartmentRepository(), new DepartmentValidator());
 }
Ejemplo n.º 32
0
 public bool ValidUpdateObject(Department department, IDepartmentService _departmentService, IBranchOfficeService _branchOfficeService)
 {
     department.Errors.Clear();
     ValidCreateObject(department, _departmentService, _branchOfficeService);
     return(isValid(department));
 }
Ejemplo n.º 33
0
 public AccountingPointExemptionClosedHandler(ErcContext ercContext, IBranchOfficeService branchOfficeService)
 {
     _ercContext          = ercContext;
     _branchOfficeService = branchOfficeService;
 }
Ejemplo n.º 34
0
 public SalaryProcessController()
 {
     _userAccountService          = new UserAccountService(new UserAccountRepository(), new UserAccountValidator());
     _companyInfoService          = new CompanyInfoService(new CompanyInfoRepository(), new CompanyInfoValidator());
     _branchOfficeService         = new BranchOfficeService(new BranchOfficeRepository(), new BranchOfficeValidator());
     _departmentService           = new DepartmentService(new DepartmentRepository(), new DepartmentValidator());
     _divisionService             = new DivisionService(new DivisionRepository(), new DivisionValidator());
     _titleInfoService            = new TitleInfoService(new TitleInfoRepository(), new TitleInfoValidator());
     _employeeService             = new EmployeeService(new EmployeeRepository(), new EmployeeValidator());
     _employeeEducationService    = new EmployeeEducationService(new EmployeeEducationRepository(), new EmployeeEducationValidator());
     _salaryItemService           = new SalaryItemService(new SalaryItemRepository(), new SalaryItemValidator());
     _formulaService              = new FormulaService(new FormulaRepository(), new FormulaValidator());
     _workingTimeService          = new WorkingTimeService(new WorkingTimeRepository(), new WorkingTimeValidator());
     _workingDayService           = new WorkingDayService(new WorkingDayRepository(), new WorkingDayValidator());
     _employeeWorkingTimeService  = new EmployeeWorkingTimeService(new EmployeeWorkingTimeRepository(), new EmployeeWorkingTimeValidator());
     _salaryStandardService       = new SalaryStandardService(new SalaryStandardRepository(), new SalaryStandardValidator());
     _salaryStandardDetailService = new SalaryStandardDetailService(new SalaryStandardDetailRepository(), new SalaryStandardDetailValidator());
     _salaryEmployeeService       = new SalaryEmployeeService(new SalaryEmployeeRepository(), new SalaryEmployeeValidator());
     _salaryEmployeeDetailService = new SalaryEmployeeDetailService(new SalaryEmployeeDetailRepository(), new SalaryEmployeeDetailValidator());
     _employeeAttendanceService   = new EmployeeAttendanceService(new EmployeeAttendanceRepository(), new EmployeeAttendanceValidator());
     //_employeeAttendanceDetailService = new EmployeeAttendanceDetailService(new EmployeeAttendanceDetailRepository(), new EmployeeAttendanceDetailValidator());
     _salarySlipService         = new SalarySlipService(new SalarySlipRepository(), new SalarySlipValidator());
     _salarySlipDetailService   = new SalarySlipDetailService(new SalarySlipDetailRepository(), new SalarySlipDetailValidator());
     _employeeLeaveService      = new EmployeeLeaveService(new EmployeeLeaveRepository(), new EmployeeLeaveValidator());
     _generalLeaveService       = new GeneralLeaveService(new GeneralLeaveRepository(), new GeneralLeaveValidator());
     _spklService               = new SPKLService(new SPKLRepository(), new SPKLValidator());
     _ptkpService               = new PTKPService(new PTKPRepository(), new PTKPValidator());
     _pph21sptService           = new PPH21SPTService(new PPH21SPTRepository(), new PPH21SPTValidator());
     _otherExpenseService       = new OtherExpenseService(new OtherExpenseRepository(), new OtherExpenseValidator());
     _otherExpenseDetailService = new OtherExpenseDetailService(new OtherExpenseDetailRepository(), new OtherExpenseDetailValidator());
     _otherIncomeService        = new OtherIncomeService(new OtherIncomeRepository(), new OtherIncomeValidator());
     _otherIncomeDetailService  = new OtherIncomeDetailService(new OtherIncomeDetailRepository(), new OtherIncomeDetailValidator());
     _thrService              = new THRService(new THRRepository(), new THRValidator());
     _thrDetailService        = new THRDetailService(new THRDetailRepository(), new THRDetailValidator());
     _slipGajiMiniService     = new SlipGajiMiniService(new SlipGajiMiniRepository(), new SlipGajiMiniValidator());
     _slipGajiDetailService   = new SlipGajiDetailService(new SlipGajiDetailRepository(), new SlipGajiDetailValidator());
     _slipGajiDetail1Service  = new SlipGajiDetail1Service(new SlipGajiDetail1Repository(), new SlipGajiDetail1Validator());
     _slipGajiDetail2AService = new SlipGajiDetail2AService(new SlipGajiDetail2ARepository(), new SlipGajiDetail2AValidator());
     _salaryProcessService    = new SalaryProcessService(new SalaryProcessValidator()
     {
         _employeeAttendanceService  = _employeeAttendanceService,
         _employeeLeaveService       = _employeeLeaveService,
         _employeeService            = _employeeService,
         _employeeWorkingTimeService = _employeeWorkingTimeService,
         _formulaService             = _formulaService,
         _generalLeaveService        = _generalLeaveService,
         _spklService               = _spklService,
         _ptkpService               = _ptkpService,
         _pph21sptService           = _pph21sptService,
         _otherExpenseService       = _otherExpenseService,
         _otherExpenseDetailService = _otherExpenseDetailService,
         _otherIncomeService        = _otherIncomeService,
         _otherIncomeDetailService  = _otherIncomeDetailService,
         _thrService                  = _thrService,
         _thrDetailService            = _thrDetailService,
         _workingDayService           = _workingDayService,
         _workingTimeService          = _workingTimeService,
         _salaryEmployeeDetailService = _salaryEmployeeDetailService,
         _salaryEmployeeService       = _salaryEmployeeService,
         _salaryItemService           = _salaryItemService,
         _salarySlipDetailService     = _salarySlipDetailService,
         _salarySlipService           = _salarySlipService,
         _slipGajiDetail1Service      = _slipGajiDetail1Service,
         _slipGajiDetail2AService     = _slipGajiDetail2AService,
         _slipGajiDetailService       = _slipGajiDetailService,
         _slipGajiMiniService         = _slipGajiMiniService,
     });
 }
Ejemplo n.º 35
0
 public CompanyInfoController()
 {
     _companyInfoService  = new CompanyInfoService(new CompanyInfoRepository(), new CompanyInfoValidator());
     _branchOfficeService = new BranchOfficeService(new BranchOfficeRepository(), new BranchOfficeValidator());
 }
Ejemplo n.º 36
0
 public BranchOfficeController(IBranchOfficeService branchOfficeService, IShopService shopService, ICurrentUser currentUser)
 {
     _branchOfficeService = branchOfficeService;
     _shopService         = shopService;
     _currentUser         = currentUser;
 }