FrmTubeRollFile.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. using Infragistics.Win.UltraWinEditors;
  11. using Core.StlMes.Client.ZGMil.Signature;
  12. using Core.StlMes.Client.ZGMil.Entity;
  13. using Core.Mes.Client.Comm.Control;
  14. using Infragistics.Win.UltraWinGrid;
  15. using Core.Mes.Client.Comm.Tool;
  16. using Core.Mes.Client.Comm.Server;
  17. using CoreFS.SA06;
  18. using System.Collections;
  19. using Infragistics.Win;
  20. namespace Core.StlMes.Client.ZGMil
  21. {
  22. public partial class FrmTubeRollFile : FrmBase
  23. {
  24. //private string departm = "";
  25. UltraComboEditor ucePline = new UltraComboEditor();//产线名称
  26. private string plineCode;
  27. private string strgx = "";
  28. public FrmTubeRollFile(string plineCode1,OpeBase ob,string gx)
  29. {
  30. InitializeComponent();
  31. plineCode = plineCode1;
  32. strgx = gx;
  33. this.ob = ob;
  34. }
  35. private void FrmTubeRollFile_Load(object sender, EventArgs e)
  36. {
  37. NativeMethodNew na = new NativeMethodNew(this.ob);
  38. //plineCode = na.GetPCodePline(this.ValidDataPurviewIds);//获取 用户 对应的产线
  39. //departm = UserInfo.GetDepartment();
  40. //plineCode = na.GetPCode(departm);//获取 用户 对应的产线
  41. TubeRoll.InitComboEditorValue(ucePline, "com.steering.mes.signature.FrmTubeRollFileManage.queryPlineCode", "PLINE_CODE", this.ob, false, plineCode);
  42. TubeRoll.BindColumn(ucePline, "PLINE_CODE", this.Controls, this.ultraGrid1, 0);
  43. DoQuery();
  44. }
  45. private void DoQuery()
  46. {
  47. DataTable dt = ServerHelper.GetData("com.steering.mes.signature.FrmTubeRollFileManage.queryMinStgnature1", new Object[] { plineCode, strgx }, this.ob);
  48. GridHelper.CopyDataToDatatable(dt, this.dataTable1, true);
  49. }
  50. private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
  51. {
  52. switch (e.Tool.Key)
  53. {
  54. case "Query":
  55. DoQuery();
  56. break;
  57. case "Close":
  58. this.Close();
  59. break;
  60. case "Save":
  61. DoSave();
  62. break;
  63. default:
  64. break;
  65. }
  66. }
  67. private string pline = "";
  68. public string Pline
  69. {
  70. get { return pline; }
  71. set { pline = value; }
  72. }
  73. private string group = "";
  74. public string Group
  75. {
  76. get { return group; }
  77. set { group = value; }
  78. }
  79. private string username = "";
  80. public string Username
  81. {
  82. get { return username; }
  83. set { username = value; }
  84. }
  85. private string url = "";
  86. public string Url
  87. {
  88. get { return url; }
  89. set { url = value; }
  90. }
  91. private string memo = "";
  92. public string Memo
  93. {
  94. get { return memo; }
  95. set { memo = value; }
  96. }
  97. private string procNo = "";
  98. public string ProcNo
  99. {
  100. get { return procNo; }
  101. set { procNo = value; }
  102. }
  103. private string userID = "";
  104. public string UserID
  105. {
  106. get { return userID; }
  107. set { userID = value; }
  108. }
  109. private void DoSave()
  110. {
  111. ultraGrid1.UpdateData();
  112. UltraGridRow ugr = ultraGrid1.ActiveRow;
  113. if (ugr == null) return;
  114. pline = ugr.Cells["PLINE_CODE"].Text.Trim();
  115. group = ugr.Cells["COL_GROUP"].Text.Trim();
  116. username = ugr.Cells["COL_USER"].Text.Trim();
  117. url = ugr.Cells["SIGN_ROUTE"].Text.Trim();
  118. memo = ugr.Cells["REMARK"].Text.Trim();
  119. procNo = ugr.Cells["PROCESS_NO"].Text.Trim();
  120. userID = ugr.Cells["USER_ID"].Text.Trim();
  121. this.DialogResult = DialogResult.OK;
  122. this.Close();
  123. }
  124. }
  125. }