8d571ef27ea378925c4a405bbba2f58ae6880442.svn-base 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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 System.Collections;
  11. using System.Diagnostics;
  12. namespace Core.LZMes.Client.UIC
  13. {
  14. public partial class CUIC030140 : FrmBase
  15. {string sTime_1 = null;
  16. public string STime_1
  17. {
  18. set { sTime_1 = value; }
  19. }
  20. string eTime_1 = null;
  21. public string ETime_1
  22. {
  23. set { eTime_1 = value; }
  24. }
  25. string pLine_1 = null;
  26. public string PLine_1
  27. {
  28. set { pLine_1 = value; }
  29. }
  30. string flag_1 = null;
  31. public string Flag_1
  32. {
  33. set { flag_1 = value; }
  34. }
  35. public CUIC030140()
  36. {
  37. InitializeComponent();
  38. }
  39. private void DoQuery()
  40. {
  41. CoreClientParam ccp = new CoreClientParam();
  42. ArrayList al = new ArrayList();
  43. if (this.flag_1 == "待判(未判定)(t)")
  44. {
  45. this.Text = "待判(未判定)钢卷";
  46. al.Add("UIC010001_12.SELECT");
  47. al.Add(sTime_1);
  48. al.Add(eTime_1);
  49. dataSet1.Tables[0].Clear();
  50. ccp.ServerName = "UIB.COM.ComDBQuery";
  51. ccp.MethodName = "doSimpleQuery";
  52. ccp.ServerParams = new object[] { al };
  53. ccp.SourceDataTable = this.dataSet1.Tables[0];
  54. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  55. return;
  56. }
  57. //else if (flag_1 == "非计划品量(t)"||flag_1 == "1.原料类缺陷(t)" || flag_1 == "连退表面缺陷量(t)" || flag_1 == "2.酸轧类(t)" || flag_1 == "3.连退类(t)" || flag_1 == "3.1连退平整花(t)"
  58. // || flag_1 == "3.2连退擦划伤(t)" || flag_1 == "3.3连退辊印/压印(痕)(t)" || flag_1 == "3.4连退其它(t)")
  59. //{
  60. // if (flag_1 == "连退表面缺陷量(t)")
  61. // {
  62. // this.Text = "连退表面缺陷连退卷";
  63. // al.Add("UIC010001_13.SELECT");
  64. // }
  65. // else if (flag_1 == "非计划品量(t)")
  66. // {
  67. // this.Text = "非计划原因明细";
  68. // al.Add("UIC010001_14.SELECT");
  69. // }
  70. // else if (flag_1 == "2.酸轧类(t)")
  71. // {
  72. // this.Text = "2.酸轧类缺陷连退卷";
  73. // al.Add("UIC010001_15.SELECT");
  74. // }
  75. // else if (flag_1 == "3.连退类(t)")
  76. // {
  77. // this.Text = "3.连退类缺陷连退卷";
  78. // al.Add("UIC010001_16.SELECT");
  79. // }
  80. // else if (flag_1 == "3.1连退平整花(t)")
  81. // {
  82. // this.Text = "3.1连退平整花缺陷连退卷";
  83. // al.Add("UIC010001_17.SELECT");
  84. // }
  85. // else if (flag_1 == "3.2连退擦划伤(t)")
  86. // {
  87. // this.Text = "3.2连退擦划伤缺陷连退卷";
  88. // al.Add("UIC010001_18.SELECT");
  89. // }
  90. // else if (flag_1 == "3.3连退辊印/压印(痕)(t)")
  91. // {
  92. // this.Text = "3.3连退辊印/压印(痕)缺陷连退卷";
  93. // al.Add("UIC010001_19.SELECT");
  94. // }
  95. // else if (flag_1 == "3.4连退其它(t)")
  96. // {
  97. // this.Text = "3.4连退其它缺陷连退卷";
  98. // al.Add("UIC010001_20.SELECT");
  99. // }
  100. // al.Add(sTime_1);
  101. // al.Add(eTime_1);
  102. // dataSet1.Tables[1].Clear();
  103. // ccp.ServerName = "UIB.COM.ComDBQuery";
  104. // ccp.MethodName = "doSimpleQuery";
  105. // ccp.ServerParams = new object[] { al };
  106. // ccp.SourceDataTable = this.dataSet1.Tables[1];
  107. // this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  108. // return;
  109. //}
  110. //else if (flag_1 == "重卷非计划总量(t)" || flag_1 == "重卷一次命中率(%)")
  111. //{
  112. // if (flag_1 == "重卷非计划总量(t)")
  113. // {
  114. // this.Text = "非计划重卷";
  115. // al.Add("UIC010001_21.SELECT");
  116. // }
  117. // else if (flag_1 == "重卷一次命中率(%)")
  118. // {
  119. // this.Text = "一次命中率重卷";
  120. // al.Add("UIC010001_22.SELECT");
  121. // }
  122. // al.Add(sTime_1);
  123. // al.Add(eTime_1);
  124. // dataSet1.Tables[2].Clear();
  125. // ccp.ServerName = "UIB.COM.ComDBQuery";
  126. // ccp.MethodName = "doSimpleQuery";
  127. // ccp.ServerParams = new object[] { al };
  128. // ccp.SourceDataTable = this.dataSet1.Tables[2];
  129. // this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  130. // return;
  131. //}
  132. else if (flag_1 == "非计划品量(t)")
  133. {
  134. this.Text = "非计划原因明细";
  135. al.Add("UIC010001_23.SELECT");
  136. al.Add(sTime_1);
  137. al.Add(eTime_1);
  138. dataSet1.Tables[3].Clear();
  139. ccp.ServerName = "UIB.COM.ComDBQuery";
  140. ccp.MethodName = "doSimpleQuery";
  141. ccp.ServerParams = new object[] { al };
  142. ccp.SourceDataTable = this.dataSet1.Tables[3];
  143. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  144. return;
  145. }
  146. }
  147. //public CUIC030140()
  148. //{
  149. // InitializeComponent();
  150. //}
  151. private void CUIC030140_Load(object sender, EventArgs e)
  152. {
  153. this.ultraDateTimeEditor1.Value = DateTime.ParseExact(sTime_1, "yyyyMMdd", null);
  154. this.ultraDateTimeEditor2.Value = DateTime.ParseExact(eTime_1, "yyyyMMdd", null);
  155. if (this.flag_1 == "待判(未判定)(t)")
  156. {
  157. ultraGrid1.Dock = DockStyle.Fill;
  158. ultraGrid2.Visible = false;
  159. ultraGrid3.Visible = false;
  160. }
  161. else if (this.flag_1 == "非计划品量(t)")
  162. {
  163. ultraGrid2.Visible = false;
  164. ultraGrid3.Visible = false;
  165. ultraGrid1.Visible = false;
  166. ultraGrid4.Dock = DockStyle.Fill;
  167. }
  168. else if (flag_1 == "1.原料类缺陷(t)" || flag_1 == "重卷表面缺陷量(t)" || flag_1 == "2.酸轧类(t)" || flag_1 == "3.重卷类(t)" || flag_1 == "3.1重卷平整花(t)"
  169. || flag_1 == "3.2重卷擦划伤(t)" || flag_1 == "3.3重卷辊印/压印(痕)(t)" || flag_1 == "3.4重卷其它(t)")
  170. {
  171. ultraGrid1.Visible = false;
  172. ultraGrid3.Visible = false;
  173. ultraGrid2.Dock = DockStyle.Fill;
  174. }
  175. else if (flag_1 == "重卷非计划总量(t)" || flag_1 == "重卷一次命中率(%)")
  176. {
  177. ultraGrid1.Visible = false;
  178. ultraGrid2.Visible = false;
  179. ultraGrid3.Dock = DockStyle.Fill;
  180. if (flag_1 == "重卷非计划总量(t)")
  181. {
  182. ultraGrid3.Rows.Band.Columns["FYCMZ_YY"].Hidden = true;
  183. ultraGrid3.Rows.Band.Columns["JT_YCBMZYY"].Hidden = true;
  184. }
  185. else if (flag_1 == "重卷一次命中率(%)")
  186. {
  187. ultraGrid3.Rows.Band.Columns["FYCMZ_YY"].Hidden = true;
  188. ultraGrid3.Rows.Band.Columns["JT_YCBMZYY"].Hidden = true;
  189. ultraGrid3.Rows.Band.Columns["YN_FJH"].Hidden = true;
  190. ultraGrid3.Rows.Band.Columns["FJHYY"].Hidden = true;
  191. ultraGrid3.Rows.Band.Columns["JT_FJHYY"].Hidden = true;
  192. ultraGrid3.Rows.Band.Columns["JHN_WEIGHT"].Hidden = true;
  193. ultraGrid3.Rows.Band.Columns["LGYYFJH_WEIGHT"].Hidden = true;
  194. ultraGrid3.Rows.Band.Columns["RZYYFJH_WEIGHT"].Hidden = true;
  195. ultraGrid3.Rows.Band.Columns["SZYYFJH_WEIGHT"].Hidden = true;
  196. }
  197. }
  198. this.DoQuery();
  199. }
  200. private void button1_Click(object sender, EventArgs e)
  201. {
  202. //private void DoExport()
  203. //{
  204. try
  205. {
  206. if (this.ultraGrid4.Rows.Count == 0)
  207. {
  208. MessageBox.Show("没有可以导出的数据", "提示");
  209. return;
  210. }
  211. //if(this.)
  212. if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
  213. {
  214. string fName = this.saveFileDialog1.FileName;
  215. this.ultraGridExcelExporter1.Export(this.ultraGrid4, fName);
  216. Process.Start(fName);
  217. }
  218. }
  219. catch (Exception ex)
  220. {
  221. System.Diagnostics.Debug.WriteLine(ex.ToString());
  222. }
  223. //}
  224. }
  225. }
  226. }