reportOutput.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  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 Core.Mes.Client.Comm.Control;
  12. using Core.Mes.Client.Comm.Tool;
  13. using Core.Mes.Client.Comm.Server;
  14. using Core.StlMes.Client.YdmBcPipeManage.Entity;
  15. namespace Core.StlMes.Client.YdmBcPipeManage
  16. {
  17. public partial class reportOutput : FrmBase
  18. {
  19. public reportOutput()
  20. {
  21. InitializeComponent();
  22. }
  23. ArrayList alistChecked = null;
  24. private string[] arr = null;
  25. private string[] belongArr = null;
  26. private void reportOutput_Load(object sender, EventArgs e)
  27. {
  28. DateTime now = DateTime.Now;
  29. DateTime dt1 = new DateTime(now.Year, now.Month, 1);//当月第一天
  30. DateTime dt2 = dt1.AddMonths(1).AddDays(-1);//当月最后一天
  31. this.RegStartTime.Value = DateTime.Parse(dt1.ToString("yyyy-MM-dd") + " 00:00:00");
  32. this.RegEndTime.Value = DateTime.Parse(dt2.ToString("yyyy-MM-dd") + " 23:59:59");
  33. DateTime d1 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
  34. dateYearMoth.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM"));
  35. EntityHelper.ShowGridCaption<YdmBcOutlistEntity>(ultraGrid1.DisplayLayout.Bands[0]);
  36. ultraGrid1.DisplayLayout.Bands[0].Columns["OrderTypDesc"].Hidden = false;
  37. arr = BaseMethod.WarehousePermissionsStore(this.ValidDataPurviewIds,ob);
  38. belongArr = this.ValidDataPurviewIds;
  39. try
  40. {
  41. alistChecked = new ArrayList();
  42. alistChecked.Add("StoveNo");
  43. alistChecked.Add("JudgeStoveNo");
  44. alistChecked.Add("MaterialName");
  45. //alistChecked.Add("FixNum");
  46. //alistChecked.Add("FixLen");
  47. }
  48. catch { }
  49. try
  50. {
  51. ArrayList alist = new ArrayList();
  52. alist.Add("ActCount");
  53. alist.Add("ActWeight");
  54. alist.Add("PtWeight");
  55. alist.Add("ActLen");
  56. CommonMethod.GeneralCheckedListboxItems(ref this.myCheckedListBox1, ref this.ultraGrid1, alist, alistChecked);
  57. }
  58. catch { }
  59. switch (this.CustomInfo)
  60. {
  61. case "BELONG_CODE":
  62. this.ultraOptionSet1.Visible = false;
  63. break;
  64. }
  65. }
  66. /// <summary>
  67. /// 重写基类方法
  68. /// </summary>
  69. /// <param name="sender"></param>
  70. /// <param name="ToolbarKey"></param>
  71. public override void ToolBar_Click(object sender, string ToolbarKey)
  72. {
  73. switch (ToolbarKey)
  74. {
  75. case "Query":
  76. QueryData();
  77. break;
  78. case "Export":
  79. ExportData();
  80. break;
  81. case "Close":
  82. this.Close();
  83. break;
  84. }
  85. }
  86. /// <summary>
  87. /// 查询
  88. /// </summary>
  89. private void QueryData()
  90. {
  91. List<YdmBcOutlistEntity> listSource = null;
  92. if (this.chkStoveNo.Checked && string.IsNullOrEmpty(this.txtStoveNo.Text))
  93. {
  94. MessageUtil.ShowTips("请输入炉号!");
  95. this.txtStoveNo.Focus();
  96. return;
  97. }
  98. string stoveNo = "";
  99. string judgeNo = "";
  100. string startTim = "";
  101. string endTim = "";
  102. string bathYearMoth = "";
  103. ArrayList list = new ArrayList();
  104. string strSql = "";
  105. string strGroup = "";
  106. string strOut = "";
  107. string strPlnSql = "";
  108. //if (chkInputTim.Checked)
  109. //{
  110. // startTim = this.RegStartTime.Value.ToString();
  111. // endTim = this.RegEndTime.Value.ToString();
  112. // strOut += " and t.OUTSTOCK_TIME >= to_date('" + startTim + "', 'yyyy-MM-dd HH24:mi:ss') and t.OUTSTOCK_TIME < to_date('" + endTim + "', 'yyyy-MM-dd HH24:mi:ss')";
  113. //}
  114. if (chkStoveNo.Checked)
  115. {
  116. stoveNo = this.txtStoveNo.Text;
  117. strOut += " and t.STOVE_NO = '" + stoveNo + "'";
  118. }
  119. if (chkJudgeNo.Checked)
  120. {
  121. judgeNo = this.txtJudgeNo.Text;
  122. strOut += " and t.JUDGE_STOVE_NO ='" + judgeNo + "'";
  123. }
  124. if(chkYearMoth.Checked)
  125. {
  126. bathYearMoth = this.dateYearMoth.Value.ToString("yyyyMM");
  127. strOut += " and t.BAL_YEAR_MONTH ='" + bathYearMoth + "'";
  128. }
  129. if (chkRegTime.Checked)
  130. {
  131. startTim = this.RegStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  132. endTim = this.RegEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  133. strOut += " AND T.OUTSTOCK_TIME >= TO_DATE('" + startTim + "','YYYY-MM-DD HH24:MI:SS') AND T.OUTSTOCK_TIME <= TO_DATE('" + endTim + "','YYYY-MM-DD HH24:MI:SS')";
  134. }
  135. string strKey = "";
  136. CheckBox item;
  137. for (int i = 0; i < this.myCheckedListBox1.Controls.Count; i++)
  138. {
  139. try
  140. {
  141. item = this.myCheckedListBox1.Controls[i] as CheckBox;
  142. if (item != null && item.Checked)
  143. {
  144. strKey = item.Name;
  145. if (strKey.Equals("StoveNo"))
  146. {
  147. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.STOVE_NO";
  148. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.STOVE_NO";
  149. }
  150. else if (strKey.Equals("FlagStoveNoZg"))
  151. {
  152. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.FLAG_STOVE_NO_ZG";
  153. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.FLAG_STOVE_NO_ZG";
  154. }
  155. else if (strKey.Equals("JudgeStoveNo"))
  156. {
  157. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.JUDGE_STOVE_NO";
  158. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.JUDGE_STOVE_NO";
  159. //strPlnSql += " AND F.JUDGE_STOVE_NO = D.JUDGE_STOVE_NO";
  160. }
  161. else if (strKey.Equals("BatchNo"))
  162. {
  163. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.BATCH_NO";
  164. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.BATCH_NO";
  165. }
  166. else if (strKey.Equals("BatchGroudNo"))
  167. {
  168. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.Batch_Groud_No";
  169. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.Batch_Groud_No";
  170. }
  171. else if (strKey.Equals("OutstockTypeName"))
  172. {
  173. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.OUTSTOCK_TYPE_NAME";
  174. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUTSTOCK_TYPE_NAME";
  175. }
  176. else if (strKey.Equals("MaterialName"))
  177. {
  178. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.MATERIAL_NAME";
  179. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.MATERIAL_NAME";
  180. }
  181. else if (strKey.Equals("Producname"))
  182. {
  183. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.PRODUCNAME";
  184. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.PRODUCNAME";
  185. }
  186. else if (strKey.Equals("Gradename"))
  187. {
  188. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.GRADENAME";
  189. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.GRADENAME";
  190. }
  191. else if (strKey.Equals("Steelname"))
  192. {
  193. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.STEELNAME";
  194. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.STEELNAME";
  195. }
  196. else if (strKey.Equals("StdName"))
  197. {
  198. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.STD_NAME";
  199. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.STD_NAME";
  200. }
  201. else if (strKey.Equals("StdStyleDesc"))
  202. {
  203. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.STD_STYLE_DESC";
  204. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.STD_STYLE_DESC";
  205. }
  206. else if (strKey.Equals("SpecName"))
  207. {
  208. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.SPEC_NAME";
  209. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.SPEC_NAME";
  210. }
  211. else if (strKey.Equals("ModelDesc"))
  212. {
  213. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.MODEL_DESC";
  214. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.MODEL_DESC";
  215. }
  216. else if (strKey.Equals("LoadPlineName"))
  217. {
  218. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.LOAD_PLINE_NAME";
  219. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.LOAD_PLINE_NAME";
  220. }
  221. else if (strKey.Equals("OutType"))
  222. {
  223. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "DECODE(t.OUT_TYPE,'0','写卡倒运','1','票据倒运','2','纠错倒运','3','外委倒运','4','装车皮倒运')OUT_TYPE";
  224. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUT_TYPE";
  225. }
  226. else if (strKey.Equals("ProOrderNo"))
  227. {
  228. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.PRO_ORDER_NO";
  229. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.PRO_ORDER_NO";
  230. }
  231. else if (strKey.Equals("ActDimater"))
  232. {
  233. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.ACT_DIMATER";
  234. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.ACT_DIMATER";
  235. }
  236. else if (strKey.Equals("ActHeight"))
  237. {
  238. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.ACT_HEIGHT";
  239. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.ACT_HEIGHT";
  240. }
  241. //else if (strKey.Equals("ActLen"))
  242. //{
  243. // strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.ACT_LEN";
  244. // strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.ACT_LEN";
  245. //}
  246. else if (strKey.Equals("StorageName"))
  247. {
  248. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "(SELECT M.STORAGE_NAME FROM YDM_BS_STORAGE M WHERE M.STORAGE_NO = T.STORAGE_NO)STORAGE_NAME";
  249. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "T.STORAGE_NO";
  250. }
  251. else if (strKey.Equals("LocationNo"))
  252. {
  253. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "(SELECT M1.LOCATION_NAME FROM YDM_BS_LOCATION M1 WHERE M1.LOCATION_NO = T.LOCATION_NO)LOCATION_NO";
  254. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "T.LOCATION_NO";
  255. }
  256. else if (strKey.Equals("TarStorageName"))
  257. {
  258. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "s.STORAGE_NAME as TAR_STORAGE_NAME ";
  259. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "s.STORAGE_NAME";
  260. }
  261. else if (strKey.Equals("BelongName"))
  262. {
  263. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.BELONG_NAME";
  264. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.BELONG_NAME";
  265. }
  266. else if (strKey.Equals("PlineName"))
  267. {
  268. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.PLINE_NAME";
  269. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.PLINE_NAME";
  270. }
  271. else if (strKey.Equals("ProcessName"))
  272. {
  273. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.PROCESS_DESC AS Process_Name";
  274. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.PROCESS_DESC";
  275. }
  276. else if (strKey.Equals("OutstockTime"))
  277. {
  278. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "to_char(t.OUTSTOCK_TIME,'YYYY-MM-DD HH24:MI:SS') as OUTSTOCK_TIME";
  279. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUTSTOCK_TIME";
  280. }
  281. else if (strKey.Equals("BalYearMonth"))
  282. {
  283. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.BAL_YEAR_MONTH";
  284. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.BAL_YEAR_MONTH";
  285. }
  286. else if (strKey.Equals("Memo"))
  287. {
  288. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.MEMO";
  289. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.MEMO";
  290. }
  291. else if (strKey.Equals("ProductFlag"))
  292. {
  293. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "(SELECT BASENAME FROM COM_BASE_INFO WHERE BASECODE = T.PRODUCT_FLAG AND ROWNUM = 1)PRODUCT_FLAG";
  294. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.PRODUCT_FLAG";
  295. }
  296. else if (strKey.Equals("OrderTypDesc"))
  297. {
  298. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "( SELECT ORDER_TYP_DESC FROM SLM_ORDER_HEAD WHERE ORDER_NO = T.ORDER_NO and VALIDFLAG = '1' AND ROWNUM = 1 )ORDER_TYP_DESC";
  299. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.ORDER_NO";
  300. }
  301. else if (strKey.Equals("OutBc"))
  302. {
  303. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "( CASE WHEN T.OUT_BC ='1' THEN '白班' WHEN T.OUT_BC ='2' THEN '中班' WHEN T.OUT_BC ='3' THEN '晚班' end) OUT_BC ";
  304. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUT_BC";
  305. }
  306. else if (strKey.Equals("OutBz"))
  307. {
  308. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + " (CASE WHEN T.OUT_BZ ='1' THEN '甲' WHEN T.OUT_BZ ='2' THEN '乙' WHEN T.OUT_BZ ='3' THEN '丙' WHEN T.OUT_BZ ='4' THEN '丁' end) OUT_BZ ";
  309. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUT_BZ";
  310. }
  311. //else if (strKey.Equals("OutBz"))
  312. //{
  313. // strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "DECODE(t.OUT_BZ,'1','甲','2','乙','3','丙','4','丁')OUT_BZ";
  314. // strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUT_BZ";
  315. //}
  316. //else if (strKey.Equals("Gptype"))
  317. //{
  318. // strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + " CASE WHEN T.MATERIAL_NAME LIKE 'PA%' then '铸坯'WHEN T.MATERIAL_NAME LIKE 'PB%' then'锻坯'WHEN T.MATERIAL_NAME LIKE 'PC%' then'轧坯'WHEN T.MATERIAL_NAME LIKE 'PD%' then'钢锭'END GPTYPE";
  319. //}
  320. else
  321. {
  322. strSql += (string.IsNullOrEmpty(strSql) ? "t." : ",t.") + strKey;
  323. strGroup += (string.IsNullOrEmpty(strGroup) ? "t." : ",t.") + strKey;
  324. }
  325. }
  326. }
  327. catch { }
  328. }
  329. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",");
  330. if (string.IsNullOrEmpty(strGroup))
  331. {
  332. strGroup = strOut + (string.IsNullOrEmpty(strGroup) ? "" : "group by ") + strGroup + " ORDER BY T.OUTSTOCK_TIME DESC";
  333. }
  334. else
  335. {
  336. strGroup = strOut + (string.IsNullOrEmpty(strGroup) ? "" : "group by ") + strGroup + " ,T.OUTSTOCK_TIME ORDER BY T.OUTSTOCK_TIME DESC";
  337. }
  338. switch (this.CustomInfo)
  339. {
  340. case "STORAGE_NO":
  341. if (this.ultraOptionSet1.CheckedItem.DataValue.ToString().Equals("0"))
  342. {
  343. strOut = " AND t.TAR_REC_FLAG = '0'AND T.OUTSTOCK_TYPE_CODE = '800803'";
  344. }
  345. else
  346. {
  347. strOut = " and ((T.OUTSTOCK_TYPE_CODE = '800803' and t.TAR_REC_FLAG = '1') OR T.OUTSTOCK_TYPE_CODE IN ('800801', '800802','800804','800805'))";
  348. }
  349. break;
  350. }
  351. string _sql = strOut + strGroup;
  352. list.Add(strSql);
  353. list.Add(strOut);
  354. list.Add(strGroup);
  355. switch(this.CustomInfo)
  356. {
  357. case"STORAGE_NO":
  358. listSource = EntityHelper.GetData<YdmBcOutlistEntity>(
  359. "com.steering.ydm.bc.report.FrmReportBcOutput.doQueryData", new object[] { list, arr, strPlnSql, bathYearMoth }, this.ob);
  360. break;
  361. case"BELONG_CODE":
  362. listSource = EntityHelper.GetData<YdmBcOutlistEntity>(
  363. "com.steering.ydm.bc.report.FrmReportBcOutput.doQueryDataBelong", new object[] { list, belongArr }, this.ob);
  364. break;
  365. }
  366. YdmBcOutlistEntitybindingSource.DataSource = listSource;
  367. bool bContains = false, bChecked = false;
  368. for (int i = 0; i < this.ultraGrid1.DisplayLayout.Bands[0].Columns.Count; i++)
  369. {
  370. try
  371. {
  372. bContains = false;
  373. strKey = this.ultraGrid1.DisplayLayout.Bands[0].Columns[i].Key;
  374. for (int j = 0; j < this.myCheckedListBox1.Controls.Count; j++)
  375. {
  376. try
  377. {
  378. item = this.myCheckedListBox1.Controls[j] as CheckBox;
  379. if (item.Name.Equals(strKey))
  380. {
  381. bContains = true;
  382. bChecked = item.Checked;
  383. break;
  384. }
  385. }
  386. catch { }
  387. }
  388. if (bContains)
  389. {
  390. this.ultraGrid1.DisplayLayout.Bands[0].Columns[i].Hidden = !bChecked;
  391. }
  392. }
  393. catch { }
  394. }
  395. this.SetStaticsInfo();
  396. CommonMethod.SetGridSumArea(this.ultraGrid1);
  397. }
  398. private void SetStaticsInfo()
  399. {
  400. try
  401. {
  402. if (this.ultraGrid1.Rows.Count == 0)
  403. {
  404. this.ultraGrid1.DisplayLayout.Bands[0].Summaries.Clear();
  405. }
  406. else
  407. {
  408. ArrayList alist = new ArrayList();
  409. alist.Add("ActCount");
  410. alist.Add("ActWeight");
  411. alist.Add("PtWeight");
  412. alist.Add("ActLen");
  413. CommonMethod.SetStaticsInfoSum(ref this.ultraGrid1, alist, true);
  414. }
  415. }
  416. catch { }
  417. }
  418. /// <summary>
  419. /// 导出
  420. /// </summary>
  421. private void ExportData()
  422. {
  423. GridHelper.ulGridToExcel(ultraGrid1, "出库实绩总汇");
  424. }
  425. /// <summary>
  426. /// 全选
  427. /// </summary>
  428. /// <param name="sender"></param>
  429. /// <param name="e"></param>
  430. private void myLinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  431. {
  432. this.myCheckedListBox1.CheckAll();
  433. }
  434. /// <summary>
  435. /// 清除
  436. /// </summary>
  437. /// <param name="sender"></param>
  438. /// <param name="e"></param>
  439. private void myLinkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  440. {
  441. this.myCheckedListBox1.UnCheckAll();
  442. }
  443. /// <summary>
  444. /// 默认
  445. /// </summary>
  446. /// <param name="sender"></param>
  447. /// <param name="e"></param>
  448. private void myLinkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  449. {
  450. CheckBox items;
  451. for (int i = 0; i < this.myCheckedListBox1.Controls.Count; i++)
  452. {
  453. try
  454. {
  455. items = this.myCheckedListBox1.Controls[i] as CheckBox;
  456. if (alistChecked.Contains(items.Name))
  457. {
  458. items.Checked = true;
  459. }
  460. else
  461. {
  462. items.Checked = false;
  463. }
  464. }
  465. catch { }
  466. }
  467. }
  468. private void chkInputTim_CheckedChanged(object sender, EventArgs e)
  469. {
  470. //this.RegStartTime.Enabled = this.chkInputTim.Checked;
  471. //this.RegEndTime.Enabled = this.chkInputTim.Checked;
  472. }
  473. private void chkStoveNo_CheckedChanged(object sender, EventArgs e)
  474. {
  475. this.txtStoveNo.Enabled = this.chkStoveNo.Checked;
  476. }
  477. private void chkJudgeNo_CheckedChanged(object sender, EventArgs e)
  478. {
  479. this.txtJudgeNo.Enabled = this.chkJudgeNo.Checked;
  480. }
  481. private void chkGroup_CheckedChanged(object sender, EventArgs e)
  482. {
  483. CommonMethod.SetGridGroupBy(ref this.ultraGrid1, this.chkGroup.Checked);
  484. CommonMethod.SetGridSumArea(this.ultraGrid1);
  485. }
  486. private void txtStoveNo_KeyDown(object sender, KeyEventArgs e)
  487. {
  488. if (e.KeyValue == 13)
  489. {
  490. QueryData();
  491. }
  492. }
  493. private void txtJudgeNo_KeyDown(object sender, KeyEventArgs e)
  494. {
  495. if (e.KeyValue == 13)
  496. {
  497. QueryData();
  498. }
  499. }
  500. private void chkYearMoth_CheckedChanged(object sender, EventArgs e)
  501. {
  502. this.dateYearMoth.Enabled = this.chkYearMoth.Checked;
  503. }
  504. }
  505. }