ProcessNkIndexPop.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.Mes.Client.Comm.Server;
  3. using CoreFS.CA06;
  4. using System;
  5. using System.Data;
  6. using System.Windows.Forms;
  7. namespace Core.StlMes.Client.Qcm
  8. {
  9. public partial class ProcessNkIndexPop : FrmBase
  10. {
  11. private string _msc = "";
  12. private string _mscPline = "";
  13. private string _processCode = "";
  14. public ProcessNkIndexPop(string msc, string mscPline, string processCode, OpeBase ob)
  15. {
  16. InitializeComponent();
  17. this.ob = ob;
  18. _msc = msc;
  19. _mscPline = mscPline;
  20. _processCode = processCode;
  21. }
  22. private void ProcessNkIndexPop_Load(object sender, EventArgs e)
  23. {
  24. try
  25. {
  26. this.Cursor = Cursors.WaitCursor;
  27. GetProcessNkIndex(_msc, _mscPline, _processCode);
  28. }
  29. finally
  30. {
  31. this.Cursor = Cursors.Default;
  32. }
  33. }
  34. private void GetProcessNkIndex(string msc, string mscPline, string processCode)
  35. {
  36. DataTable dt = ServerHelper.GetData("com.steering.pss.qcm.CoreInnerMSCRGRD2.getProcessNkIndex",
  37. new object[] { msc, mscPline, processCode }, ob);
  38. string cics = "'1'";
  39. foreach (string str in dt.Rows[0]["CIC"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
  40. {
  41. cics += ", '" + str + "'";
  42. }
  43. DataTable dtCics = ServerHelper.GetData("com.steering.pss.qcm.CoreInnerMSCRGRD2.getStdCic",
  44. new object[] { cics }, ob);
  45. GridHelper.CopyDataToDatatable(dtCics, this.dataTable1, false);
  46. string pics = "'1'";
  47. foreach (string str in dt.Rows[0]["PIC"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
  48. {
  49. pics += ", '" + str + "'";
  50. }
  51. DataTable dtPics = ServerHelper.GetData("com.steering.pss.qcm.CoreInnerMSCRGRD2.getStdPic",
  52. new object[] { pics }, ob);
  53. GridHelper.CopyDataToDatatable(dtPics, this.dataTable1, false);
  54. string sics = "'1'";
  55. foreach (string str in dt.Rows[0]["SIC"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
  56. {
  57. sics += ", '" + str + "'";
  58. }
  59. DataTable dtSics = ServerHelper.GetData("com.steering.pss.qcm.CoreInnerMSCRGRD2.getStdSic",
  60. new object[] { sics }, ob);
  61. GridHelper.CopyDataToDatatable(dtSics, this.dataTable1, false);
  62. string dics = "'1'";
  63. foreach (string str in dt.Rows[0]["DIC"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
  64. {
  65. dics += ", '" + str + "'";
  66. }
  67. DataTable dtDics = ServerHelper.GetData("com.steering.pss.qcm.CoreInnerMSCRGRD2.getStdDic",
  68. new object[] { dics }, ob);
  69. GridHelper.CopyDataToDatatable(dtDics, this.dataTable1, false);
  70. string wics = "'1'";
  71. foreach (string str in dt.Rows[0]["WIC"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
  72. {
  73. wics += ", '" + str + "'";
  74. }
  75. DataTable dtWics = ServerHelper.GetData("com.steering.pss.qcm.CoreInnerMSCRGRD2.getStdWic",
  76. new object[] { wics }, ob);
  77. GridHelper.CopyDataToDatatable(dtWics, this.dataTable1, false);
  78. string gics = "'1'";
  79. foreach (string str in dt.Rows[0]["GIC"].ToString().Split())
  80. {
  81. gics += ", '" + str + "'";
  82. }
  83. DataTable dtGics = ServerHelper.GetData("com.steering.pss.qcm.CoreInnerMSCRGRD2.getStdGic",
  84. new object[] { gics }, ob);
  85. GridHelper.CopyDataToDatatable(dtGics, this.dataTable1, false);
  86. }
  87. private void ProcessNkIndexPop_Shown(object sender, EventArgs e)
  88. {
  89. GridHelper.RefreshAndAutoSize(ultraGrid1);
  90. }
  91. }
  92. }