9c277eda24f994a33b1dc646aeffe4377d9d8a5f.svn-base 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  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 System.Collections;
  10. //using CoreFS.CA06;
  11. //using PrintSolution.LabelPrinter;
  12. //using System.IO;
  13. //using INI;
  14. using System;
  15. using System.Collections;
  16. using System.Collections.Generic;
  17. using System.ComponentModel;
  18. using System.Data;
  19. using System.Drawing;
  20. using System.Linq;
  21. using System.Text;
  22. using System.IO;
  23. using System.Windows.Forms;
  24. using CoreFS.CA06;
  25. using PrintSolution.LabelPrinter;
  26. using INI;
  27. using Infragistics.Win.UltraWinGrid;
  28. using System.Reflection;
  29. namespace Core.LZMes.Client.UIM
  30. {
  31. public partial class UIM020020 : FrmBase
  32. {
  33. private ZebraPrinter printer = new ZebraPrinter();
  34. private Hashtable pkgHt = new Hashtable();
  35. private int hasPackaged = 0;
  36. public UIM020020()
  37. {
  38. InitializeComponent();
  39. }
  40. public override void ToolBar_Click(object sender, string ToolbarKey)
  41. {
  42. switch (ToolbarKey)
  43. {
  44. case "Query":
  45. this.DoQuery();
  46. break;
  47. case "Save":
  48. this.DoSave();
  49. break;
  50. case "Export":
  51. this.DoExport();
  52. break;
  53. case "Print":
  54. this.DoPrint();
  55. break;
  56. case "Exit":
  57. this.Close();
  58. break;
  59. }
  60. }
  61. /// <summary>
  62. /// 查询原料库库存数据
  63. /// </summary>
  64. private void DoQuery()
  65. {
  66. try
  67. {
  68. string ispack;
  69. if (Convert.ToBoolean(this.checkBox15.Checked))
  70. ispack = "1";
  71. else
  72. ispack = "0";
  73. this.dataSet1.Tables[0].Clear();
  74. string ordNo = this.textBox1.Text.Trim();//
  75. string ordSeq = this.textBox2.Text.Trim();//
  76. string coilNo = this.textBox3.Text.Trim();//
  77. hasPackaged = int.Parse(this.ultraComboEditor2.Value.ToString());
  78. CoreClientParam ccp = new CoreClientParam();
  79. ccp.ServerName = "UIM.UIM02.UIM020020";
  80. if (CustomInfo == "1")
  81. {
  82. ccp.MethodName = "queryPkgCoil";
  83. }
  84. else
  85. {
  86. ccp.MethodName = "queryPkgCoilSx";
  87. }
  88. ccp.ServerParams = new object[] { ordNo, ordSeq, coilNo, hasPackaged, ispack };
  89. ccp.SourceDataTable = this.dataSet1.Tables[0];
  90. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  91. //DataRowCollection drs = dataSet1.Tables[0].Rows;
  92. //for (int i = 0; i < drs.Count; i++)
  93. //{
  94. // if (drs[i]["PRINT_TP"].ToString().Equals("Y"))
  95. // {
  96. // if (!drs[i]["ORG_ORD_NO"].ToString().Equals(drs[i]["ORD_NO"].ToString())
  97. // && !drs[i]["ORG_ORD_SEQ"].ToString().Equals(drs[i]["ORD_SEQ"].ToString()))
  98. // ultraGrid1.Rows[i].Appearance.BackColor = Color.FromArgb(192, 255, 192);
  99. // }
  100. //}
  101. this.checkBox15.Checked = false;
  102. }
  103. catch (Exception EX)
  104. {
  105. MessageBox.Show(EX.ToString());
  106. }
  107. }
  108. private void DoSave()
  109. {
  110. ultraGrid1.Update();
  111. if (this.ultraDateTimeEditor1.Value == null)
  112. {
  113. MessageBox.Show("请选择包装日期!");
  114. this.ultraDateTimeEditor1.Focus();
  115. return;
  116. }
  117. ArrayList list = new ArrayList();
  118. Infragistics.Win.UltraWinGrid.RowsCollection rs = this.ultraGrid1.Rows;
  119. for (int i = 0; i < rs.Count; i++)
  120. {
  121. if ("TRUE".Equals(rs[i].Cells["CHK"].Text.ToUpperInvariant()))
  122. {
  123. string packageLevel = rs[i].Cells["PACKAGE_LEVEL"].Text;
  124. if (packageLevel.Equals(""))
  125. {
  126. MessageBox.Show("第" + (i + 1) + "行包装等级为空,请核对后再点击保存!");
  127. return;
  128. }
  129. string[] packageArray = new string[2];
  130. packageArray[0] = rs[i].Cells["OLD_SAMPL_NO"].Value.ToString();
  131. packageArray[1] = pkgHt[rs[i].Cells["PACKAGE_LEVEL"].Text].ToString();
  132. list.Add(packageArray);
  133. }
  134. }
  135. string pkgReg = this.UserInfo.GetUserID();
  136. string pkgShift = this.UserInfo.GetUserOrder();
  137. string pkgGroup = this.UserInfo.GetUserGroup();
  138. string pkgDtime = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd");
  139. if (list.Count > 0)
  140. {
  141. CoreClientParam ccp = new CoreClientParam();
  142. ccp.ServerName = "UIM.UIM02.UIM020020";
  143. ccp.MethodName = "savePkgCoil";
  144. ccp.ServerParams = new object[] { list, pkgShift, pkgGroup, pkgReg, pkgDtime, hasPackaged };
  145. this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  146. this.DoQuery();
  147. }
  148. }
  149. private void DoExport()
  150. {
  151. try
  152. {
  153. if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
  154. {
  155. string fileName = this.saveFileDialog1.FileName;
  156. ultraGridExcelExporter1.Export(ultraGrid1, fileName);
  157. System.Diagnostics.Process.Start(fileName);
  158. }
  159. }
  160. catch (Exception EX)
  161. {
  162. MessageBox.Show(EX.ToString());
  163. }
  164. }
  165. private void DoPrint()
  166. {
  167. ultraGrid1.UpdateData();
  168. //**************************
  169. Hashtable param = new Hashtable();
  170. string XSQY = string.Empty;
  171. ArrayList coilLables = new ArrayList();
  172. Infragistics.Win.UltraWinGrid.RowsCollection rs = this.ultraGrid1.Rows;
  173. for (int i = 0; i < rs.Count; i++)
  174. {
  175. if (Convert.ToBoolean(rs[i].Cells["CHK"].Value))
  176. {
  177. ColdCoilLable coilLabel = new ColdCoilLable();
  178. coilLabel.rollNo = textBox40.Text.Trim().Substring(0, 9);//批号
  179. coilLabel.specification = textBox37.Text.Trim();//标准号
  180. coilLabel.steelGrade = textBox41.Text.Trim();//牌号 textBox45.Text.Trim()为客户牌号
  181. coilLabel.dimension = textBox33.Text.Trim() + "*" + textBox32.Text.Trim();//厚度、宽度
  182. coilLabel.coilNo = textBox40.Text.Trim();//卷号
  183. coilLabel.weight = textBox36.Text.Trim();//重量
  184. coilLabel.heatNo = textBox35.Text.Trim();//炉号
  185. coilLabel.prodDate = textBox34.Text.Trim();//生产日期
  186. coilLabel.custName = textBox44.Text.Trim();//收货单位
  187. coilLabel.prodName = textBox43.Text.Trim();//收货单位
  188. if (checkBox14.Checked)//合同号
  189. {
  190. coilLabel.contractNo = textBox39.Text.Trim() + "-" + textBox38.Text.Trim();//合同号,订单号
  191. }
  192. else
  193. {
  194. coilLabel.contractNo = string.Empty;
  195. }
  196. if (this.checkBox11.Checked)//许可证号
  197. {
  198. coilLabel.licenseNo = this.textBox31.Text.Trim();
  199. }
  200. else
  201. {
  202. coilLabel.licenseNo = string.Empty;
  203. }
  204. if (this.checkBox10.Checked)//许可证标识
  205. {
  206. coilLabel.licenseMark = textBox30.Text;//string.Empty;
  207. }
  208. else
  209. {
  210. coilLabel.licenseMark = string.Empty;
  211. }
  212. coilLabel.checker = string.Empty;
  213. coilLabel.barcode = coilLabel.coilNo;
  214. coilLables.Add(coilLabel);
  215. XSQY = rs[i].Cells["XSQY"].Text.ToString();
  216. }
  217. }
  218. //print
  219. try
  220. {
  221. PrintLabel(coilLables);
  222. PrintLabel(coilLables);
  223. //20130314添加标签打印标识
  224. string coilNo1 = this.textBox40.Text.Trim();
  225. CoreClientParam ccp = new CoreClientParam();
  226. ccp.ServerName = "UIM.UIM02.UIM020020";
  227. ccp.MethodName = "updateColor";
  228. ccp.ServerParams = new object[] { coilNo1 };
  229. ccp.SourceDataTable = this.dataSet1.Tables[0];
  230. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  231. //20140304
  232. param.Add("i1", XSQY);
  233. param.Add("i2", coilNo1);
  234. param.Add("i3", this.UserInfo.GetUserID());
  235. param.Add("i4", "标签打印");
  236. param.Add("i5", "UIM020020");
  237. param.Add("i6", "打印后");
  238. param.Add("o7", "");
  239. CoreClientParam ccp4 = new CoreClientParam();
  240. ccp4.ServerName = "UIB.COM.ComDBProcedure";
  241. ccp4.MethodName = "doXmlProcedure";
  242. ccp4.ServerParams = new Object[] { "UIL010020_02_CALL.CALL", param };
  243. this.ExecuteNonQuery(ccp4, CoreInvokeType.Internal);
  244. //提示
  245. ArrayList all = ccp4.ReturnObject as ArrayList;
  246. if (all[0].ToString() != "YY")//确认是否存在问题
  247. {
  248. MessageBox.Show(all[0].ToString(), "提示");
  249. return;
  250. }
  251. DoQuery();
  252. }
  253. catch (Exception ex)
  254. {
  255. MessageBox.Show("连接打印机失败,请点击\"打印\"按钮重新打印!");
  256. }
  257. }
  258. private void PrintLabel(ArrayList list)
  259. {
  260. foreach (ColdCoilLable coilLabel in list)
  261. {
  262. printer.printLable(coilLabel);
  263. }
  264. }
  265. private void UIM020020_Load(object sender, EventArgs e)
  266. {
  267. try
  268. {
  269. string Current = Directory.GetCurrentDirectory();//获取当前根目录
  270. Ini ini = new Ini(Current + "/CoreFS.ini");
  271. // 读取ini
  272. string labPrinterAddr = ini.ReadValue("LABPRINTERADDR", "6");
  273. if (CustomInfo == "1")
  274. {
  275. printer.Addr = labPrinterAddr;
  276. }
  277. else
  278. {
  279. printer.Addr = "10.10.76.218";
  280. }
  281. //printer.Addr = "10.10.75.142";
  282. //此界面由酸洗酸轧同时使用,打印标签过程中双方打印机地址不一样,需要根据界面ID进行配置 --WL 20171109
  283. string version = ini.ReadValue("LABPRINTERADDR", "Version");
  284. version = "3";//应急处理 20180403
  285. printer.LableVersion = int.Parse(version);
  286. CoreClientParam ccp = new CoreClientParam();
  287. ccp.ServerName = "UIM.UIM02.UIM020020";
  288. ccp.MethodName = "queryPkgType";
  289. ccp = this.ExecuteQuery(ccp, CoreInvokeType.Internal);
  290. ArrayList list = (ArrayList)ccp.ReturnObject;
  291. if (list != null)
  292. {
  293. this.ultraGrid1.DisplayLayout.ValueLists.Add("List1");
  294. int listSize = list.Count;
  295. for (int i = 0; i < listSize; i++)
  296. {
  297. Infragistics.Win.ValueListItem item = new Infragistics.Win.ValueListItem();
  298. Hashtable ht = (Hashtable)list[i];
  299. string smCd = ht["SM_CD"].ToString();
  300. string cmCfnm = "";
  301. object obj = ht["SM_CFNM"];
  302. if (obj != null)
  303. {
  304. cmCfnm = ht["SM_CFNM"].ToString();
  305. }
  306. pkgHt.Add(cmCfnm, smCd);
  307. this.ultraGrid1.DisplayLayout.ValueLists["List1"].ValueListItems.Add(smCd, cmCfnm);
  308. }
  309. this.ultraGrid1.DisplayLayout.ValueLists["List1"].DisplayStyle = Infragistics.Win.ValueListDisplayStyle.DisplayText;
  310. this.ultraGrid1.DisplayLayout.Bands[0].Columns["PACKAGE_LEVEL"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
  311. this.ultraGrid1.DisplayLayout.Bands[0].Columns["PACKAGE_LEVEL"].ValueList = this.ultraGrid1.DisplayLayout.ValueLists["List1"];
  312. this.ultraComboEditor2.SelectedIndex = 0;
  313. }
  314. }
  315. catch (Exception ej)
  316. { System.Diagnostics.Debug.WriteLine(ej.ToString()); }
  317. }
  318. //20130122勾选统钢卷数量,钢卷重量
  319. private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  320. {
  321. try
  322. {
  323. //统计选中钢卷数量
  324. int coilCount = 0;
  325. int count = 0;
  326. int count1 = 0;
  327. //统计选中钢卷重量
  328. double coilSum = 0;
  329. double coilWeight = 0;
  330. double coilSum1 = 0;
  331. //判断是否选中
  332. if (e.Cell.Column.Key == "CHK")
  333. {
  334. e.Cell.Row.Update();
  335. if (e.Cell.Value.ToString().ToUpper() == "TRUE")
  336. {
  337. string vCHK = e.Cell.Row.Cells["CHK"].Text;
  338. Infragistics.Win.UltraWinGrid.RowsCollection rs = this.ultraGrid1.Rows;
  339. for (int i = 0; i < rs.Count; i++)
  340. {
  341. if (rs[i].Cells["CHK"].Text == vCHK)
  342. {
  343. rs[i].Cells["CHK"].Value = true;
  344. rs[i].Appearance.ForeColor = System.Drawing.Color.Blue;
  345. coilWeight = double.Parse(rs[i].Cells["ACT_WGT"].Value.ToString().Trim());
  346. coilCount = 1;
  347. }
  348. else
  349. {
  350. coilWeight = 0;
  351. coilCount = 0;
  352. }
  353. count += coilCount;
  354. coilSum += coilWeight;
  355. this.textBox4.Text = (count).ToString();
  356. this.textBox5.Text = (coilSum).ToString();
  357. //?
  358. this.textBox6.Text = (count).ToString();
  359. this.textBox7.Text = (coilSum).ToString();
  360. }
  361. }
  362. else
  363. {
  364. string coil_no = e.Cell.Row.Cells["OLD_SAMPL_NO"].Text;
  365. coilWeight = double.Parse(e.Cell.Row.Cells["ACT_WGT"].Text);
  366. string FALSE, FALSE1;
  367. Infragistics.Win.UltraWinGrid.RowsCollection rs = this.ultraGrid1.Rows;
  368. for (int i = 0; i < rs.Count; i++)
  369. {
  370. if (rs[i].Cells["OLD_SAMPL_NO"].Text == coil_no)
  371. {
  372. rs[i].Appearance.ForeColor = System.Drawing.Color.Black;
  373. }
  374. }
  375. //for (int i = 0; i < rs.Count; i++)
  376. //{
  377. // if (rs[i].Cells["CHK"].Text == vCHK)
  378. // {
  379. // //FALSE = rs[i].Cells["OLD_SAMPL_NO"].Text;
  380. // FALSE = rs[i].Cells["CHK"].Value.ToString();
  381. // FALSE1 = rs[i].Cells["CHK"].Text.ToString();
  382. // rs[i].Cells["CHK"].Value = false;
  383. // rs[i].Appearance.ForeColor = System.Drawing.Color.Black;
  384. // coilWeight = double.Parse(rs[i].Cells["ACT_WGT"].Value.ToString().Trim());
  385. // coilCount = 1;
  386. // }
  387. // else
  388. // {
  389. // coilWeight = 0;
  390. // coilCount = 0;
  391. // }
  392. // count1 = int.Parse(this.textBox6.Text.ToString().Trim()) - coilCount;
  393. // this.textBox4.Text = (count1).ToString();
  394. // this.textBox6.Text = (count1).ToString();
  395. // coilSum1 = double.Parse(this.textBox7.Text.ToString().Trim()) - coilWeight;
  396. // this.textBox5.Text = (coilSum1).ToString();
  397. // this.textBox7.Text = (coilSum1).ToString();
  398. //}
  399. count1 = int.Parse(this.textBox6.Text.ToString().Trim()) - 1;
  400. this.textBox4.Text = (count1).ToString();
  401. this.textBox6.Text = (count1).ToString();
  402. coilSum1 = double.Parse(this.textBox7.Text.ToString().Trim()) - coilWeight;
  403. this.textBox5.Text = (coilSum1).ToString();
  404. this.textBox7.Text = (coilSum1).ToString();
  405. }
  406. }
  407. }
  408. catch (Exception ev)
  409. {
  410. System.Diagnostics.Debug.WriteLine(ev.ToString());
  411. }
  412. //try
  413. //{
  414. // if (e.Cell.Column.Key == "CHK")
  415. // {
  416. // string coilNo = string.Empty;
  417. // string weight = string.Empty;
  418. // string ordNo = string.Empty;
  419. // string ordSeq = string.Empty;
  420. // string ordThk = string.Empty;
  421. // string ordWth = string.Empty;
  422. // string heatNo = string.Empty;
  423. // string steelCode = string.Empty;
  424. // string standardNo = string.Empty;
  425. // string millTime = string.Empty;
  426. // if (!Convert.ToBoolean(e.Cell.Value))
  427. // {
  428. // //for (int i = 0; i < ultraGrid1.Rows.Count; i++)
  429. // //{
  430. // // ultraGrid1.Rows[i].Cells["CHK"].Value = false;
  431. // //}
  432. // coilNo = e.Cell.Row.Cells["OLD_SAMPL_NO"].Text;
  433. // weight = e.Cell.Row.Cells["ACT_WGT"].Text;
  434. // ordNo = e.Cell.Row.Cells["ORD_NO"].Text;
  435. // ordSeq = e.Cell.Row.Cells["ORD_SEQ"].Text;
  436. // ordThk = e.Cell.Row.Cells["INSTR_COIL_THK"].Text;
  437. // ordWth = e.Cell.Row.Cells["INSTR_COIL_WTH"].Text;
  438. // heatNo = e.Cell.Row.Cells["CHARGE_NO"].Text;
  439. // steelCode = e.Cell.Row.Cells["SPEC_STL_GRD"].Text;
  440. // // standardNo = e.Cell.Row.Cells["SPEC_ABBSYM"].Text;
  441. // millTime = e.Cell.Row.Cells["MILL_DTIME"].Text;
  442. // }
  443. // SetControlValue(coilNo, weight, ordNo, ordSeq, ordThk, ordWth, heatNo, steelCode, standardNo, millTime);
  444. // // e.Cell.Value = !Convert.ToBoolean(e.Cell.Value);
  445. // }
  446. //}
  447. //catch (Exception ej)
  448. //{ System.Diagnostics.Debug.WriteLine(ej.ToString()); }
  449. }
  450. private void SetControlValue(string coilNo, string weight, string ordNo, string ordSeq, string ordThk, string ordWth, string heatNo, string steelCode, string standardNo, string millTime,string prodname,string custname,string custspecstl)
  451. {
  452. textBox40.Text = coilNo;
  453. textBox36.Text = weight;
  454. textBox34.Text = millTime;
  455. textBox39.Text = ordNo;
  456. textBox38.Text = ordSeq;
  457. textBox33.Text = ordThk;
  458. textBox32.Text = ordWth;
  459. textBox41.Text = steelCode;
  460. textBox37.Text = standardNo;
  461. textBox35.Text = heatNo;
  462. textBox43.Text = prodname;
  463. textBox44.Text = custname;
  464. textBox45.Text = custspecstl;
  465. }
  466. private void ultraGroupBox1_Click(object sender, EventArgs e)
  467. {
  468. }
  469. private void ultraGrid1_DoubleClickRow(object sender, DoubleClickRowEventArgs e)
  470. {
  471. Infragistics.Win.UltraWinGrid.UltraGrid uGrid = (Infragistics.Win.UltraWinGrid.UltraGrid)sender;
  472. // uGrid.ActiveRow.Cells["DLIV_DIRNO"].Text.Trim();
  473. string coilNo = string.Empty;
  474. string weight = string.Empty;
  475. string ordNo = string.Empty;
  476. string ordSeq = string.Empty;
  477. string ordThk = string.Empty;
  478. string ordWth = string.Empty;
  479. string heatNo = string.Empty;
  480. string steelCode = string.Empty;
  481. string standardNo = string.Empty;
  482. string millTime = string.Empty;
  483. string prodname = string.Empty;
  484. string custname = string.Empty;
  485. string custspecstl = string.Empty;
  486. coilNo = uGrid.ActiveRow.Cells["OLD_SAMPL_NO"].Text;
  487. weight = uGrid.ActiveRow.Cells["ACT_WGT"].Text;
  488. ordNo = uGrid.ActiveRow.Cells["ORD_NO"].Text;
  489. ordSeq = uGrid.ActiveRow.Cells["ORD_SEQ"].Text;
  490. ordThk = uGrid.ActiveRow.Cells["INSTR_COIL_THK"].Text;
  491. ordWth = uGrid.ActiveRow.Cells["INSTR_COIL_WTH"].Text;
  492. heatNo = uGrid.ActiveRow.Cells["CHARGE_NO"].Text;
  493. steelCode = uGrid.ActiveRow.Cells["SPEC_STL_GRD"].Text;
  494. standardNo = uGrid.ActiveRow.Cells["SPEC_ABBSYM"].Text;
  495. millTime = uGrid.ActiveRow.Cells["MILL_DTIME"].Text;
  496. prodname = uGrid.ActiveRow.Cells["C_ORD_USE_TP"].Text;
  497. custname = uGrid.ActiveRow.Cells["ORDCUST_CD"].Text;
  498. custspecstl = uGrid.ActiveRow.Cells["DDC_STL_GRD"].Text;
  499. SetControlValue(coilNo, weight, ordNo, ordSeq, ordThk, ordWth, heatNo, steelCode, standardNo, millTime, prodname, custname,custspecstl);
  500. }
  501. private void checkBox11_CheckedChanged(object sender, EventArgs e)//3
  502. {
  503. try
  504. {
  505. this.textBox31.Enabled = this.checkBox11.Checked;
  506. this.textBox31.Enabled = this.checkBox11.Checked;
  507. }
  508. catch (Exception ex)
  509. {
  510. System.Diagnostics.Debug.WriteLine(ex.ToString());
  511. }
  512. }
  513. private void checkBox14_CheckedChanged(object sender, EventArgs e)//ord
  514. {
  515. try
  516. {
  517. this.textBox39.Enabled = this.checkBox14.Checked;
  518. this.textBox38.Enabled = this.checkBox14.Checked;
  519. }
  520. catch (Exception ex)
  521. {
  522. System.Diagnostics.Debug.WriteLine(ex.ToString());
  523. }
  524. }
  525. private void checkBox10_CheckedChanged(object sender, EventArgs e)//4
  526. {
  527. try
  528. {
  529. this.textBox30.Enabled = this.checkBox10.Checked;
  530. this.textBox30.Enabled = this.checkBox10.Checked;
  531. }
  532. catch (Exception ex)
  533. {
  534. System.Diagnostics.Debug.WriteLine(ex.ToString());
  535. }
  536. }
  537. //private void ultraGrid1_CellChange(object sender, CellEventArgs e)
  538. //{
  539. // try
  540. // {
  541. // if (e.Cell.Column.Key == "CHK")
  542. // {
  543. // string coilNo = string.Empty;
  544. // string weight = string.Empty;
  545. // string ordNo = string.Empty;
  546. // string ordSeq = string.Empty;
  547. // string ordThk = string.Empty;
  548. // string ordWth = string.Empty;
  549. // string heatNo = string.Empty;
  550. // string steelCode = string.Empty;
  551. // string standardNo = string.Empty;
  552. // string millTime = string.Empty;
  553. // if (!Convert.ToBoolean(e.Cell.Value))
  554. // {
  555. // for (int i = 0; i < ultraGrid1.Rows.Count; i++)
  556. // {
  557. // ultraGrid1.Rows[i].Cells["CHK"].Value = false;
  558. // }
  559. // coilNo = e.Cell.Row.Cells["OLD_SAMPL_NO"].Text;
  560. // weight = e.Cell.Row.Cells["ACT_WGT"].Text;
  561. // ordNo = e.Cell.Row.Cells["ORD_NO"].Text;
  562. // ordSeq = e.Cell.Row.Cells["ORD_SEQ"].Text;
  563. // ordThk = e.Cell.Row.Cells["INSTR_COIL_THK"].Text;
  564. // ordWth = e.Cell.Row.Cells["INSTR_COIL_WTH"].Text;
  565. // heatNo = e.Cell.Row.Cells["CHARGE_NO"].Text;
  566. // steelCode = e.Cell.Row.Cells["SPEC_STL_GRD"].Text;
  567. // // standardNo = e.Cell.Row.Cells["SPEC_ABBSYM"].Text;
  568. // millTime = e.Cell.Row.Cells["MILL_DTIME"].Text;
  569. // }
  570. // SetControlValue(coilNo, weight, ordNo, ordSeq, ordThk, ordWth, heatNo, steelCode, standardNo, millTime);
  571. // e.Cell.Value = !Convert.ToBoolean(e.Cell.Value);
  572. // }
  573. // }
  574. // catch (Exception ej)
  575. // { System.Diagnostics.Debug.WriteLine(ej.ToString()); }
  576. // }
  577. }
  578. }