Exemplo n.º 1
0
 public LoginHandler(
     IPwmDbContextFactory factory,
     ILogin login,
     INewUserService newUserService)
 {
     this.login          = login;
     this.newUserService = newUserService;
     this.db             = factory.Create();
 }
        public UserManagementViewModel(
            IPwmDbContextFactory factory,
            INewUserService newUserService)
        {
            this.newUserService = newUserService;
            db = factory.Create();

            var users = new List <User>();

            foreach (USERDATA userdata in this.db.USERDATA)
            {
                users.Add(new User()
                {
                    UserName = Encryption.DecryptString(userdata.USUSERNAME),
                    FullName = Encryption.DecryptString(userdata.USNAME),
                });
            }

            User = new ObservableCollection <User>(users);

            AddNewUserCommand = new AsyncCommand(AddNewUser);
        }
Exemplo n.º 3
0
 public DatabaseLogin(
     IPwmDbContextFactory dbContextFactory)
 {
     this.db = dbContextFactory.Create();
 }
Exemplo n.º 4
0
 public DatabaseDataManager(IPwmDbContextFactory dbDbContext, IUserInfo userInfo)
 {
     this.userInfo = userInfo;
     db            = dbDbContext.Create();
 }