public PermitUserPage(MainViewModel _viewModel) { InitializeComponent(); DataContext = _viewModel; _viewModel.FilegroupCollection = DataBaseInteraction.GetListOfAllFilegroups(); filegroupList.ItemsSource = _viewModel.FilegroupCollection; }
private void GetEmailsButton_Click(object sender, RoutedEventArgs e) { foreach (string s in DataBaseInteraction.GetEmails(textServerAdress.Text, textDBName.Text, textTableName.Text, textColumnName.Text)) { emails.Add(s); } }
public AddUserPage(MainViewModel _viewModel) { InitializeComponent(); _viewModel.UserModel = new UserViewModel(); _viewModel.UserCollection = DataBaseInteraction.GetListOfAllUsers(); usersListView.ItemsSource = _viewModel.UserCollection; _viewModel.UserPermissionsText = null; }
public MainWindow() { InitializeComponent(); DataContext = _viewModel; _viewModel.BookCollection = DataBaseInteraction.GetAvailableBookCollectionFromDB(); availaibleBooksListView.ItemsSource = _viewModel.BookCollection; borrowedBooksListView.ItemsSource = _viewModel.BorrowedBooksCollection; _viewModel.NumberOfRegisteredAcc = DataBaseInteraction.GetNumberOfRegisteredAccInDB(); }
public AddFilegroupPage(MainViewModel _viewModel) { InitializeComponent(); _viewModel.FileID = 0; _viewModel.FileModel = new FilegroupViewModel(); _viewModel.FilegroupCollection = DataBaseInteraction.GetListOfAllFilegroups(); filegroupList.ItemsSource = _viewModel.FilegroupCollection; _viewModel.AllowedUsersCollection = DataBaseInteraction.GetListOfAllowedUsers(_viewModel.FileID); usersAllowedList.ItemsSource = _viewModel.AllowedUsersCollection; }
public UserPermissionPage(MainViewModel _viewModel) { InitializeComponent(); this._viewModel = _viewModel; _viewModel.UserCollection = DataBaseInteraction.GetListOfAllUsers(); usersList.ItemsSource = _viewModel.UserCollection; _viewModel.PositionsCollection = DataBaseInteraction.GetListOfAllPossitions(); possitionsList.ItemsSource = _viewModel.PositionsCollection; _viewModel.FilegroupCollection = DataBaseInteraction.GetListOfAllFilegroups(); }