public PermitUserPage(MainViewModel _viewModel)
 {
     InitializeComponent();
     DataContext = _viewModel;
     _viewModel.FilegroupCollection = DataBaseInteraction.GetListOfAllFilegroups();
     filegroupList.ItemsSource      = _viewModel.FilegroupCollection;
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 public AddUserPage(MainViewModel _viewModel)
 {
     InitializeComponent();
     _viewModel.UserModel           = new UserViewModel();
     _viewModel.UserCollection      = DataBaseInteraction.GetListOfAllUsers();
     usersListView.ItemsSource      = _viewModel.UserCollection;
     _viewModel.UserPermissionsText = null;
 }
コード例 #4
0
 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;
 }
コード例 #6
0
 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();
 }