예제 #1
0
 public RoleService(
     IUnitOfWork unitOfWork,
     ICacheManager cacheManager,
     IDeptService deptService)
 {
     _unitOfWork   = unitOfWork;
     _cacheManager = cacheManager;
     _deptService  = deptService;
 }
예제 #2
0
 public DeptController(
     IWorkContextAccessor workContextAccessor,
     IDeptService deptService,
     IMapper mapper)
     : base(workContextAccessor)
 {
     _deptService = deptService;
     _mapper      = mapper;
 }
 public UserBaseController(IUserRoleService iService, IRoleService rService, IUserDetailService aService, IUserBaseService uService, ICompanyService cService, IDeptService dService)
 {
     userDetailService    = aService;
     userBaseService      = uService;
     companyService       = cService;
     deptService          = dService;
     roleService          = rService;
     userRoleIndexService = iService;
 }
예제 #4
0
 public MainPageViewModel(IDeptService deptService, NavigationService navigation)
 {
     this._deptService = deptService;
     LoadDepts();
     ItemClickCommand = new RelayCommand<object>((e) =>
     {
         var parameter = e as Dept;
         navigation.Navigate<Views.ProgressPage>(parameter.DepartmentID);
     });
 }
예제 #5
0
 public DeptController
 (
     DataContext context,
     IMapper mapper,
     IDeptService dService
 )
 {
     _context  = context;
     _mapper   = mapper;
     _dService = dService;
 }
예제 #6
0
        static ViewModelLocator()
        {
            ServiceLocator.Default.RegisterSingleton<IMenusService, MenusService>();
            menusService = ServiceLocator.Default.Resolve<IMenusService>();

            ServiceLocator.Default.RegisterSingleton<IDeptService, DeptService>();
            deptService = ServiceLocator.Default.Resolve<IDeptService>();

            ServiceLocator.Default.RegisterSingleton<IQueryService, QueryService>();
            queryService = ServiceLocator.Default.Resolve<IQueryService>();
        }
예제 #7
0
 public UserService(
     IUnitOfWork unitOfWork,
     IOptions <JwtOptions> jwtOptions,
     ICacheManager cacheManager,
     IDeptService deptService,
     IRoleService roleService)
 {
     _unitOfWork   = unitOfWork;
     _jwtConfig    = jwtOptions.Value;
     _cacheManager = cacheManager;
     _deptService  = deptService;
     _roleService  = roleService;
 }
예제 #8
0
        /// <summary>
        /// 根据接收者类型,来获取角色用户树的数据
        /// </summary>
        /// <param name="roleIDs">角色ID</param>
        /// <param name="curUserID">当前用户ID</param>
        /// <param name="receiverType">接收者类型</param>
        /// <returns>用户列表</returns>
        public IList <User> GetUserListByRoleReceiverType(string[] roleIDs, string curUserID, int receiverType)
        {
            IList <User> userList = null;

            using (var session = SessionFactory.CreateSession())
            {
                if (receiverType == 0)
                {
                    //直接根据角色查询
                    var rum = new RoleUserManager();
                    userList = rum.GetUserListByRoles(roleIDs, session);
                }
                else
                {
                    //根据用户级别关系查询
                    // 上司:1, 同事:2, 下属:3
                    IDeptService deptService = DeptServiceFactory.CreateDeptService();
                    userList = deptService.GetUserListByDeptRank(roleIDs, curUserID, receiverType);
                }
            }
            return(userList);
        }
예제 #9
0
 public AdminDeptController(IDeptService _deptService)
 {
     this._deptService = _deptService;
 }
예제 #10
0
 public DeptsController(IDeptService service)
 {
     _service = service;
 }
예제 #11
0
파일: CrmTest1.cs 프로젝트: ssjylsg/crm
 public override void MyTestInitialize()
 {
     _userInfoService = DependencyResolver.Resolver<IUserInfoService>();
     _departmentService = DependencyResolver.Resolver<IDeptService>();
     _categoryService = DependencyResolver.Resolver<ICategoryService>();
     _categoryItemService = DependencyResolver.Resolver<ICategoryItemService>();
     _operatorUser = _userInfoService.FindByUserName(this._loginName);
     _staff = _userInfoService.FindStaffById(1);
     _customerService = DependencyResolver.Resolver<ICustomerService>();
     base.MyTestInitialize();
 }
예제 #12
0
 public SysUserController(IUserService userService, IRoleService roleService, IDeptService deptService)
 {
     this._userService = userService;
     this._roleService = roleService;
     this._deptService = deptService;
 }
예제 #13
0
 public UserService(IUserRepository userRepository, IDeptService deptService)
 {
     _userRepository = userRepository;
     _deptService    = deptService;
 }
예제 #14
0
 public DeptsController(ApplicationDbContext context, IDeptService deptService)
 {
     _context     = context;
     _deptService = deptService;
 }
예제 #15
0
 public DeptController(IDeptService dService, ICompanyService cService)
 {
     deptService    = dService;
     companyService = cService;
 }
예제 #16
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="deptService"></param>
 public DeptController(IDeptService deptService)
 {
     _deptService = deptService;
 }
예제 #17
0
 public SysDeptController(IDeptService deptService)
 {
     this._deptService = deptService;
 }