MainWindow.xaml.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. using Com.FirmLib.UI;
  2. using Com.FirmLib.UI.Insuer;
  3. using Com.FirmLib.UI.Maintainer;
  4. using Com.FirmLib.UI.Manufacturer;
  5. using Com.FirmLib.UI.Seller;
  6. using SAGA.DotNetUtils.Data;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.IO;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Windows;
  14. using System.Windows.Controls;
  15. using System.Windows.Data;
  16. using System.Windows.Documents;
  17. using System.Windows.Input;
  18. using System.Windows.Media;
  19. using System.Windows.Media.Imaging;
  20. using System.Windows.Navigation;
  21. using System.Windows.Shapes;
  22. using Test.Edges;
  23. using Test.TestPress;
  24. namespace Test
  25. {
  26. /// <summary>
  27. /// MainWindow.xaml 的交互逻辑
  28. /// </summary>
  29. public partial class MainWindow : Window
  30. {
  31. public MainWindow()
  32. {
  33. InitializeComponent();
  34. this.DataContext = this;
  35. this.Closed += MainWindow_Closed;
  36. }
  37. /// <summary>
  38. /// 关闭后结束进程
  39. /// </summary>
  40. /// <param name="sender"></param>
  41. /// <param name="e"></param>
  42. private void MainWindow_Closed(object sender, EventArgs e)
  43. {
  44. Application.Current.Shutdown();
  45. }
  46. private void Button_Click(object sender, RoutedEventArgs e)
  47. {
  48. try
  49. {
  50. //Test();
  51. WinFirmMain main = new WinFirmMain(new WinSellerBaseInfo());
  52. main.Title += "--供应商管理";
  53. main.ShowDialog();
  54. }
  55. catch (Exception ex)
  56. {
  57. MessageBox.Show(ex.StackTrace);
  58. }
  59. }
  60. private void Manu_Click(object sender, RoutedEventArgs e)
  61. {
  62. try
  63. {
  64. WinFirmMain main = new WinFirmMain(new WinManufactureBaseInfo());
  65. main.Title += "--生产商管理";
  66. main.ShowDialog();
  67. }
  68. catch (Exception ex)
  69. {
  70. }
  71. }
  72. private void Button_Click_1(object sender, RoutedEventArgs e)
  73. {
  74. try
  75. {
  76. WinFirmMain main = new WinFirmMain(new WinMaintainerBaseInfo());
  77. main.Title += "--维修商管理";
  78. main.ShowDialog();
  79. }
  80. catch (Exception ex)
  81. {
  82. }
  83. }
  84. private void Button_Click_2(object sender, RoutedEventArgs e)
  85. {
  86. try
  87. {
  88. WinFirmMain main = new WinFirmMain(new WinInsuerBaseInfo());
  89. main.Title += "--保险商管理";
  90. main.ShowDialog();
  91. }
  92. catch (Exception ex)
  93. {
  94. //return Result.Cancelled;
  95. }
  96. }
  97. }
  98. }