UIM010091.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. namespace Core.LZMes.Client.UIM
  11. {
  12. public partial class UIM010091 : FrmBase
  13. {
  14. private int OUT_TYPE = 1;//出库类型,默认为上料出库
  15. public UIM010091()
  16. {
  17. InitializeComponent();
  18. }
  19. public override void ToolBar_Click(object sender, string ToolbarKey)
  20. {
  21. switch (ToolbarKey)
  22. {
  23. case "Query":
  24. this.DoQuery();
  25. break;
  26. case "Export":
  27. this.DoExport();
  28. break;
  29. case "Exit":
  30. this.Close();
  31. break;
  32. }
  33. }
  34. /// <summary>
  35. /// 查询原料库库存数据
  36. /// </summary>
  37. private void DoQuery()
  38. {
  39. try
  40. {
  41. this.dataSet1.Tables[0].Clear();
  42. string coilNo = textBox3.Text.Trim();
  43. string ordNo = this.textBox1.Text.Trim();
  44. string ordSeq = this.textBox2.Text.Trim();
  45. CoreClientParam ccp = new CoreClientParam();
  46. ccp.ServerName = "UIM.UIM010091";
  47. ccp.MethodName = "querytrnsCoil";
  48. ccp.ServerParams = new object[] { ordNo,ordSeq,coilNo };
  49. ccp.SourceDataTable = this.dataSet1.Tables[0];
  50. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  51. }
  52. catch (Exception EX)
  53. {
  54. MessageBox.Show(EX.ToString());
  55. }
  56. }
  57. private void DoExport()
  58. {
  59. try
  60. {
  61. if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
  62. {
  63. string fileName = this.saveFileDialog1.FileName;
  64. ultraGridExcelExporter1.Export(ultraGrid2, fileName);
  65. System.Diagnostics.Process.Start(fileName);
  66. }
  67. }
  68. catch (Exception EX)
  69. {
  70. MessageBox.Show(EX.ToString());
  71. }
  72. }
  73. private void UIM010091_Load(object sender, EventArgs e)
  74. {
  75. this.ultraComboEditor1.SelectedIndex = 0;
  76. }
  77. }
  78. }