EditEmploeeWindow.xaml.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. namespace WpfApp1.Windows
  15. {
  16. /// <summary>
  17. /// Логика взаимодействия для EditEmploeeWindow.xaml
  18. /// </summary>
  19. public partial class EditEmploeeWindow : Window
  20. {
  21. private int id;
  22. public EditEmploeeWindow(int id)
  23. {
  24. InitializeComponent();
  25. this.id = id;
  26. var emploee = Helper.GetContext().Emploee.Where(x => x.ID == id).FirstOrDefault();
  27. EmploeeTb.Text = $"{emploee.Surname} {emploee.Name[0]}.{emploee.Middlename[0]}.";
  28. StatusCb.ItemsSource = Helper.GetContext().WorkStatus.ToList();
  29. StatusCb.SelectedItem = emploee.WorkStatus;
  30. }
  31. private void ConfirmBtn_Click(object sender, RoutedEventArgs e)
  32. {
  33. }
  34. }
  35. }