FrmTryRollingMaterial.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  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 Core.Mes.Client.Comm.Server;
  11. using Core.Mes.Client.Comm.Control;
  12. using Infragistics.Win.UltraWinGrid;
  13. using Infragistics.Win;
  14. using com.steering.mes.zgmil.entity;
  15. using System.Collections;
  16. using Core.Mes.Client.Comm.Tool;
  17. using Core.StlMes.Client.ZGMil.Entity;
  18. using Core.StlMes.Client.ZGMil.Signature;
  19. using Core.Mes.Client.Comm.Format;
  20. using Core.StlMes.Client.ZGMil.Common;
  21. namespace Core.StlMes.Client.ZGMil.Popup
  22. {
  23. public partial class FrmTryRollingMaterial : FrmBase
  24. {
  25. private UltraGridRow ActUgr = null;
  26. private string ActContractNo = "";
  27. private UltraGridRow ActUgr1 = null;
  28. private string ActJudgeStoveNo = "";
  29. private string ActID = "";
  30. private string proPlanId = null;//轧管订单编号
  31. private string gxPlanNo = null;//工序排产序号
  32. private string _UserName = "";
  33. private string _Shift = "";
  34. private string _Group = "";
  35. private string _PlineCode = "";
  36. private string[] _arr ;
  37. private string[] _pCode;
  38. FeedRowPlan Feedplan = new FeedRowPlan();
  39. private OpeBase _ob;
  40. public FrmTryRollingMaterial(string Shift, string Group, string User, OpeBase ob, string PlineCode, string[] arr, string[] pCode)
  41. {
  42. InitializeComponent();
  43. _Shift = Shift;
  44. _Group = Group;
  45. _UserName = User;
  46. _arr = arr;
  47. _pCode = pCode;
  48. _ob = ob;
  49. _PlineCode = PlineCode;
  50. BackSlabQuery();
  51. BlacPlanQuery();
  52. }
  53. /// <summary>
  54. /// 页面加载事件
  55. /// </summary>
  56. /// <param name="sender"></param>
  57. /// <param name="e"></param>
  58. protected override void OnLoad(EventArgs e)
  59. {
  60. base.OnLoad(e);
  61. ultraGrid_GHDL.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
  62. chkNodeQuery.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
  63. ultraGrid2.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
  64. ultraGrid1.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
  65. //EntityHelper.ShowGridCaption<MatGpMEntity>(ultraGrid_GHDL.DisplayLayout.Bands[0]);
  66. //DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmHotCheck.getContractNo", new object[] { _PlineCode }, this._ob);
  67. //cmbContrack.DataSource = dt;
  68. //cmbContrack.ValueMember = "contract_no";
  69. //cmbContrack.DisplayMember = "contract_no";
  70. //TubeRoll.SetComboItemHeight(cmbContrack);
  71. if (_PlineCode.Equals("C072"))
  72. {
  73. ultraLabel2.Visible = false;
  74. txtZPJudgeNo.Visible = false;
  75. ultraLabel1.Visible = false;
  76. txtZPPipeSize.Visible = false;
  77. }
  78. }
  79. /// <summary>
  80. /// 待组试轧料查询按钮
  81. /// </summary>
  82. /// <param name="sender"></param>
  83. /// <param name="e"></param>
  84. private void btnQuery_Click(object sender, EventArgs e)
  85. {
  86. if (chkContractNo.Checked)
  87. {
  88. if (string.IsNullOrEmpty(txtContractNo.Text))
  89. {
  90. MessageBox.Show("请输入需查询的合同号!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  91. return;
  92. }
  93. }
  94. BackSlabQuery();
  95. }
  96. /// <summary>
  97. /// 已组回炉坯查询按钮
  98. /// </summary>
  99. /// <param name="sender"></param>
  100. /// <param name="e"></param>
  101. private void ultraButton2_Click(object sender, EventArgs e)
  102. {
  103. if (chkContractNo1.Checked)
  104. {
  105. if (string.IsNullOrEmpty(txtContractNo1.Text))
  106. {
  107. MessageBox.Show("请输入需查询的合同号!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  108. return;
  109. }
  110. }
  111. if (this.chkJudgeNo1.Checked)
  112. {
  113. if (string.IsNullOrEmpty(this.txtJudgeStoveNo.Text))
  114. {
  115. MessageBox.Show("请输入需查询的炉号!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  116. return;
  117. }
  118. }
  119. if (this.chkLotNo1.Checked)
  120. {
  121. if (string.IsNullOrEmpty(this.txtLotNo.Text))
  122. {
  123. MessageBox.Show("请输入需查询的批号!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  124. return;
  125. }
  126. }
  127. BlacPlanQuery();
  128. }
  129. /// <summary>
  130. /// 初始化控件
  131. /// </summary>
  132. private void InitCol()
  133. {
  134. if (chkContractNo.Checked)
  135. {
  136. txtContractNo.Enabled = true;
  137. }
  138. else
  139. {
  140. txtContractNo.Enabled = false;
  141. }
  142. if (chkSteelName.Checked)
  143. {
  144. txtSteelName.Enabled = true;
  145. }
  146. else
  147. {
  148. txtSteelName.Enabled = false;
  149. }
  150. if (chkLength.Checked)
  151. {
  152. txtLength.Enabled = true;
  153. }
  154. else
  155. {
  156. txtLength.Enabled = false;
  157. }
  158. if (chkSection.Checked)
  159. {
  160. txtSection.Enabled = true;
  161. }
  162. else
  163. {
  164. txtSection.Enabled = false;
  165. }
  166. if (chkLotNo1.Checked)
  167. {
  168. txtLotNo.Enabled = true;
  169. }
  170. else
  171. {
  172. txtLotNo.Enabled = false;
  173. }
  174. if (chkJudgeNo1.Checked)
  175. {
  176. txtJudgeStoveNo.Enabled = true;
  177. }
  178. else
  179. {
  180. txtJudgeStoveNo.Enabled = false;
  181. }
  182. if (chkContractNo1.Checked)
  183. {
  184. txtContractNo1.Enabled = true;
  185. }
  186. else
  187. {
  188. txtContractNo1.Enabled = false;
  189. }
  190. if (chkDate.Checked )
  191. {
  192. this.udtDate.Enabled = true;
  193. }
  194. else
  195. {
  196. this.udtDate.Enabled = false;
  197. }
  198. }
  199. /// <summary>
  200. /// Grid记录更改颜色
  201. /// </summary>
  202. private void ChangeGridColor()
  203. {
  204. foreach (UltraGridRow ugr in ultraGrid2.Rows)
  205. {
  206. if (ugr.Cells["STATUS"].Value.ToString() != "00")
  207. {
  208. ugr.Appearance.BackColor = Color.YellowGreen;
  209. }
  210. }
  211. }
  212. /// <summary>
  213. /// 试轧料查询
  214. /// </summary>
  215. private void BackSlabQuery()
  216. {
  217. string Key1 = "";
  218. string Key2 = "";
  219. string Key3 = "";
  220. string Key4 = "";
  221. // string ContractNo = "";
  222. string Length = "";
  223. string SteelName = "";
  224. string Section = "";
  225. string date = "";
  226. string JudgeNo = "";
  227. UltraGridRow ugr = this.chkNodeQuery.ActiveRow;
  228. if (ugr != null)
  229. {
  230. Key1 = ugr.Cells["GRADENAME"].Value.ToString();
  231. Key2 = ugr.Cells["ACT_LEN"].Value.ToString();
  232. Key3 = ugr.Cells["DIMATER"].Value.ToString();
  233. Key4 = ugr.Cells["JUDGE_STOVE_NO"].Value.ToString();
  234. }
  235. if (chkDate.Checked == true)
  236. {
  237. date = DateTime.Parse(this.udtDate.Value.ToString()).ToString("yyyyMMdd");
  238. }
  239. if (chkSteelName.Checked == true)
  240. {
  241. SteelName = this.txtSteelName.Text;
  242. }
  243. if (chkLength.Checked == true)
  244. {
  245. Length = this.txtLength.Text;
  246. }
  247. if (chkSection.Checked == true)
  248. {
  249. Section = this.txtSection.Text;
  250. }
  251. if (chkJudgeNo.Checked)
  252. {
  253. JudgeNo = this.txtJudgeNo.Text;
  254. }
  255. dtContratNo.Clear();
  256. dataTable1.Clear();
  257. DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmTryRollingMaterial.getRollingMaterial", new object[] { SteelName, Length, Section, _PlineCode, date, JudgeNo, UserInfo.GetDeptid() }, this._ob);
  258. GridHelper.CopyDataToDatatable(ref dt, ref dtContratNo, true);
  259. if (dt.Rows.Count > 0)
  260. {
  261. if (ugr != null)
  262. {
  263. foreach (UltraGridRow ugr1 in chkNodeQuery.Rows)
  264. {
  265. if (ugr1.Cells["GRADENAME"].Value.ToString() == Key1 && ugr1.Cells["ACT_LEN"].Value.ToString() == Key2 && ugr1.Cells["DIMATER"].Value.ToString() == Key3 && ugr1.Cells["JUDGE_STOVE_NO"].Value.ToString() == Key4)
  266. {
  267. ugr1.Activated = true;
  268. }
  269. }
  270. }
  271. }
  272. }
  273. /// <summary>
  274. /// 已组试轧料计划查询
  275. /// </summary>
  276. private void BlacPlanQuery()
  277. {
  278. string PrimaKey = "";
  279. string JudgeStoveNo = "";
  280. string LotNo = "";
  281. string ContractNo = "";
  282. string Flag = "0";
  283. UltraGridRow ugr = this.ultraGrid2.ActiveRow;
  284. if (ugr != null)
  285. {
  286. PrimaKey = ugr.Cells["JUDGE_STOVE_NO"].Value.ToString();
  287. }
  288. if (chkLotNo1.Checked == true)
  289. {
  290. LotNo = this.txtLotNo.Text;
  291. }
  292. else
  293. {
  294. LotNo = "";
  295. }
  296. if (chkJudgeNo1.Checked == true)
  297. {
  298. JudgeStoveNo = this.txtJudgeStoveNo.Text;
  299. }
  300. else
  301. {
  302. JudgeStoveNo = "";
  303. }
  304. if (chkContractNo1.Checked == true)
  305. {
  306. ContractNo = this.txtContractNo1.Text;
  307. }
  308. else
  309. {
  310. ContractNo = "";
  311. }
  312. if (chkIsStart.Checked == true)
  313. {
  314. Flag = "1";
  315. }
  316. else
  317. {
  318. Flag = "0";
  319. }
  320. dtBackPlan.Clear();
  321. dataTable2.Clear();
  322. DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmTryRollingMaterial.getBackSlabPlan", new object[] { JudgeStoveNo, _PlineCode }, this._ob);
  323. GridHelper.CopyDataToDatatable(ref dt, ref dtBackPlan, true);
  324. if (dt.Rows.Count > 0)
  325. {
  326. if (ugr != null)
  327. {
  328. foreach (UltraGridRow ugr1 in ultraGrid2.Rows)
  329. {
  330. if (ugr1.Cells["JUDGE_STOVE_NO"].Value.ToString() == PrimaKey)
  331. {
  332. ugr1.Activated = true;
  333. }
  334. }
  335. }
  336. }
  337. ChangeGridColor();
  338. }
  339. /// <summary>
  340. /// 合同、计划激活行单击事件
  341. /// </summary>
  342. /// <param name="sender"></param>
  343. /// <param name="e"></param>
  344. private void chkNodeQuery_AfterRowActivate(object sender, EventArgs e)
  345. {
  346. if (chkNodeQuery.ActiveRow == null)
  347. {
  348. return;
  349. }
  350. else
  351. {
  352. ActUgr = chkNodeQuery.ActiveRow;
  353. //ActContractNo = ActUgr.Cells["CONTRACT_NO"].Value.ToString();
  354. string Length = ActUgr.Cells["ACT_LEN"].Value.ToString();
  355. string GradeName = ActUgr.Cells["GRADENAME"].Value.ToString();
  356. string Section = ActUgr.Cells["DIMATER"].Value.ToString();
  357. string JudgeNo = ActUgr.Cells["JUDGE_STOVE_NO"].Value.ToString();
  358. dataTable1.Clear();
  359. ugbColClear();
  360. DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmTryRollingMaterial.getRollingMaterialDetail", new object[] { GradeName, Length, Section, _PlineCode, JudgeNo }, this._ob);
  361. GridHelper.CopyDataToDatatable(ref dt, ref dataTable3, true);
  362. // List<MatGpMEntity> listSource = EntityHelper.GetData<MatGpMEntity>(
  363. //"com.steering.mes.zgmil.coup.FrmTryRollingMaterial.getRollingMaterialDetail", new object[] { GradeName, Length, Section, _PlineCode }, this._ob);
  364. // matGpMEntityBindingSource.DataSource = listSource;
  365. // GridHelper.RefreshAndAutoSize(this.ultraGrid_GHDL);
  366. }
  367. }
  368. /// <summary>
  369. /// 已组炉计划激活行单击事件
  370. /// </summary>
  371. /// <param name="sender"></param>
  372. /// <param name="e"></param>
  373. private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
  374. {
  375. if (ultraGrid2.ActiveRow == null)
  376. {
  377. return;
  378. }
  379. ActUgr1 = ultraGrid2.ActiveRow;
  380. ActJudgeStoveNo = ActUgr1.Cells["JUDGE_STOVE_NO"].Value.ToString();
  381. proPlanId = ActUgr1.Cells["PRO_PLAN_ID"].Value.ToString();
  382. gxPlanNo = ActUgr1.Cells["GX_PLAN_NO"].Value.ToString();
  383. ActID = ActUgr1.Cells["ID"].Value.ToString();
  384. dataTable2.Clear();
  385. DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmTryRollingMaterial.getBackSlabForJudgeStoveNo", new object[] { ActJudgeStoveNo ,_PlineCode }, this._ob);
  386. GridHelper.CopyDataToDatatable(ref dt, ref dataTable2, true);
  387. }
  388. private void chkContractNo_CheckedChanged(object sender, EventArgs e)
  389. {
  390. if (chkContractNo.Checked){ txtContractNo.Enabled = true;}else{ txtContractNo.Enabled = false;}
  391. if (chkLotNo1.Checked) { txtLotNo.Enabled = true; } else { txtLotNo.Enabled = false; }
  392. if (chkJudgeNo1.Checked) { txtJudgeStoveNo.Enabled = true; } else { txtJudgeStoveNo.Enabled = false; }
  393. if (chkContractNo1.Checked) { txtContractNo1.Enabled = true; } else { txtContractNo1.Enabled = false; }
  394. if (chkSteelName.Checked) { txtSteelName.Enabled = true; } else { txtSteelName.Enabled = false; }
  395. if (chkLength.Checked) { txtLength.Enabled = true; } else { txtLength.Enabled = false; }
  396. if (chkSection.Checked) { txtSection.Enabled = true; } else { txtSection.Enabled = false; }
  397. if (chkDate.Checked) { udtDate.Enabled = true; } else { udtDate.Enabled = false; }
  398. if (chkJudgeNo.Checked) { txtJudgeNo.Enabled = true; } else { txtJudgeNo.Enabled = false; }
  399. }
  400. /// <summary>
  401. /// 组炉回退
  402. /// </summary>
  403. /// <param name="sender"></param>
  404. /// <param name="e"></param>
  405. private void ultraButton1_Click(object sender, EventArgs e)
  406. {
  407. if (ultraGrid2.ActiveRow == null)
  408. {
  409. return;
  410. }
  411. if (ultraGrid2.ActiveRow.Cells["STATUS"].Value.ToString() != "00")
  412. {
  413. MessageBox.Show("炉号【" + BaseMethod.getJudgeStoveNo(this.ActJudgeStoveNo) + "】已开始轧制,不能回退", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  414. return;
  415. }
  416. if (MessageUtil.ShowYesNoAndQuestion("确认炉号【" + BaseMethod.getJudgeStoveNo(this.ActJudgeStoveNo) + "】回退?") == DialogResult.No)
  417. {
  418. return;
  419. }
  420. ArrayList para = new ArrayList();
  421. ArrayList parm2 = new ArrayList();
  422. if (ultraGrid1.Rows.Count > 0)
  423. {
  424. foreach (UltraGridRow ugr in ultraGrid1.Rows)
  425. {
  426. ArrayList list = new ArrayList();
  427. list.Add(ugr.Cells["STOVE_NO"].Value.ToString()); //炼钢炉号
  428. list.Add(ugr.Cells["JUDGE_STOVE_NO"].Value.ToString()); //轧管炉号
  429. list.Add(ugr.Cells["FEED_NUM"].Value.ToString());
  430. list.Add(ugr.Cells["DB_NUM"].Value.ToString());
  431. list.Add(ugr.Cells["FEED_LENGTH"].Value.ToString());
  432. para.Add(list);
  433. }
  434. }
  435. parm2.Add(ActJudgeStoveNo);
  436. parm2.Add(_PlineCode);
  437. CoreClientParam ccp = new CoreClientParam();
  438. ccp.ServerName = "com.steering.mes.zgmil.coup.FrmTryRollingMaterial";
  439. ccp.MethodName = "BackFurSlab";
  440. ccp.ServerParams = new object[] { para, parm2 };
  441. ccp = _ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  442. if (ccp.ReturnInfo == "回退成功。")
  443. {
  444. MessageUtil.ShowTips("回退成功。");
  445. BlacPlanQuery();
  446. }
  447. else
  448. {
  449. MessageUtil.ShowTips(ccp.ReturnInfo);
  450. }
  451. }
  452. /// <summary>
  453. /// 试轧料组炉
  454. /// </summary>
  455. /// <param name="sender"></param>
  456. /// <param name="e"></param>
  457. private void btnZP_Click(object sender, EventArgs e)
  458. {
  459. if (chkNodeQuery.ActiveRow == null)
  460. {
  461. return;
  462. }
  463. string jugeNo = "";
  464. if (_PlineCode.Equals("C072"))
  465. {
  466. //炉号
  467. jugeNo = ServerHelper.GetData("com.steering.mes.signature.FrmDownlineManage.doQueryZpJudgeStoveNo", new Object[] { "E" }, this._ob).Rows[0][0].ToString();
  468. }
  469. else
  470. {
  471. jugeNo = this.txtZPJudgeNo.Text.Trim();
  472. }
  473. txtZPJudgeNo.Text = jugeNo;
  474. if (string.IsNullOrEmpty(txtZPJudgeNo.Text))
  475. {
  476. MessageBox.Show("请输入试轧料组炉炉号!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  477. return;
  478. }
  479. if (!_PlineCode.Equals("C072"))
  480. {
  481. if (txtZPJudgeNo.Text.Trim().Length != 6)
  482. {
  483. MessageBox.Show("请输入6位组炉炉号!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  484. return;
  485. }
  486. }
  487. //查询该炉号是否已经存在
  488. DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmHotCheck.IsUsedJudgeStoveNo", new object[] { txtZPJudgeNo.Text + "-01" }, this._ob);
  489. if (dt.Rows.Count > 0)
  490. {
  491. MessageBox.Show("炉号【" + txtZPJudgeNo.Text + "】已存在,请更换组炉炉号!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  492. return;
  493. }
  494. ultraGrid_GHDL.UpdateData();
  495. IQueryable<UltraGridRow> urows = ultraGrid_GHDL.Rows.AsQueryable().Where("CHK = 'True'");
  496. int MatNum = urows.Count();
  497. if (MatNum == 0)
  498. {
  499. MessageBox.Show("请选择需要组炉的坯料!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  500. return;
  501. }
  502. ArrayList parm = new ArrayList();
  503. ArrayList parm1 = new ArrayList();
  504. foreach (UltraGridRow uRow in urows)
  505. {
  506. //MatGpMEntity matGpM = (MatGpMEntity)uRow.ListObject;
  507. //string matGpMTity = JSONFormat.Format(matGpM);
  508. //parm.Add(matGpMTity);
  509. ArrayList parmM = new ArrayList();
  510. parmM.Add(uRow.Cells["STOVE_NO"].Value.ToString());
  511. parmM.Add(uRow.Cells["JUDGE_STOVE_NO"].Value.ToString());
  512. parmM.Add(uRow.Cells["GRADENAME"].Value.ToString());
  513. parmM.Add(uRow.Cells["STD_NAME"].Value.ToString());
  514. parmM.Add(uRow.Cells["PLINE_NAME"].Value.ToString()); //生产产线
  515. parmM.Add(uRow.Cells["DIMATER"].Value.ToString()); //直径
  516. parmM.Add(uRow.Cells["ACT_LEN"].Value.ToString()); //坯料长度
  517. parmM.Add(uRow.Cells["FIX_NUM"].Value.ToString()); //倍尺数
  518. parmM.Add(uRow.Cells["FIX_LEN"].Value.ToString()); //单倍长度
  519. parmM.Add(uRow.Cells["ACT_COUNT"].Value.ToString()); //支数
  520. parmM.Add(uRow.Cells["ACT_WEIGHT"].Value.ToString()); //重量
  521. parmM.Add(uRow.Cells["DB_WEIGHT"].Value.ToString()); //坯料量
  522. parmM.Add(uRow.Cells["JUDGE_RESULT_CODE"].Value.ToString()); //综合判定代码
  523. parmM.Add(uRow.Cells["JUDGE_RESULT_NAME"].Value.ToString()); //综合判定
  524. parmM.Add(uRow.Cells["GPTYPE"].Value.ToString()); //管坯类型
  525. parmM.Add(uRow.Cells["STORAGE_NO"].Value.ToString()); //仓库代码
  526. parmM.Add(uRow.Cells["STORAGE_NAME"].Value.ToString()); //仓库
  527. parmM.Add(uRow.Cells["JUGDE_APPLY_CODE"].Value.ToString()); //申请判定单号
  528. parm.Add(parmM);
  529. }
  530. UltraGridRow ugr = chkNodeQuery.ActiveRow;
  531. parm1.Add(txtZPJudgeNo.Text + "-01");
  532. parm1.Add(_PlineCode);
  533. parm1.Add(_Shift);
  534. parm1.Add(_Group);
  535. parm1.Add(_UserName);
  536. parm1.Add(MatNum.ToString());
  537. parm1.Add(ugr.Cells["GRADENAME"].Value.ToString());
  538. parm1.Add(ugr.Cells["DIMATER"].Value.ToString());
  539. parm1.Add(ugr.Cells["FIX_LEN"].Value.ToString());
  540. parm1.Add(ugr.Cells["ACT_LEN"].Value.ToString());
  541. parm1.Add(ugr.Cells["FIX_NUM"].Value.ToString());
  542. parm1.Add(ugr.Cells["ACT_WEIGHT"].Value.ToString());
  543. parm1.Add(txtZPPipeSize.Text.Trim().ToString());
  544. Feedplan.ResultNo = txtZPJudgeNo.Text + "-01" + _PlineCode;
  545. Feedplan.LotNo = "试轧料";
  546. Feedplan.JudgeStoveNo = txtZPJudgeNo.Text + "-01";
  547. Feedplan.StoveNo = "";
  548. Feedplan.PlineCode = _PlineCode;
  549. Feedplan.ProPlanId = "";
  550. Feedplan.GxPlanNo = "";
  551. CoreClientParam ccp = new CoreClientParam();
  552. ccp.ServerName = "com.steering.mes.zgmil.coup.FrmTryRollingMaterial";
  553. ccp.MethodName = "zpTryRollingMaterial";
  554. ccp.ServerParams = new object[] { parm, parm1, _arr, Feedplan };
  555. ccp = _ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  556. if (ccp.ReturnCode != -1)
  557. {
  558. if (ccp.ReturnInfo.Equals("组炉成功!"))
  559. {
  560. BackSlabQuery();
  561. MessageUtil.ShowTips(ccp.ReturnInfo);
  562. }
  563. else
  564. {
  565. MessageUtil.ShowTips(ccp.ReturnInfo);
  566. }
  567. }
  568. }
  569. private void ultraTabControl1_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  570. {
  571. BackSlabQuery();
  572. BlacPlanQuery();
  573. }
  574. private void FrmBackSlab_Load(object sender, EventArgs e)
  575. {
  576. }
  577. /// <summary>
  578. /// ugbColr的Clear()方法
  579. /// </summary>
  580. private void ugbColClear()
  581. {
  582. //txtZPLotNo.Text = "";
  583. txtZPJudgeNo.Text = "";
  584. //cmbContrack.Text = "";
  585. //cmbRollLength.Text = "";
  586. //ckrContrack.Checked = false;
  587. //ckrRollLength.Checked = false;
  588. }
  589. private void ultraGrid_GHDL_CellChange(object sender, CellEventArgs e)
  590. {
  591. e.Cell.Row.Update();
  592. if (ultraGrid_GHDL.Rows.Count > 0)
  593. {
  594. foreach (UltraGridRow uRow in ultraGrid_GHDL.Rows)
  595. {
  596. uRow.Cells["ACT_WEIGHT"].Value = int.Parse(uRow.Cells["ACT_COUNT"].Value.ToString()) * double.Parse(uRow.Cells["DB_WEIGHT"].Value.ToString3());
  597. }
  598. }
  599. }
  600. private void txtSteelName_KeyPress(object sender, KeyPressEventArgs e)
  601. {
  602. if (e.KeyChar == 13)
  603. {
  604. BackSlabQuery();
  605. }
  606. }
  607. private void txtJudgeStoveNo_KeyPress(object sender, KeyPressEventArgs e)
  608. {
  609. if (e.KeyChar == 13)
  610. {
  611. BlacPlanQuery();
  612. }
  613. }
  614. }
  615. }