87880f9952605ca19a108a9f8b58c5f708d15930.svn-base 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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.UltraWinGrid;
  11. using System.Collections;
  12. using Infragistics.Win;
  13. namespace Core.LZMes.Client.QCM.ChildWindows
  14. {
  15. public partial class QCM0307MEMO : FrmBase
  16. {
  17. public QCM0307MEMO()
  18. {
  19. InitializeComponent();
  20. }
  21. private void DoQuery(string pline_code)
  22. {
  23. //查询
  24. try
  25. {
  26. this.dataSet1.Clear();
  27. string prod_line = "";
  28. if (pline_code == "卷板")
  29. {
  30. prod_line = "JB1";
  31. }
  32. else if (pline_code == "中厚板")
  33. {
  34. prod_line = "ZHB";
  35. }
  36. else if (pline_code == "线棒")
  37. {
  38. prod_line = "XB1";
  39. }
  40. CoreClientParam ccp = new CoreClientParam();
  41. ccp.ServerName = "QCM.QCM01.QCM0106.QueryDefect";
  42. ccp.MethodName = "QueryMemo";
  43. ccp.ServerParams = new object[] { prod_line };
  44. ccp.SourceDataTable = this.dataSet1.Tables[0];
  45. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  46. }
  47. catch (Exception ex)
  48. {
  49. System.Diagnostics.Debug.WriteLine(ex.ToString());
  50. }
  51. }
  52. /*private void Add()
  53. {
  54. try
  55. {
  56. string prod_line = "";
  57. if (this.comboBox1.Text.ToString() == "热连轧")
  58. {
  59. prod_line = "RZ1";
  60. }
  61. else if (this.comboBox1.Text.ToString() == "连退")
  62. {
  63. prod_line = "LT1";
  64. }
  65. else if (this.comboBox1.Text.ToString() == "酸轧")
  66. {
  67. prod_line = "SZ1";
  68. }
  69. else if (this.comboBox1.Text.ToString() == "中板线")
  70. {
  71. prod_line = "ZB1";
  72. }
  73. else if (this.comboBox1.Text.ToString() == "厚板线")
  74. {
  75. prod_line = "HB1";
  76. }
  77. else if (this.comboBox1.Text.ToString() == "高棒")
  78. {
  79. prod_line = "GX1";
  80. }
  81. else if (this.comboBox1.Text.ToString() == "高线")
  82. {
  83. prod_line = "GX2";
  84. }
  85. else if (this.comboBox1.Text.ToString() == "棒二")
  86. {
  87. prod_line = "BC2";
  88. }
  89. CoreClientParam ccp = new CoreClientParam();
  90. ccp.ServerName = "QCM.QCM01.QCM0106.QueryDefect";
  91. ccp.MethodName = "AddMemo";
  92. ccp.ServerParams = new object[] { prod_line, this.textBox3.Text.ToString() };
  93. //ccp.SourceDataTable = this.dataSet1.Tables[0];
  94. this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  95. MessageBox.Show("处理备注添加成功", "提示");
  96. this.DoQuery();
  97. }
  98. catch (Exception ex)
  99. {
  100. System.Diagnostics.Debug.WriteLine(ex.ToString());
  101. }
  102. }*/
  103. public string pline_code = "";
  104. public string memo = "";
  105. private void button1_Click(object sender, EventArgs e)
  106. {
  107. foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
  108. {
  109. if (ugr.Cells["CHK"].Text.ToLower() == "true")
  110. {
  111. if (memo == "")
  112. {
  113. memo = ugr.Cells["MEMO"].Value.ToString();
  114. }
  115. else if (memo != "")
  116. {
  117. memo +=";"+ ugr.Cells["MEMO"].Value.ToString();
  118. }
  119. }
  120. }
  121. this.DialogResult = DialogResult.OK;
  122. }
  123. private void button2_Click(object sender, EventArgs e)
  124. {
  125. this.Close();
  126. }
  127. private void QCM0307MEMO_Load(object sender, EventArgs e)
  128. {
  129. this.DoQuery(pline_code);
  130. }
  131. private void QCM0307MEMO_Load_1(object sender, EventArgs e)
  132. {
  133. this.DoQuery(pline_code);
  134. }
  135. }
  136. }