public DelegationSettingsForUserViewModel(IDelegationRepository delegationRepository, IUserManagementRepository userManagementRepository, string username)
        {
            this.delegationRepository = delegationRepository;
            this.userManagementRepository = userManagementRepository;
            int totalCount;
            var allnames =
                userManagementRepository.GetUsers(0, 100, out totalCount)
                .Select(x => new SelectListItem
                {
                    Text = x
                }).ToList();
            allnames.Insert(0, new SelectListItem { Text = DelegationSettingsForUserInputModel.ChooseItem, Value = "" });
            this.AllUserNames = allnames;

            this.UserName = username;
            if (!IsNew)
            {
                var realmSettings =
                        this.delegationRepository
                            .GetDelegationSettingsForUser(this.UserName)
                            .ToArray();
                this.DelegationSettings = realmSettings;
            }
            else
            {
                this.DelegationSettings = new DelegationSetting[0];
            }
        }
 public DelegationService(IDelegationRepository delegRepo, IEmployeeRepository empRepo, IVehicleRepository vehRepo, IMapper mapper)
 {
     _delegationRepo = delegRepo;
     _employeeRepo   = empRepo;
     _vehRepo        = vehRepo;
     _mapper         = mapper;
 }
示例#3
0
        public DelegationSettingsForUserViewModel(IDelegationRepository delegationRepository, IUserManagementRepository userManagementRepository, string username)
        {
            this.delegationRepository     = delegationRepository;
            this.userManagementRepository = userManagementRepository;
            int totalCount;
            var allnames =
                userManagementRepository.GetUsers(0, 100, out totalCount)
                .Select(x => new SelectListItem
            {
                Text = x
            }).ToList();

            allnames.Insert(0, new SelectListItem {
                Text = DelegationSettingsForUserInputModel.ChooseItem, Value = ""
            });
            this.AllUserNames = allnames;

            this.UserName = username;
            if (!IsNew)
            {
                var realmSettings =
                    this.delegationRepository
                    .GetDelegationSettingsForUser(this.UserName)
                    .ToArray();
                this.DelegationSettings = realmSettings;
            }
            else
            {
                this.DelegationSettings = new DelegationSetting[0];
            }
        }
示例#4
0
 public Request(IConfigurationRepository configuration, IRelyingPartyRepository relyingPartyRepository,
                IDelegationRepository delegationRepository)
 {
     _configuration         = configuration;
     RelyingPartyRepository = relyingPartyRepository;
     DelegationRepository   = delegationRepository;
 }
示例#5
0
 public Request(IConfigurationRepository configuration, IRelyingPartyRepository relyingPartyRepository,
     IDelegationRepository delegationRepository)
 {
     _configuration = configuration;
     RelyingPartyRepository = relyingPartyRepository;
     DelegationRepository = delegationRepository;
 }
 public DelegationController(IDelegationRepository delegationRepository, IUserManagementRepository userManagementRepository)
 {
     this.delegationRepository     = delegationRepository;
     this.userManagementRepository = userManagementRepository;
 }
 public DelegationAdminController(IDelegationRepository repository)
 {
     _repository = repository;
 }
 public DelegationViewModel(IDelegationRepository delegationRepository)
 {
     this.delegationRepository = delegationRepository;
 }
 public DelegationController(IDelegationRepository delegationRepository, IUserManagementRepository userManagementRepository)
 {
     this.delegationRepository = delegationRepository;
     this.userManagementRepository = userManagementRepository;
 }
示例#10
0
 public DelegationViewModel(IDelegationRepository delegationRepository)
 {
     this.delegationRepository = delegationRepository;
 }
示例#11
0
 public Request(GlobalConfigurationModel configuration, IRelyingPartyRepository relyingPartyRepository, IDelegationRepository delegationRepository)
 {
     _configuration = configuration;
     _relyingPartyRepository = relyingPartyRepository;
     _delegationRepository = delegationRepository;
 }
 public DelegationController(IDelegationRepository delegationRepository)
 {
     _delegationRepository = delegationRepository;
 }
 public DelegationAdminController(IDelegationRepository repository)
 {
     Repository = repository;
 }