WinInsuerEditor.xaml.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. 
  2. ///////////////////////////////////////////////////////////////////////////////
  3. //文件名称: WinInsuerEditor.xaml
  4. //文件描述: 保险商添加修改
  5. //创 建 者: xls
  6. //创建日期: 2018/5/24 21:35:53
  7. //版 本 号:1.0.0.0
  8. ////////////////////////////////////////////////////////////////////////////////
  9. using System;
  10. using System.Windows;
  11. using Com.FirmLib.UI.Common;
  12. using FWindSoft.Wpf;
  13. using FWindSoft.Wpf.SystemTypeExtensions;
  14. namespace Com.FirmLib.UI.Insuer
  15. {
  16. /// <summary>
  17. /// WinInsuerEditor.xaml 的交互逻辑
  18. /// </summary>
  19. public partial class WinInsuerEditor : BaseWindow
  20. {
  21. private VmInsuerEditor m_Vm;
  22. public WinInsuerEditor():this(new VmInsuerEditor())
  23. {
  24. InitializeComponent();
  25. }
  26. public WinInsuerEditor(VmInsuerEditor vm)
  27. {
  28. InitializeComponent();
  29. this.m_Vm = vm;
  30. this.m_Vm.SetRefView(this);
  31. this.m_Vm.WatchValidateResult(() => !this.HasError());
  32. this.DataContext = this.m_Vm;
  33. }
  34. #region 界面关联事件
  35. private void btnOK_Click(object sender, RoutedEventArgs e)
  36. {
  37. try
  38. {
  39. bg.UpdateSourceForEach();
  40. if (this.HasError())
  41. {
  42. //MessageShow.Infomation("请修改错误输入项");
  43. return;
  44. }
  45. }
  46. catch (Exception ex)
  47. {
  48. //MessageShow.Show(ex);
  49. }
  50. }
  51. private void btnCancel_Click(object sender, RoutedEventArgs e)
  52. {
  53. Close();
  54. }
  55. #endregion
  56. /// <summary>
  57. /// 是否管理
  58. /// </summary>
  59. public bool IsManage { get { return this.m_Vm.IsManage; } }
  60. /// <summary>
  61. /// 保险商Id
  62. /// </summary>
  63. public string NewId { get { return this.m_Vm.Id; } }
  64. }
  65. }