12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using MyWpfApp.models;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- namespace MyWpfApp.Pages
- {
- /// <summary>
- /// Логика взаимодействия для PageUserList.xaml
- /// </summary>
- public partial class PageUserList : Page
- {
- UserListModel users = new UserListModel();
- public PageUserList()
- {
- InitializeComponent();
- DataContext = users;
- }
-
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- Button btn = (Button)sender;
- int ID = Convert.ToInt32(btn.Uid);
- LoginedTable user = Globals.MyGlobalConnection.LoginedTable.FirstOrDefault(x=>x.ID == ID);
- if (user != null)
- {
- Globals.MyGlobalFrame.Navigate(new PageUserInfo(user));
- }
- }
- private void BtnAddUser_Click(object sender, RoutedEventArgs e)
- {
- Globals.MyGlobalFrame.Navigate(new PageUserInfo());
- }
-
-
- private void btnResetFilters_Click(object sender, RoutedEventArgs e)
- {
- users.Surname = null;
- users.IdRole = 0;
- }
- }
- }
|