终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

55 lines
1.6 KiB

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