public HopDongLaoDongController(ILeaveTypeRepository leaverepo, ILeaveAllocationRepository leaveallocationrepo, IMapper mapper, UserManager <Employee> userManager, IChucVuRepository chucVuRepo, IChuyenMonRepository chuyenMonRepo, IPhongBanRepository phongBanRepo, IRoleRepository roleRepository, IWebHostEnvironment hostEnvironment, IUserRoleRepository userRoleRepository, IMauHopDongRepository mauHopDongRepository, IHopDongLaoDongRepository hopDongLaoDongRepository) { this.leaverepo = leaverepo; this.leaveallocationrepo = leaveallocationrepo; this.mapper = mapper; this.userManager = userManager; this.chucVuRepo = chucVuRepo; this.chuyenMonRepo = chuyenMonRepo; phongBanRep = phongBanRepo; this.roleRepository = roleRepository; webHostEnvironment = hostEnvironment; this.userRoleRepository = userRoleRepository; this.mauHopDongRepository = mauHopDongRepository; this.hopDongLaoDongRepository = hopDongLaoDongRepository; }
public XuatLuongCuoiThangController(ILeaveTypeRepository leaverepo, ILeaveAllocationRepository leaveallocationrepo, IMapper mapper, UserManager <Employee> userManager, IChucVuRepository chucVuRepo, IChuyenMonRepository chuyenMonRepo, IPhongBanRepository phongBanRepo, IRoleRepository roleRepository, IWebHostEnvironment hostEnvironment, IUserRoleRepository userRoleRepository, INhatKylamViecRepository nhatKylamViecRepository, IPhieuChi_LuongCuoiThangRepository phieuChi_LuongCuoiThangRepository, IPhieuChi_NKLVRepository phieuChi_NKLVRepository ) { this.leaverepo = leaverepo; this.leaveallocationrepo = leaveallocationrepo; this.mapper = mapper; this.userManager = userManager; this.chucVuRepo = chucVuRepo; this.chuyenMonRepo = chuyenMonRepo; this.roleRepository = roleRepository; webHostEnvironment = hostEnvironment; this.userRoleRepository = userRoleRepository; this.nhatKylamViecRepository = nhatKylamViecRepository; this.phieuChi_LuongCuoiThangRepository = phieuChi_LuongCuoiThangRepository; this.phieuChi_NKLVRepository = phieuChi_NKLVRepository; this.phongBanRepo = phongBanRepo; }
public LeaveRequestController( ILeaveRequestRepository leaveRequestRepo, ILeaveAllocationRepository leaveAllocationRepo, ILeaveTypeRepository leaveTypeRepo, IMapper mapper, UserManager <Employee> userManager, IPhongBanRepository phongBanRepository, INhatKylamViecRepository nhatKylamViecRepository) { _leaveTypeRepo = leaveTypeRepo; _leaveAllocationRepo = leaveAllocationRepo; _leaveRequestRepo = leaveRequestRepo; _mapper = mapper; _userManager = userManager; this.phongBanRepository = phongBanRepository; this.nhatKylamViecRepository = nhatKylamViecRepository; }
public LeaveAllocationController(ILeaveTypeRepository leaverepo, ILeaveAllocationRepository leaveallocationrepo, IMapper mapper, UserManager <Employee> userManager, IChucVuRepository chucVuRepo, IChuyenMonRepository chuyenMonRepo, IPhongBanRepository phongBanRepo) { _leaverepo = leaverepo; _leaveallocationrepo = leaveallocationrepo; _mapper = mapper; _userManager = userManager; _chucVuRepo = chucVuRepo; _chuyenMonRepo = chuyenMonRepo; _phongBanRep = phongBanRepo; }
public ChamCongController(ILeaveTypeRepository leaverepo, ILeaveAllocationRepository leaveallocationrepo, IMapper mapper, UserManager <Employee> userManager, IChucVuRepository chucVuRepo, IChuyenMonRepository chuyenMonRepo, IPhongBanRepository phongBanRepo, IRoleRepository roleRepository, IWebHostEnvironment hostEnvironment, IUserRoleRepository userRoleRepository, IMauHopDongRepository mauHopDongRepository, IHopDongLaoDongRepository hopDongLaoDongRepository, INhatKylamViecRepository nhatKylamViecRepository, ILoaiLichBieuRepository loaiLichBieuRepository, ILeaveAllocationRepository leaveAllocationRepository, ILeaveRequestRepository leaveRequestRepository, ILeaveTypeRepository leaveTypeRepository, IPhongBanRepository phongBanRepository, IPhieuChi_NKLVRepository phieuChi_NKLVRepository) { this.leaverepo = leaverepo; this.leaveallocationrepo = leaveallocationrepo; this.mapper = mapper; this.userManager = userManager; this.chucVuRepo = chucVuRepo; this.chuyenMonRepo = chuyenMonRepo; this.phongBanRepo = phongBanRepo; this.roleRepository = roleRepository; webHostEnvironment = hostEnvironment; this.userRoleRepository = userRoleRepository; this.mauHopDongRepository = mauHopDongRepository; this.hopDongLaoDongRepository = hopDongLaoDongRepository; this.nhatKylamViecRepository = nhatKylamViecRepository; this.loaiLichBieuRepository = loaiLichBieuRepository; this.leaveAllocationRepository = leaveAllocationRepository; this.leaveRequestRepository = leaveRequestRepository; this.leaveTypeRepository = leaveTypeRepository; this.phongBanRepository = phongBanRepository; this.phieuChi_NKLVRepository = phieuChi_NKLVRepository; }
public YeuCauTamUngLuongController( IYeuCauTamUngLuongRepository YeuCauTamUngLuongRepo, ILeaveAllocationRepository leaveAllocationRepo, ILeaveTypeRepository leaveTypeRepo, IMapper mapper, IUserRoleRepository userRoleRepository, IRoleRepository roleRepository, IPhieuChi_TamUngLuongRepository phieuChi_TamUngLuongRepository, UserManager <Employee> userManager, IPhongBanRepository phongBanRepository) { _leaveTypeRepo = leaveTypeRepo; _leaveAllocationRepo = leaveAllocationRepo; _YeuCauTamUngLuongRepo = YeuCauTamUngLuongRepo; _mapper = mapper; this.userRoleRepository = userRoleRepository; this.roleRepository = roleRepository; this.phieuChi_TamUngLuongRepository = phieuChi_TamUngLuongRepository; _userManager = userManager; this.phongBanRepository = phongBanRepository; }
public EmployeeController(ILeaveTypeRepository leaverepo, ILeaveAllocationRepository leaveallocationrepo, IMapper mapper, UserManager <Employee> userManager, IChucVuRepository chucVuRepo, IChuyenMonRepository chuyenMonRepo, IPhongBanRepository phongBanRepo, IRoleRepository roleRepository, IWebHostEnvironment hostEnvironment, IUserRoleRepository userRoleRepository) { _leaverepo = leaverepo; _leaveallocationrepo = leaveallocationrepo; _mapper = mapper; _userManager = userManager; _chucVuRepo = chucVuRepo; _chuyenMonRepo = chuyenMonRepo; _phongBanRep = phongBanRepo; _roleRepository = roleRepository; webHostEnvironment = hostEnvironment; this.userRoleRepository = userRoleRepository; }
protected override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); INhanVienRepository nhanVienRepository = uow.Repository <NhanVienRepository>(); IPhongBanRepository phongBanRepository = uow.Repository <PhongBanRepository>(); var role = EUserRole.Admin; // load nhanVien for LoggedInUser nhanVien = nhanVienRepository.GetByID(LoggedInUser.NhanvienID ?? 0); if (nhanVien != null) { phongBan = phongBanRepository.GetSingle(m => m.PhongbanID == nhanVien.PhongbanID); if (phongBan != null) { var tenPhongBan = phongBan.Ten.ToLower(); if (tenPhongBan.Contains("kinh")) { role = EUserRole.KinhDoanh; } else if (tenPhongBan.ToLower().Contains("in") || tenPhongBan.ToLower().Contains("kế toán")) { role = EUserRole.InHoaDon; } else // add more role here { role = EUserRole.ThuNgan; } } } // cache role RequestScope.UserRole = role; }
public PhongBanController(IPhongBanRepository phongBanRepository) { this.phongBanRepository = phongBanRepository; }
public PhongBanService(IPhongBanRepository phongBanRepository) { _phongBanRepository = phongBanRepository; }
public PhongBanBusiness(IPhongBanRepository res, IConfiguration configuration) { Secret = configuration["AppSettings:Secret"]; _res = res; }