终端一体化运控平台
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

52 wiersze
1.4 KiB

  1. using BPA.Message;
  2. using BPASmartClient.CustomResource.Pages.Enums;
  3. using BPASmartClient.CustomResource.Pages.Model;
  4. using FryPot_DosingSystem.ViewModel;
  5. using Newtonsoft.Json;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.IO;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. using System.Windows;
  13. using System.Windows.Controls;
  14. using System.Windows.Data;
  15. using System.Windows.Documents;
  16. using System.Windows.Input;
  17. using System.Windows.Media;
  18. using System.Windows.Media.Imaging;
  19. using System.Windows.Navigation;
  20. using System.Windows.Shapes;
  21. namespace FryPot_DosingSystem.View
  22. {
  23. /// <summary>
  24. /// UserManageView.xaml 的交互逻辑
  25. /// </summary>
  26. public partial class UserManageView : UserControl
  27. {
  28. public UserManageView()
  29. {
  30. InitializeComponent();
  31. }
  32. private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
  33. {
  34. ComboBox cbo = sender as ComboBox;
  35. var id = cbo.Tag;
  36. var per = cbo.SelectedItem;
  37. if (id != null)
  38. {
  39. var a = UserManageViewModel.GetInstance.usersInfo.FirstOrDefault(p => p.Id == id);
  40. if (a != null && per != null)
  41. {
  42. a.permission = (Permission)Enum.Parse(typeof(Permission), per.ToString());
  43. }
  44. }
  45. }
  46. }
  47. }