Beispiel #1
0
        public ActionResult AddUser([FromBody] User user)
        {
            var repo   = new UserManagementRepository();
            var status = repo.CreateUser(user);

            return(Ok(status));
        }
Beispiel #2
0
        public UserAuthorizationResponse AuthenticateUser(UserAuthorizationDomain oUserAuthorizationDomain)
        {
            UserAuthorizationResponse oUserAuthorizationResponse = UserManagementRepository.AuthenticateUser(oUserAuthorizationDomain);

            try
            {
                // Generate an Encrypted Token and Pass in Message, if OTP Successfully Validated
                // This new Token is passed for Security Purposes for APP, so that OTP Screen cannot be ByPassed
                if (oUserAuthorizationResponse.isUserAuthenticated)
                {
                    oUserAuthorizationResponse.message = "User authenticated successfully.";
                }
                else
                {
                    oUserAuthorizationResponse.message = "User name or password is incorrect.";
                }
            }
            catch (Exception ex)
            {
                oUserAuthorizationResponse.isUserAuthenticated = false;
                oUserAuthorizationResponse.message             = "Error authenticating user : " + ex.Message;
            }

            return(oUserAuthorizationResponse);
        }
Beispiel #3
0
        public ActionResult Create()
        {
            ser = new UserManagementRepository();

            var model = new Hotels.ClientDataModel.MetaData.Hotel.UserManagementModel.CreateAspUser
            {
                // AgentList = _agentPorvider.getAllAgentList()
            };

            ViewData["RolesList"] = ser.GetAllRolesList();
            return(View(model));
        }
Beispiel #4
0
 public UserManagementService()
 {
     _userManagmentRepository = new UserManagementRepository();
 }
 public UserManagementController(TransportDbContext dbContext)
 {
     _userManagementRepository = new UserManagementRepository(dbContext);
     _dbContext = dbContext;
 }
Beispiel #6
0
 public UserService()
 {
     _UserManagementRepo = new UserManagementRepository();
 }
        private void RegisterRepos()
        {
            var userManagementRepository = new UserManagementRepository(Settings.ConnectionString);

            _objectContainer.RegisterInstanceAs(userManagementRepository);
        }
 public List<tb_Users> GetAllUsers()
 {
     _repository = new UserManagementRepository();
     return _repository.GetAllUsers();
 }
 public bool UpdateUser(tb_Users userModel)
 {
     _repository = new UserManagementRepository();
     return _repository.UpdateUser(userModel);
 }
 public bool DeleteUser(tb_Users user)
 {
     _repository = new UserManagementRepository();
     return _repository.DeleteUser(user);
 }
        public bool AddUser(tb_Users users)
        {
            _repository = new UserManagementRepository();

            return _repository.AddUser(users);
        }
Beispiel #12
0
 public UserService(DatabaseContext db)
 {
     _UserManagementRepo = new UserManagementRepository(db);
     _db = db;
 }
 public UserManagementBLL(DbContext context)
 {
     this.repository = new UserManagementRepository(context);
 }
Beispiel #14
0
 public UserService(DatabaseContext _db)
 {
     _userManagementRepo = new UserManagementRepository(_db);
 }