Form1.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. using YiLvRunFrom.BLL;
  9. namespace YiLvRunFrom
  10. {
  11. public partial class Form1 : Form
  12. {
  13. public Form1()
  14. {
  15. InitializeComponent();
  16. }
  17. private void Dispose_Click(object sender,EventArgs e)
  18. {
  19. Form2 f2 = new Form2();
  20. f2.Show();
  21. }
  22. private void process_Click(object sender, EventArgs e)
  23. {
  24. Button b = (Button)sender;
  25. IBll process = null;
  26. switch (b.Tag.ToString())
  27. {
  28. case "Vendor":
  29. process = new VendorBll();
  30. break;
  31. case "Inventory":
  32. process = new InventoryBll();
  33. break;
  34. case "Warehouse":
  35. process = new WarehouseBll();
  36. break;
  37. case "Rdrecord08":
  38. process = new RdRecord08Bll();
  39. break;
  40. case "Rdrecord09":
  41. process = new RdRecord09Bll();
  42. break;
  43. case "PO_Pomain":
  44. process = new PO_PomainBll();
  45. break;
  46. case "Rdrecord01":
  47. process = new RdRecord01Bll();
  48. break;
  49. case "PU_ArrivalVouch":
  50. process = new PU_ArrivalVouchBll();
  51. break;
  52. case "DispatchList":
  53. process = new DispatchListBll();
  54. break;
  55. //case "SO_SOMain":
  56. // process = new SO_SOMainBll();
  57. // break;
  58. default:
  59. break;
  60. }
  61. //try
  62. //{
  63. process.Process();
  64. MessageBox.Show("下载成功");
  65. b.Enabled = false;
  66. //}
  67. //catch (Exception ex)
  68. //{
  69. // MessageBox.Show(ex.Message);
  70. //}
  71. }
  72. }
  73. }