public AddProvidersViewModel(IDatabase database)
        {
            userDbRepository = new UserDbRepository(database.Connection);

            AddUserToDatabaseCommand = new RelayCommand(AddUserToDatabase);
            ClearAllFieldsCommand    = new RelayCommand(ClearAllFields);
            AddUserToDraftsCommand   = new RelayCommand(AddUserToDrafts);

            TypeColection    = userDbRepository.TypeColectionMethod();
            StateColection   = userDbRepository.StateColectionMethod();
            CountryColection = userDbRepository.CountryColectionMethod();
        }
Пример #2
0
        public EditWithListProvidersViewModel(IDatabase database)
        {
            userDbRepository     = new UserDbRepository(database.Connection);
            documentDbRepository = new DocumentDbRepository(database.Connection);

            SaveChangesCommand = new RelayCommand(SaveChanges);

            TypeColection    = userDbRepository.TypeColectionMethod();
            StateColection   = userDbRepository.StateColectionMethod();
            CountryColection = userDbRepository.CountryColectionMethod();

            Messenger.Default.Register <User>(this, "AddWithList", this.FillFields);
        }
        public AddWithDraftsProvidersViewModel(IDatabase database)
        {
            userDbRepository = new UserDbRepository(database.Connection);

            AddUserToDatabaseCommand = new RelayCommand(AddUserToDatabase);
            ClearAllFieldsCommand    = new RelayCommand(ClearAllFields);

            TypeColection    = userDbRepository.TypeColectionMethod();
            StateColection   = userDbRepository.StateColectionMethod();
            CountryColection = userDbRepository.CountryColectionMethod();

            Messenger.Default.Register <User>(this, "AddWithDrafts", this.FillFields);
        }