FrmCGpRk.cs 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224
  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.Diagnostics;
  10. using System.IO;
  11. using System.Text.RegularExpressions;
  12. using CoreFS.CA06;
  13. using Core.Mes.Client.Comm.Server;
  14. using Core.Mes.Client.Comm.Control;
  15. using Core.Mes.Client.Comm.Tool;
  16. using Infragistics.Win.UltraWinGrid;
  17. using Infragistics.Win;
  18. using System.Net;
  19. using System.Collections;
  20. using CoreFS.SA06;
  21. namespace Core.StlMes.Client.BuyBillet
  22. {
  23. public partial class FrmCGpRk : FrmBase
  24. {
  25. private string ord_no_pk;
  26. private string gpreq_id;
  27. private string stove_no;
  28. private string judge_stove_no;
  29. private string car_no;
  30. public FrmCGpRk()
  31. {
  32. InitializeComponent();
  33. }
  34. private void FrmCGpRk_Load(object sender, System.EventArgs e)
  35. {
  36. Initial_rukuData();
  37. Bind_Supplier();
  38. ds_rukuinfo.Tables[0].AcceptChanges();
  39. var ids = this.ValidDataPurviewIds;
  40. Bind_Stock();
  41. Bind_Level();
  42. ForbidSort(this.ug_rukinfo);
  43. this.ultraCheckEditor2.Visible = false;
  44. this.cb_supplier_cd.Visible = false;
  45. setTpcoTH();
  46. }
  47. private void Initial_rukuData()
  48. {
  49. for(int i=0;i<7;i++)
  50. {
  51. DataRow row = ds_rukuinfo.Tables[0].NewRow();
  52. row["倍尺"] = i + 1;
  53. ds_rukuinfo.Tables[0].Rows.Add(row);
  54. }
  55. }
  56. private void setToolBarAppearance(DefaultableBoolean appearance0, DefaultableBoolean appearance1, DefaultableBoolean appearance2)
  57. {
  58. if (toolMenu == null)
  59. {
  60. return;
  61. }
  62. string toolBarItem = string.Empty;
  63. toolBarItem = "doSave";
  64. if (toolMenu.Toolbars[0].Tools.Exists(toolBarItem))
  65. {
  66. toolMenu.Toolbars[0].Tools[toolBarItem].InstanceProps.Visible = appearance0;
  67. }
  68. toolBarItem = "doDelete";
  69. if (toolMenu.Toolbars[0].Tools.Exists(toolBarItem))
  70. {
  71. toolMenu.Toolbars[0].Tools[toolBarItem].InstanceProps.Visible = appearance1;
  72. }
  73. toolBarItem = "doJQCancel";
  74. if (toolMenu.Toolbars[0].Tools.Exists(toolBarItem))
  75. {
  76. toolMenu.Toolbars[0].Tools[toolBarItem].InstanceProps.Visible = appearance2;
  77. }
  78. toolBarItem = "doJQ";
  79. if (toolMenu.Toolbars[0].Tools.Exists(toolBarItem))
  80. {
  81. toolMenu.Toolbars[0].Tools[toolBarItem].InstanceProps.Visible = appearance2;
  82. }
  83. }
  84. private void tabC_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  85. {
  86. if (tabC.ActiveTab.Key == "tab1")
  87. {
  88. setToolBarAppearance(DefaultableBoolean.True, DefaultableBoolean.False, DefaultableBoolean.False);
  89. }
  90. if (tabC.ActiveTab.Key == "tab2")
  91. {
  92. setToolBarAppearance(DefaultableBoolean.False, DefaultableBoolean.True, DefaultableBoolean.False);
  93. }
  94. if (tabC.ActiveTab.Key == "tab3")
  95. {
  96. setToolBarAppearance(DefaultableBoolean.False, DefaultableBoolean.False, DefaultableBoolean.True);
  97. }
  98. }
  99. private void doSave1(){
  100. ServerHelper.SetData("com.steering.pss.buybillet.Buybillet.test071211", new object[] { }, this.ob);
  101. return;
  102. }
  103. public override void ToolBar_Click(object sender, string ToolbarKey)
  104. {
  105. base.ToolBar_Click(sender, ToolbarKey);
  106. switch (ToolbarKey)
  107. {
  108. case "Close":
  109. this.Close();
  110. break;
  111. case "doQuery":
  112. doQuery();
  113. break;
  114. case "doSave":
  115. //doSave1();
  116. //return;
  117. if (!Query_Jielu())
  118. {
  119. doSave();
  120. }
  121. else
  122. {
  123. MessageUtil.ShowTips("此判定炉号已结炉!");
  124. }
  125. break;
  126. case "doDelete":
  127. doChedan();
  128. break;
  129. case "doJQ":
  130. doJQ();
  131. break;
  132. case "doJQCancel":
  133. doJQCancel();
  134. break;
  135. }
  136. }
  137. /// <summary>
  138. /// 撤销交齐
  139. /// </summary>
  140. private void doJQCancel()
  141. {
  142. //ArrayList list = new ArrayList();
  143. //list.Add("a");
  144. //list.Add("b");
  145. //list.Add("c");
  146. ////ServerHelper.SetData("com.steering.pss.buybillet.Buybillet.test171224", new object[] { list }, this.ob);
  147. //List<MatGpModelEntity> matgpList = EntityHelper.GetData<MatGpModelEntity>
  148. // ("com.steering.pss.buybillet.Buybillet.test171224", new object[] { list }, this.ob);
  149. //return;
  150. UltraGridRow row = ug_wgpstockinfo.ActiveRow;
  151. if (row == null)
  152. return;
  153. string judge_apply_code = row.Cells["jugde_apply_code"].Value.ToString();
  154. string judge_stove_no_no = row.Cells["judge_stove_no"].Value.ToString();
  155. if (!string.IsNullOrEmpty(judge_apply_code))
  156. {
  157. MessageUtil.ShowTips("已申请判定,不能撤销结炉!");
  158. return;
  159. }
  160. string isJielu = row.Cells["node_fur_flag"].Value.ToString();
  161. if (isJielu == "否")
  162. {
  163. MessageUtil.ShowTips("未结炉,不需要撤销!");
  164. return;
  165. }
  166. string stockname = cb_stock_jl.Value.ToString();
  167. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_Stock_JIELUINFO", new object[] { judge_stove_no_no }, this.ob);
  168. ArrayList arr = new ArrayList();
  169. bool hasStock = false;
  170. bool hasJudgeApply = false;
  171. foreach(DataRow dtrow in dt.Rows)
  172. {
  173. ArrayList arr1 = new ArrayList();
  174. string tempstock = dtrow["storage_name"].ToString();
  175. string temp_judge_apply_code = dtrow["jugde_apply_code"].ToString();
  176. string gpreq_id = dtrow["gpreq_id"].ToString();
  177. if(!string.IsNullOrEmpty(gpreq_id) && !arr1.Contains(gpreq_id))
  178. {
  179. arr1.Add(gpreq_id);
  180. arr1.Add(judge_stove_no_no);
  181. arr1.Add("");
  182. arr.Add(arr1);
  183. }
  184. if (tempstock == stockname)
  185. hasStock = true;
  186. if (!string.IsNullOrEmpty(temp_judge_apply_code))
  187. hasJudgeApply = true;
  188. }
  189. string message = string.Empty;
  190. if(!hasStock)
  191. {
  192. message += "本仓库无库存,不能退结炉.\n";
  193. }
  194. if (hasJudgeApply)
  195. {
  196. message += "已经申请判定,不能退结炉.\n";
  197. }
  198. if (!string.IsNullOrEmpty(message))
  199. {
  200. MessageUtil.ShowTips(message);
  201. return;
  202. }
  203. if (MessageUtil.ShowYesNoAndTips("确认撤销:" + judge_stove_no_no + " 结炉?") == DialogResult.No)
  204. {
  205. return;
  206. }
  207. if (arr.Count > 0)
  208. {
  209. //调用取消虚拟炉计划
  210. CoreClientParam ccp = new CoreClientParam();
  211. string create_name = this.UserInfo.GetUserName();
  212. ccp.ServerName = "com.steering.pss.plnsaleord.stove.ComPlanFurnace";
  213. ccp.MethodName = "deletePlnOutsourc";
  214. ccp.ServerParams = new object[] { arr, create_name };
  215. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  216. if (ccp.ReturnInfo!="成功")
  217. {
  218. MessageUtil.ShowTips(ccp.ReturnInfo);
  219. return;
  220. }
  221. }
  222. //以下进行实际退结炉操作
  223. ServerHelper.SetData("com.steering.pss.buybillet.Buybillet.deleteMatGpMStocksJielu", new object[] { judge_stove_no_no }, this.ob);
  224. Query_wgpStockinfo();
  225. MessageUtil.ShowTips("撤销成功!");
  226. }
  227. /// <summary>
  228. /// 交齐(库存标注交齐使用)
  229. /// </summary>
  230. private void doJQ()
  231. {
  232. UltraGridRow row = ug_wgpstockinfo.ActiveRow;
  233. if (row == null)
  234. return;
  235. string judge_stove_no_no = row.Cells["judge_stove_no"].Value.ToString();
  236. string isJielu = row.Cells["node_fur_flag"].Value.ToString();
  237. if (isJielu == "是")
  238. {
  239. MessageUtil.ShowTips("已结炉,不需要再次结炉!");
  240. return;
  241. }
  242. string stockname = cb_stock_jl.Value.ToString();
  243. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_Stock_JIELUINFO", new object[] { judge_stove_no_no }, this.ob);
  244. ArrayList arr = new ArrayList();
  245. bool hasStock = false;
  246. foreach (DataRow dtrow in dt.Rows)
  247. {
  248. ArrayList arr1 = new ArrayList();
  249. string tempstock = dtrow["storage_name"].ToString();
  250. string temp_judge_apply_code = dtrow["jugde_apply_code"].ToString();
  251. string gpreq_id = dtrow["gpreq_id"].ToString();
  252. if (!string.IsNullOrEmpty(gpreq_id) && !arr1.Contains(gpreq_id))
  253. {
  254. arr1.Add(gpreq_id);
  255. arr1.Add(judge_stove_no_no);
  256. arr.Add(arr1);
  257. }
  258. if (tempstock == stockname)
  259. hasStock = true;
  260. }
  261. string message = string.Empty;
  262. if (!hasStock)
  263. {
  264. message += "本仓库无库存,不能在此结炉.\n";
  265. }
  266. if (!string.IsNullOrEmpty(message))
  267. {
  268. MessageUtil.ShowTips(message);
  269. return;
  270. }
  271. if (MessageUtil.ShowYesNoAndTips("确认:" + judge_stove_no_no + " 结炉?") == DialogResult.No)
  272. {
  273. return;
  274. }
  275. //以下调用虚拟炉计划(结炉时调用)
  276. if (true)
  277. {
  278. CoreClientParam ccp = new CoreClientParam();
  279. string create_name = this.UserInfo.GetUserName();
  280. ccp.ServerName = "com.steering.pss.plnsaleord.stove.ComPlanFurnace";
  281. ccp.MethodName = "queryPlnOutsourc";
  282. ccp.ServerParams = new object[] { "", judge_stove_no_no, create_name };
  283. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  284. }
  285. //以下进行实际结炉操作
  286. ServerHelper.SetData("com.steering.pss.buybillet.Buybillet.updateMatGpMStocksJielu", new object[] { judge_stove_no_no }, this.ob);
  287. Query_wgpStockinfo();
  288. MessageUtil.ShowTips("结炉成功!");
  289. }
  290. /// <summary>
  291. /// 撤单
  292. /// </summary>
  293. private void doChedan()
  294. {
  295. //UltraGridRow row = ug_rkinfo_p.ActiveRow;
  296. //string instock_doc = row.GetValue("INSTOCK_DOC");
  297. StringBuilder sb = new StringBuilder();
  298. StringBuilder sb1 = new StringBuilder();
  299. ArrayList arr = new ArrayList();
  300. int resultCount = 0;
  301. foreach (UltraGridRow row in ug_rkinfo_p.Rows)
  302. {
  303. ArrayList arr1 = new ArrayList();
  304. if (row.Cells["CHK"].Text.ToString() == "True")
  305. {
  306. //sb.Append(row.Cells["INSTOCK_DOC"].Value.ToString());
  307. //sb.Append(",");
  308. string instock_doc = row.Cells["INSTOCK_DOC"].Value.ToString();
  309. string gpreq_id = row.Cells["GPREQ_ID"].Value.ToString();
  310. string judge_stove_no = row.Cells["JUDGE_STOVE_NO"].Value.ToString();
  311. arr1.Add(gpreq_id);
  312. arr1.Add(judge_stove_no);
  313. arr1.Add(instock_doc);
  314. arr.Add(arr1);
  315. sb.Append(instock_doc);
  316. sb.Append(",");
  317. sb1.Append(judge_stove_no);
  318. sb1.Append(",");
  319. resultCount++;
  320. }
  321. }
  322. string ids = sb.ToString();
  323. if (ids.EndsWith(","))
  324. {
  325. ids = ids.Substring(0, ids.Length - 1);
  326. }
  327. string ids1 = sb1.ToString();
  328. if (ids1.EndsWith(","))
  329. {
  330. ids1 = ids1.Substring(0, ids1.Length - 1);
  331. }
  332. if (string.IsNullOrEmpty(ids))
  333. {
  334. MessageBox.Show("未选中有效的记录!");
  335. return;
  336. }
  337. if(MessageUtil.ShowYesNoAndTips("确认撤销:"+resultCount+"条记录")== DialogResult.No){
  338. return;
  339. }
  340. //调用取消虚拟炉计划
  341. CoreClientParam ccp = new CoreClientParam();
  342. string create_name = this.UserInfo.GetUserName();
  343. ccp.ServerName = "com.steering.pss.plnsaleord.stove.ComPlanFurnace";
  344. ccp.MethodName = "deletePlnOutsourc";
  345. ccp.ServerParams = new object[] { arr, create_name };
  346. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  347. if (ccp.ReturnInfo != "成功")
  348. {
  349. MessageUtil.ShowTips(ccp.ReturnInfo);
  350. return;
  351. }
  352. string stockcode = cb_stock_cd.Value.ToString();
  353. ServerHelper.SetData("com.steering.pss.buybillet.Buybillet.delete_CGP_Stock_CHEDAN_New", new object[] { ids, stockcode,ids1 }, this.ob);
  354. Query_wgpKucun();
  355. ds_rkinfo_c.Tables[0].Rows.Clear();
  356. MessageUtil.ShowTips("操作完成!");
  357. }
  358. //查询(共用)
  359. private void doQuery()
  360. {
  361. if(tabC.ActiveTab.Key=="tab1")
  362. {
  363. Query_wgpOrders();
  364. }
  365. if (tabC.ActiveTab.Key == "tab2")
  366. {
  367. Query_wgpKucun();
  368. }
  369. if (tabC.ActiveTab.Key == "tab3")
  370. {
  371. Query_wgpStockinfo();
  372. }
  373. }
  374. private string queryIsRKinfoOk()
  375. {
  376. string resultMessage = string.Empty;
  377. UltraGridRow row = ug_orders.ActiveRow;
  378. if (row == null)
  379. return "未选中有效合同";
  380. string dbpc = row.GetValue("单倍坯长");
  381. string dm = row.GetValue("断面");
  382. string gz = row.GetValue("钢种");
  383. CoreClientParam ccp = new CoreClientParam();
  384. ccp.ServerName = "com.steering.pss.buybillet.Buybillet";
  385. ccp.MethodName = "queryRkinfo";
  386. ccp.ServerParams = new object[] { judge_stove_no, dm, dbpc, gz };
  387. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  388. resultMessage = ccp.ReturnInfo;
  389. //if (ccp.ReturnCode != -1)
  390. //{
  391. // if (ccp.ReturnInfo.Equals("保存成功!"))
  392. // {
  393. // }
  394. // else
  395. // {
  396. // MessageUtil.ShowTips(ccp.ReturnInfo);
  397. // }
  398. //}
  399. return resultMessage;
  400. }
  401. //入库操作
  402. private void doSave()
  403. {
  404. bool zdzl = true;
  405. get_stove_no();
  406. stove_no = stove_no.Trim();
  407. judge_stove_no = judge_stove_no.Trim();
  408. stove_no = stove_no.Replace(" ", "");
  409. judge_stove_no = judge_stove_no.Replace(" ", "");
  410. string departmentid = this.UserInfo.GetDeptid();
  411. string deptId = this.UserInfo.GetDeptid();
  412. if (string.IsNullOrEmpty(stove_no))
  413. {
  414. MessageUtil.ShowTips("炉号不能为空!");
  415. return;
  416. }
  417. if (string.IsNullOrEmpty(judge_stove_no) && !deptId.StartsWith("002023"))
  418. {
  419. MessageUtil.ShowTips("判定炉号不能为空!");
  420. return;
  421. }
  422. if (!Regex.Match(stove_no, "^\\d+$").Success && !deptId.StartsWith("002023"))
  423. {
  424. MessageUtil.ShowTips("炉号含有非数字字符!");
  425. return;
  426. }
  427. if (!Regex.Match(judge_stove_no, "^\\d+$").Success && !deptId.StartsWith("002023"))
  428. {
  429. MessageUtil.ShowTips("判定炉号含有非数字字符!");
  430. return;
  431. }
  432. judge_stove_no = stove_no;
  433. if (stove_no != judge_stove_no)
  434. {
  435. MessageUtil.ShowTips("炉号和判定炉号不相等,不能保存!");
  436. return;
  437. }
  438. string locationtemp = txt_location.Text.Trim();
  439. locationtemp += "AAA";
  440. if (string.IsNullOrEmpty(locationtemp))
  441. {
  442. MessageUtil.ShowTips("库位不能为空!");
  443. return;
  444. }
  445. string ischongfu = queryIsRKinfoOk();
  446. if(!string.IsNullOrEmpty(ischongfu))
  447. {
  448. MessageUtil.ShowTips(ischongfu);
  449. return;
  450. }
  451. string isJielu = "0";
  452. if (ck_jielu.Checked && MessageUtil.ShowYesNoAndQuestion("是否确认结炉?") == DialogResult.No)
  453. {
  454. return;
  455. }
  456. if (ck_jielu.Checked)
  457. {
  458. isJielu = "1";
  459. }
  460. this.ug_rukinfo.UpdateData();
  461. String username = this.UserInfo.GetUserName();
  462. String stockname = cb_stock.Text;
  463. String location = txt_location.Text.Trim();
  464. String level = cb_level.Text;
  465. ArrayList parm = new ArrayList();
  466. DataTable dt = this.ds_rukuinfo.Tables[0].GetChanges(DataRowState.Modified);
  467. if(dt == null)
  468. {
  469. return;
  470. }
  471. if (dt.GetChanges(DataRowState.Modified) == null)
  472. {
  473. MessageBox.Show("没有修改的数据!");
  474. }
  475. else
  476. {
  477. var rs = from rows in dt.AsEnumerable()
  478. where rows.RowState == DataRowState.Modified
  479. select rows;
  480. foreach (var row in rs)
  481. {
  482. string bc = row["倍尺"].ToString();
  483. int count = 0;
  484. int.TryParse(row["支数"].ToString(), out count);
  485. decimal weight = 0;
  486. decimal.TryParse(row["重量"].ToString(), out weight);
  487. int gplength = 0;
  488. int.TryParse(row["管坯长度"].ToString(), out gplength);
  489. string message = bc + "倍尺 :";
  490. if (count == 0)
  491. {
  492. message += " 支数不正确;";
  493. }
  494. if (weight == 0)
  495. {
  496. message += " 重量不正确;";
  497. }
  498. if (gplength == 0)
  499. {
  500. message += " 管坯长度不正确;";
  501. }
  502. if (count == 0 && weight == 0)
  503. {
  504. continue;
  505. }
  506. if (count == 0 || weight == 0)
  507. {
  508. MessageUtil.ShowTips(message);
  509. return;
  510. }
  511. string str = string.Empty;
  512. str += "bc:";
  513. str += row["倍尺"].ToString();
  514. str += ";";
  515. str += "count:";
  516. str += row["支数"].ToString();
  517. str += ";";
  518. str += "weight:";
  519. str += row["重量"].ToString();
  520. str += ";";
  521. str += "gplength:";
  522. str += row["管坯长度"].ToString();
  523. str += ";";
  524. parm.Add(str);
  525. if (deptId.StartsWith("002023") && row["管坯长度"].ToString() != row["管坯理论长度"].ToString())
  526. {
  527. zdzl = false;
  528. }
  529. }
  530. if (parm.Count == 0)
  531. {
  532. return;
  533. }
  534. //天淮deptid,如果是天淮,首先获取最大炉号
  535. if (deptId.StartsWith("002023"))
  536. {
  537. DataTable dtJudge_stove_no = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_TH_GP_JUDGE_STOVE_NO", new object[] { }, this.ob);
  538. if (dtJudge_stove_no != null && dtJudge_stove_no.Rows.Count > 0)
  539. {
  540. judge_stove_no = dtJudge_stove_no.Rows[0][0].ToString();
  541. }
  542. }
  543. ServerHelper.SetData("com.steering.pss.buybillet.Buybillet.do_CGP_RK", new object[] { ord_no_pk,stove_no,judge_stove_no,car_no,departmentid,parm,username,stockname,location,level,isJielu }, this.ob);
  544. //foreach (var row in rs)
  545. //{
  546. // string bc = row["倍尺"].ToString();
  547. // string count = row["支数"].ToString();
  548. // CoreClientParam ccp = new CoreClientParam();
  549. // ccp.ServerName = "com.steering.pss.buybillet.Buybillet";
  550. // ccp.MethodName = "update_RKZL";
  551. // ccp.ServerParams = new object[] { ord_no_pk, stove_no };
  552. // ccp = ob.ExecuteNonQuery(ccp,CoreInvokeType.Internal);
  553. // if(ccp.ReturnCode.Equals(1))
  554. // {
  555. // MessageUtil.ShowTips("操作成功!");
  556. // }
  557. //}
  558. UltraGridRow rowOrder = ug_orders.ActiveRow;
  559. String type = "1";
  560. if (rowOrder != null)
  561. {
  562. String gptype = rowOrder.Cells["管坯类型"].Value.ToString();
  563. if (gptype == "锻坯")
  564. type = "0";
  565. }
  566. CoreClientParam ccp = new CoreClientParam();
  567. ccp.ServerName = "com.steering.pss.buybillet.Buybillet";
  568. ccp.MethodName = "update_RKZL";
  569. ccp.ServerParams = new object[] { ord_no_pk, stove_no, judge_stove_no,type };
  570. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  571. //if (ccp.ReturnCode.Equals(1))
  572. //{
  573. // MessageUtil.ShowTips("操作成功!");
  574. //}
  575. //ServerHelper.SetData("com.steering.pss.buybillet.Buybillet.update_RKZL", new object[] { ord_no_pk, stove_no, judge_stove_no }, this.ob);
  576. //以下调用虚拟炉计划(结炉时调用)
  577. if (ck_jielu.Checked && zdzl)
  578. {
  579. string create_name = this.UserInfo.GetUserName();
  580. ccp.ServerName = "com.steering.pss.plnsaleord.stove.ComPlanFurnace";
  581. ccp.MethodName = "queryPlnOutsourc";
  582. ccp.ServerParams = new object[] { gpreq_id, judge_stove_no, create_name };
  583. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  584. }
  585. MessageUtil.ShowTips("操作成功!");
  586. this.ug_rukinfo.UpdateData();
  587. foreach(DataRow row in this.ds_rukuinfo.Tables[0].Rows)
  588. {
  589. row["支数"] = DBNull.Value;
  590. row["重量"] = DBNull.Value;
  591. row["理论重量"] = DBNull.Value;
  592. row["管坯理论重量"] = DBNull.Value;
  593. }
  594. ds_rukuinfo.Tables[0].AcceptChanges();
  595. txt_carno.Focus();
  596. txt_stove_no.Text = string.Empty;
  597. txt_judge_stove_no.Text = string.Empty;
  598. }
  599. }
  600. /// <summary>
  601. /// 查询外购坯合同
  602. /// </summary>
  603. private void Query_wgpOrders()
  604. {
  605. //ds_orders
  606. string supplier = "";
  607. string orderno = "";
  608. if (ck_supplier.Checked)
  609. {
  610. supplier = cb_supplier.Text;
  611. }
  612. if(ck_orderno.Checked)
  613. {
  614. orderno = txt_orderno.Text.Trim();
  615. }
  616. string deptId = this.UserInfo.GetDeptid();
  617. DataTable dt = new DataTable();
  618. //天淮deptid
  619. if (deptId.StartsWith("002023"))
  620. {
  621. dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_RK_OrdersTH", new object[] { supplier, orderno }, this.ob);
  622. }
  623. else
  624. {
  625. dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_RK_Orders", new object[] { supplier, orderno }, this.ob);
  626. }
  627. GridHelper.CopyDataToDatatable(dt,ds_orders.Tables[0], true);
  628. RefreshAndAutoSize(ug_orders);
  629. }
  630. /// <summary>
  631. /// 查询入库清单(撤单用)
  632. /// </summary>
  633. private void Query_wgpKucun()
  634. {
  635. //查询条件仓库编码
  636. string stockcode = cb_stock_cd.Value.ToString();
  637. string orderno = "";
  638. string judge_stove_no = "";
  639. if(ultraCheckEditor1.Checked)
  640. {
  641. orderno = txt_orderno_cd.Text.Trim();
  642. }
  643. if (ultraCheckEditor3.Checked)
  644. {
  645. judge_stove_no = this.txt_stove_judgeno_cd.Text.Trim();
  646. }
  647. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_Stock_CHEDAN", new object[] { stockcode, orderno, judge_stove_no }, this.ob);
  648. GridHelper.CopyDataToDatatable(dt, ds_rkinfo_p.Tables[0], true);
  649. RefreshAndAutoSize(ug_rkinfo_p);
  650. }
  651. /// <summary>
  652. /// 查询外购坯到厂预报
  653. /// </summary>
  654. private void Query_wgpDcyb(string ord_no_pk)
  655. {
  656. //ds_dcyb = ???
  657. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_Orders_Dcyb", new object[] { ord_no_pk }, this.ob);
  658. GridHelper.CopyDataToDatatable(dt, ds_dcyb.Tables[0], true);
  659. }
  660. //绑定供应商
  661. private void Bind_Supplier()
  662. {
  663. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.queryBUY_BASE_CUSTOMER", new object[] { }, this.ob);
  664. DataTable _dt = new DataTable();
  665. _dt.Columns.Add("SUPPLIER", typeof(string));
  666. var _rows = dt.AsEnumerable().OrderBy(r => r.Field<string>("CUSTOMER_NO"));
  667. foreach (var row in _rows)
  668. {
  669. if(row["CUSTOMER_NM"].ToString()=="全部")
  670. {
  671. continue;
  672. }
  673. DataRow _row = _dt.NewRow();
  674. _row["SUPPLIER"] = row["CUSTOMER_NM"];
  675. _dt.Rows.Add(_row);
  676. }
  677. this.cb_supplier.DataSource = _dt;
  678. this.cb_supplier_cd.DataSource = _dt;
  679. }
  680. /// <summary>
  681. /// 绑定仓库
  682. /// </summary>
  683. private void Bind_Stock()
  684. {
  685. var departments = this.ValidDataPurviewIds;
  686. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_Stock", new object[] { departments }, this.ob);
  687. if (dt.Rows.Count > 0)
  688. {
  689. cb_stock.DataSource = dt;
  690. cb_stock.DisplayMember = "storage_name";
  691. cb_stock.ValueMember = "storage_no";
  692. cb_stock.SelectedIndex = 0;
  693. cb_stock_cd.DataSource = dt;
  694. cb_stock_cd.DisplayMember = "storage_name";
  695. cb_stock_cd.ValueMember = "storage_no";
  696. cb_stock_cd.SelectedIndex = 0;
  697. cb_stock_jl.DataSource = dt;
  698. cb_stock_jl.DisplayMember = "storage_name";
  699. cb_stock_jl.ValueMember = "storage_no";
  700. cb_stock_jl.SelectedIndex = 0;
  701. }
  702. }
  703. /// <summary>
  704. /// 绑定层数
  705. /// </summary>
  706. private void Bind_Level()
  707. {
  708. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_RK_Level", new object[] { }, this.ob);
  709. cb_level.DataSource = dt;
  710. cb_level.SelectedIndex = 0;
  711. }
  712. private void ck_orderno_CheckedChanged(object sender, System.EventArgs e)
  713. {
  714. if (ck_orderno.Checked)
  715. {
  716. txt_orderno.Enabled = true;
  717. }
  718. else
  719. {
  720. txt_orderno.Enabled = false;
  721. }
  722. }
  723. /// <summary>
  724. /// 选择行,查询到厂预报
  725. /// </summary>
  726. /// <param name="sender"></param>
  727. /// <param name="e"></param>
  728. private void ug_orders_ClickCell(object sender, ClickCellEventArgs e)
  729. {
  730. bind_ug_orders();
  731. }
  732. private void ug_orders_Click(object sender, EventArgs e)
  733. {
  734. bind_ug_orders();
  735. }
  736. private void bind_ug_orders()
  737. {
  738. UltraGridRow row = ug_orders.ActiveRow;
  739. if (row == null)
  740. return;
  741. ord_no_pk = row.GetValue("ORD_NO_PK");
  742. gpreq_id = row.GetValue("GPBUYPLANID");
  743. Query_wgpDcyb(ord_no_pk);
  744. string dbpc = row.GetValue("单倍坯长");
  745. Bind_GpLengthTo_ugrkinfo(dbpc);
  746. }
  747. private void Bind_GpLengthTo_ugrkinfo(string db_pc)
  748. {
  749. int dbpc = int.Parse(db_pc);
  750. foreach (DataRow row in ds_rukuinfo.Tables[0].Rows)
  751. {
  752. row["管坯长度"] = Convert.ToInt32(row["倍尺"]) * dbpc;
  753. row["管坯理论长度"] = Convert.ToInt32(row["倍尺"]) * dbpc;
  754. }
  755. }
  756. private void ck_sglcode_CheckedChanged(object sender, System.EventArgs e)
  757. {
  758. txt_stove_no.Text = string.Empty;
  759. txt_judge_stove_no.Text = string.Empty;
  760. if(ck_sglcode.Checked)
  761. {
  762. txt_stove_no.Enabled = true;
  763. txt_judge_stove_no.Enabled = true;
  764. }
  765. else
  766. {
  767. txt_stove_no.Enabled = false;
  768. txt_judge_stove_no.Enabled = false;
  769. }
  770. }
  771. /// <summary>
  772. /// 获取炉号以及判定炉号
  773. /// </summary>
  774. private void get_stove_no()
  775. {
  776. UltraGridRow row = ug_dcyb.ActiveRow;
  777. if(row != null)
  778. {
  779. stove_no = row.Cells["炉号"].Value.ToString();
  780. judge_stove_no = row.Cells["判定炉号"].Value.ToString();
  781. }
  782. if(ck_sglcode.Checked)
  783. {
  784. stove_no = txt_stove_no.Text.Trim();
  785. judge_stove_no = txt_judge_stove_no.Text.Trim();
  786. }
  787. car_no = txt_carno.Text.Trim();
  788. }
  789. private void cb_stock_SelectionChanged(object sender, System.EventArgs e)
  790. {
  791. string stockname = cb_stock.Text;
  792. Bind_location(stockname);
  793. }
  794. private void Bind_location(string stockname)
  795. {
  796. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_Stock_Location", new object[] {stockname}, this.ob);
  797. if (dt.Rows.Count > 0)
  798. {
  799. cb_location.DataSource = dt;
  800. cb_location.DisplayMember = "LOCATION_NAME";
  801. cb_location.ValueMember = "LOCATION_NAME";
  802. cb_location.SelectedIndex = 0;
  803. txt_location.Text = dt.Rows[0]["LOCATION_NAME"].ToString();
  804. }
  805. }
  806. private bool Query_Jielu()
  807. {
  808. get_stove_no();
  809. if(string.IsNullOrEmpty(ord_no_pk) || string.IsNullOrEmpty(judge_stove_no))
  810. {
  811. return false;
  812. }
  813. bool flag = false;
  814. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_RK_JIELU", new object[] { ord_no_pk, judge_stove_no }, this.ob);
  815. if(int.Parse(dt.Rows[0][0].ToString())>0)
  816. {
  817. flag = true;
  818. }
  819. return flag;
  820. }
  821. /// <summary>
  822. /// 刷新Grid数据并根据数据调整Grid列宽
  823. /// </summary>
  824. /// <param name="ultraGrid">需要处理的Grid</param>
  825. public static void RefreshAndAutoSize(Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid)
  826. {
  827. try
  828. {
  829. ultraGrid.DataBind();
  830. foreach (Infragistics.Win.UltraWinGrid.UltraGridBand band in ultraGrid.DisplayLayout.Bands)
  831. {
  832. foreach (Infragistics.Win.UltraWinGrid.UltraGridColumn column in band.Columns)
  833. {
  834. column.PerformAutoResize(Infragistics.Win.UltraWinGrid.PerformAutoSizeType.AllRowsInBand);
  835. }
  836. }
  837. ultraGrid.Refresh();
  838. }
  839. catch { }
  840. }
  841. /// <summary>
  842. /// 查询详细信息
  843. /// </summary>
  844. /// <param name="sender"></param>
  845. /// <param name="e"></param>
  846. private void ug_rkinfo_p_ClickCell(object sender, ClickCellEventArgs e)
  847. {
  848. UltraGridRow row = ug_rkinfo_p.ActiveRow;
  849. if (row == null)
  850. return;
  851. string instock_doc = row.GetValue("INSTOCK_DOC");
  852. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_Stock_CHEDAN_DETAILS", new object[] { instock_doc }, this.ob);
  853. GridHelper.CopyDataToDatatable(dt, ds_rkinfo_c.Tables[0], true);
  854. RefreshAndAutoSize(ug_rkinfo_c);
  855. SetStaticsInfocd();
  856. }
  857. private void ug_rkinfo_p_Click(object sender, EventArgs e)
  858. {
  859. UltraGridRow row = ug_rkinfo_p.ActiveRow;
  860. if (row == null)
  861. return;
  862. string instock_doc = row.GetValue("INSTOCK_DOC");
  863. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_Stock_CHEDAN_DETAILS", new object[] { instock_doc }, this.ob);
  864. GridHelper.CopyDataToDatatable(dt, ds_rkinfo_c.Tables[0], true);
  865. RefreshAndAutoSize(ug_rkinfo_c);
  866. SetStaticsInfocd();
  867. }
  868. private void FrmCGpRk_Shown(object sender, EventArgs e)
  869. {
  870. setToolBarAppearance(DefaultableBoolean.True, DefaultableBoolean.False, DefaultableBoolean.False);
  871. RefreshAndAutoSize(ug_orders);
  872. RefreshAndAutoSize(ug_dcyb);
  873. }
  874. private void ultraCheckEditor1_CheckedChanged(object sender, EventArgs e)
  875. {
  876. if (ultraCheckEditor1.Checked)
  877. {
  878. txt_orderno_cd.Enabled = true;
  879. }
  880. else
  881. {
  882. txt_orderno_cd.Enabled = false;
  883. }
  884. }
  885. private void ultraCheckEditor3_CheckedChanged(object sender, EventArgs e)
  886. {
  887. if (ultraCheckEditor3.Checked)
  888. {
  889. txt_stove_judgeno_cd.Enabled = true;
  890. }
  891. else
  892. {
  893. txt_stove_judgeno_cd.Enabled = false;
  894. }
  895. }
  896. private void ug_rkinfo_p_AfterSelectChange(object sender, AfterSelectChangeEventArgs e)
  897. {
  898. foreach (UltraGridRow uRow in ug_rkinfo_p.Selected.Rows)
  899. {
  900. if (uRow.GetType() != typeof(Infragistics.Win.UltraWinGrid.UltraGridGroupByRow))
  901. {
  902. uRow.Cells["CHK"].Value = true;
  903. }
  904. }
  905. }
  906. /// <summary>
  907. /// 禁止排序
  908. /// </summary>
  909. /// <param name="ugr"></param>
  910. public void ForbidSort(UltraGrid ugr)
  911. {
  912. foreach (UltraGridColumn ugc in ugr.DisplayLayout.Bands[0].Columns)
  913. {
  914. ugc.SortIndicator = SortIndicator.Disabled;
  915. ugc.AllowRowFiltering = DefaultableBoolean.False;
  916. }
  917. }
  918. private void ug_rkinfo_p_AfterRowActivate(object sender, EventArgs e)
  919. {
  920. UltraGridRow row = ug_rkinfo_p.ActiveRow;
  921. string instock_doc = row.GetValue("INSTOCK_DOC");
  922. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_Stock_CHEDAN_DETAILS", new object[] { instock_doc }, this.ob);
  923. GridHelper.CopyDataToDatatable(dt, ds_rkinfo_c.Tables[0], true);
  924. RefreshAndAutoSize(ug_rkinfo_c);
  925. SetStaticsInfocd();
  926. }
  927. private void ug_orders_AfterRowActivate(object sender, EventArgs e)
  928. {
  929. bind_ug_orders();
  930. }
  931. private void txt_location_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  932. {
  933. string stockname = cb_stock.Text;
  934. StockLocationPopup frm = new StockLocationPopup(this.ob);
  935. frm.StockName = stockname;
  936. frm.StartPosition = FormStartPosition.CenterScreen;
  937. frm.Show();
  938. frm.onSelected += frm_onSelected;
  939. }
  940. private void frm_onSelected(string location)
  941. {
  942. txt_location.Text = location;
  943. }
  944. private void Query_wgpStockinfo()
  945. {
  946. string judge_stove_no = txt_judge_stoveno_jl.Text.Trim();
  947. string stockcode = cb_stock_jl.Value.ToString();
  948. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.get_CGP_Stock_INFO", new object[] { stockcode, judge_stove_no }, this.ob);
  949. GridHelper.CopyDataToDatatable(dt, ds_stockinfo_qry.Tables[0], true);
  950. RefreshAndAutoSize(ug_wgpstockinfo);
  951. }
  952. private void btn_cancelJieLu_Click_1(object sender, EventArgs e)
  953. {
  954. UltraGridRow row = ug_wgpstockinfo.ActiveRow;
  955. if (row == null)
  956. return;
  957. string judge_apply_code = row.Cells["jugde_apply_code"].Value.ToString();
  958. if(!string.IsNullOrEmpty(judge_apply_code))
  959. {
  960. MessageUtil.ShowTips("已申请判定,不能撤销结炉!");
  961. return;
  962. }
  963. string isJielu = row.Cells["node_fur_flag"].Value.ToString();
  964. if (isJielu=="否")
  965. {
  966. MessageUtil.ShowTips("未结炉,不需要撤销!");
  967. return;
  968. }
  969. MessageUtil.ShowTips("撤销成功!");
  970. }
  971. private void ug_rukinfo_AfterCellUpdate(object sender, CellEventArgs e)
  972. {
  973. if (e.Cell.Column.Key == "支数" || e.Cell.Column.Key == "管坯长度")
  974. {
  975. UltraGridRow row = e.Cell.Row;
  976. calculate_ug_rukinfo_theoryweight(row);
  977. }
  978. }
  979. private void calculate_ug_rukinfo_theoryweight(UltraGridRow _row)
  980. {
  981. object value = _row.GetValue("支数");
  982. string gplength = _row.GetValue("管坯长度");
  983. string gplengthll = _row.GetValue("管坯理论长度");
  984. if (value == null)
  985. return;
  986. int quantity;
  987. if (Int32.TryParse(value.ToString(), out quantity) && quantity > 0)
  988. {
  989. UltraGridRow row = ug_orders.ActiveRow;
  990. if (row == null)
  991. return;
  992. string diam = row.GetValue("断面");
  993. double d = double.Parse(diam) / 1000;
  994. double weight = quantity * (d * d / 4) * 3.1415 * 7.8 * double.Parse(gplength) / 1000;
  995. double weightll = quantity * (d * d / 4) * 3.1415 * 7.8 * double.Parse(gplengthll) / 1000;
  996. _row.SetValue("理论重量", Math.Round(weight, 3).ToString());
  997. _row.SetValue("管坯理论重量", Math.Round(weightll, 3).ToString());
  998. }
  999. else
  1000. {
  1001. _row.Cells["理论重量"].Value = DBNull.Value;
  1002. _row.Cells["管坯理论重量"].Value = DBNull.Value;
  1003. _row.Cells["重量"].Value = DBNull.Value;
  1004. }
  1005. SetStaticsInfo();
  1006. }
  1007. private void SetStaticsInfo()
  1008. {
  1009. try
  1010. {
  1011. if (this.ug_rukinfo.Rows.Count == 0)
  1012. {
  1013. this.ug_rukinfo.DisplayLayout.Bands[0].Summaries.Clear();
  1014. }
  1015. else
  1016. {
  1017. ArrayList alist = new ArrayList();
  1018. //废钢
  1019. alist.Add("支数");
  1020. alist.Add("理论重量");
  1021. alist.Add("重量");
  1022. SetStaticsInfoSum(ref this.ug_rukinfo, alist, true);
  1023. }
  1024. }
  1025. catch { }
  1026. }
  1027. private void SetStaticsInfocd()
  1028. {
  1029. try
  1030. {
  1031. if (this.ug_rkinfo_c.Rows.Count == 0)
  1032. {
  1033. this.ug_rkinfo_c.DisplayLayout.Bands[0].Summaries.Clear();
  1034. }
  1035. else
  1036. {
  1037. ArrayList alist = new ArrayList();
  1038. //废钢
  1039. alist.Add("支数");
  1040. alist.Add("重量");
  1041. SetStaticsInfoSum(ref this.ug_rkinfo_c, alist, true);
  1042. }
  1043. }
  1044. catch { }
  1045. }
  1046. public void SetStaticsInfoSum(ref UltraGrid myGrid1, ArrayList alistColumns, bool clearExists)
  1047. {
  1048. try
  1049. {
  1050. UltraGridBand band = myGrid1.DisplayLayout.Bands[0];
  1051. if (clearExists)
  1052. band.Summaries.Clear();
  1053. band.Override.SummaryFooterCaptionVisible = Infragistics.Win.DefaultableBoolean.False;
  1054. for (int i = 0; i < alistColumns.Count; i++)
  1055. {
  1056. try
  1057. {
  1058. SummarySettings summary = band.Summaries.Add(SummaryType.Sum, band.Columns[alistColumns[i].ToString()]);
  1059. summary.SummaryDisplayArea = SummaryDisplayAreas.BottomFixed;
  1060. summary.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
  1061. if (alistColumns[i].ToString().Contains("COUNT") || alistColumns[i].ToString().Contains("支数"))
  1062. {
  1063. summary.DisplayFormat = "{0:N0}";
  1064. }
  1065. else
  1066. {
  1067. summary.DisplayFormat = "{0:N3}";
  1068. }
  1069. summary.Appearance.TextHAlign = Infragistics.Win.HAlign.Right;
  1070. summary.Appearance.TextVAlign = Infragistics.Win.VAlign.Middle;
  1071. summary.Appearance.FontData.Bold = DefaultableBoolean.True;
  1072. summary.Lines = 3;
  1073. }
  1074. catch { }
  1075. }
  1076. //band.Summaries.Add("Summary1", SummaryType.Count, band.Columns["GTLRATEYLG"]);
  1077. //band.Summaries["Summary1"].Formula ="sum([FGSTYLG])*100/sum([MATERIALOUTYLG])";
  1078. }
  1079. catch { }
  1080. }
  1081. /// <summary>
  1082. /// 设置tpco 天淮 是否可以修改长度及隐藏 参考列
  1083. /// </summary>
  1084. public void setTpcoTH()
  1085. {
  1086. string deptId = this.UserInfo.GetDeptid();
  1087. if (deptId.StartsWith("002023"))
  1088. {
  1089. ug_rukinfo.DisplayLayout.Bands[0].Columns["管坯长度"].CellActivation = Activation.AllowEdit;
  1090. this.ck_sglcode.Checked = true;
  1091. this.ck_jielu.Checked = false;
  1092. }
  1093. ug_rukinfo.DisplayLayout.Bands[0].Columns["管坯理论长度"].Hidden = true;
  1094. ug_rukinfo.DisplayLayout.Bands[0].Columns["管坯理论重量"].Hidden = true;
  1095. }
  1096. }
  1097. }