FrmPlanStoveD.cs 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.Mes.Client.Comm.Format;
  3. using Core.Mes.Client.Comm.Tool;
  4. using Core.StlMes.Client.PlnSaleOrd.BaseMethod;
  5. using Core.StlMes.Client.PlnSaleOrd.工序排产;
  6. using Core.StlMes.Client.PlnSaleOrd.炼钢计划;
  7. using Core.StlMes.Client.PlnSaleOrd.炉计划.Entity;
  8. using Core.StlMes.Client.PlnSaleOrd.炉计划.Tool;
  9. using CoreFS.CA06;
  10. using Infragistics.Win;
  11. using Infragistics.Win.UltraWinGrid;
  12. using System;
  13. using System.Collections;
  14. using System.Collections.Generic;
  15. using System.ComponentModel;
  16. using System.Data;
  17. using System.Drawing;
  18. using System.Linq;
  19. using System.Text;
  20. using System.Windows.Forms;
  21. namespace Core.StlMes.Client.PlnSaleOrd.炉计划
  22. {
  23. public partial class FrmPlanStoveD : FrmBase
  24. {
  25. /// <summary>
  26. /// 调整行集合
  27. /// </summary>
  28. private ArrayList _EntityList = null;
  29. private string[] plineCode = null;//获取产线代码
  30. /// <summary>
  31. /// 虚拟炉计划id
  32. /// </summary>
  33. private string _heatPlanNo = "";
  34. /// <summary>
  35. /// 行首背景色
  36. /// </summary>
  37. private Color _backColor = new Color();
  38. public FrmPlanStoveD()
  39. {
  40. this.IsLoadUserView = true;
  41. InitializeComponent();
  42. }
  43. private void FrmPlanStoveD_Load(object sender, EventArgs e)
  44. {
  45. //订单排产
  46. EntityHelper.ShowGridCaption<PlnZyZgMEntity>(ultraGridZyD.DisplayLayout.Bands[0]);
  47. EntityHelper.ShowGridCaption<PlnZyZgMCEntity>(ultraGrid1.DisplayLayout.Bands[0]);
  48. BaseHelper.setUltraGridColumnMaxInput(ultraGridZyD, new string[] { "WtGpSingle", "PlnInsingleWt", "PlnOutsingleW", "ReducedWt" });
  49. BaseHelper.setUltraGridColumnBits(ultraGridZyD, new string[] { "PlnInsingleNum", "PlnOutsingleNum" });
  50. BaseHelper.InitCellPosition(ultraGridZyD, new string[] { "GxProSeq", "GxPlanNo","OrderSeq", "DeliveryNo", "LenRollMax", "LenRollMin", "Aimoutdiameter","Aimwallthick","CcmGxPlanNo","Aimlength" ,"Diameter","LenGpSingle","WtGpSingle","PlnInsingleNum","PlnInsingleWt","PlnOutsingleNum",
  51. "PlnOutsingleW","Outdiameter", "Wallthick","OutdiameterZg","WallthickZg","RollLength","OutnumCut","LenCutend","LenCuthead","DiameterMandrel","CraftSeq", "ReducedWt"});
  52. //BaseHelper.InitCellPositionC(ultraGridZyD, new string[] { "Diameter", "LenGpSingle", "WtGpSingle", "CutNumGp", "LengthM", "WeightM", "PlanIndoubleNum", "PlanIndoubleWt", "RealIndoubleNum", "RealIndoubleWt", "GxPlanNo" });
  53. BaseHelper.GridColumnSum(ultraGridZyD, new string[] { "PlnInsingleWt", "PlnOutsingleW", "ReducedWt" });
  54. BaseHelper.GridColumnCount(ultraGridZyD, new string[] { "PlnInsingleNum", "PlnOutsingleNum" });
  55. //BaseHelper.InitCellPositionMiddle(ultraGridZyD, new string[] { "Isendgx", "IfWlMatched", "IfMonitorZg" });
  56. plineCode = PlanHelper.InitDropPlinePower("D", txtLine, this.ValidDataPurviewIds, this.ob);
  57. StoveHelper.ForbidSort(ultraGridZyD);
  58. BaseHelper.setUltraGridColumnMaxInput(ultraGrid1, new string[] { "WtGpSingle", "PlnInsingleWt", "PlnOutsingleW", "ActuaWt", "TotWeightM", "CutWeight", "ReducedWt", "RealIndoubleWt" });
  59. BaseHelper.setUltraGridColumnBits(ultraGrid1, new string[] { "PlnInsingleNum", "PlnOutsingleNum", "ActuaNum", "TotMumM" });
  60. BaseHelper.InitCellPosition(ultraGrid1, new string[] { "GxProSeq", "GxPlanNo","OrderSeq", "DeliveryNo", "LenRollMax", "LenRollMin", "Aimoutdiameter","Aimwallthick","CcmGxPlanNo","Aimlength" ,"Diameter","LenGpSingle","WtGpSingle","PlnInsingleNum","PlnInsingleWt","PlnOutsingleNum",
  61. "PlnOutsingleW","Outdiameter", "Wallthick","OutdiameterZg","WallthickZg","RollLength","OutnumCut","LenCutend","LenCuthead","DiameterMandrel","CraftSeq","LenGpSingleD","LengthM","CutNumGp","ActuaWt","ActuaNum","TotMumM","TotWeightM","CutWeight","CutLength", "ReducedWt","RealIndoubleNum","RealIndoubleWt"});
  62. //BaseHelper.InitCellPositionC(ultraGridZyD, new string[] { "Diameter", "LenGpSingle", "WtGpSingle", "CutNumGp", "LengthM", "WeightM", "PlanIndoubleNum", "PlanIndoubleWt", "RealIndoubleNum", "RealIndoubleWt", "GxPlanNo" });
  63. BaseHelper.GridColumnSum(ultraGrid1, new string[] { "ActuaWt", "CutWeight", "RealIndoubleWt" });
  64. BaseHelper.GridColumnCount(ultraGrid1, new string[] { "ActuaNum", "RealIndoubleNum" });
  65. StoveHelper.ForbidSort(ultraGrid1);
  66. InitDate();
  67. BaseHelper.SetGroupBySum(ultraGrid1, new string[] { "PlnOutsingleNum", "PlnOutsingleW", "ReducedWt" }, "HeatPlanNo");
  68. BaseHelper.InitComboEditor(ultraComboEditor1, "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD.doQueryStorageNo", "STORAGE_NO", ob, true);
  69. }
  70. private void chcLine_CheckedChanged(object sender, EventArgs e)
  71. {
  72. if (chcLine.Checked) { txtLine.Enabled = true; } else { txtLine.Enabled = false; }
  73. if (chcProPlanId.Checked) { txtProPlanId.Enabled = true; } else { txtProPlanId.Enabled = false; }
  74. if (chcOrderNo.Checked) { txtOrderNo.Enabled = true; } else { txtOrderNo.Enabled = false; }
  75. if (chcId.Checked) { txtId.Enabled = true; } else { txtId.Enabled = false; }
  76. if (chcTime.Checked) { dateBegin.Enabled = true; dateEnd.Enabled = true; } else { dateBegin.Enabled = false; dateEnd.Enabled = false; }
  77. if (chcJudgeNo.Checked) { txtJudgeNo.Enabled = true; } else { txtJudgeNo.Enabled = false; }
  78. if (ultraCheckEditor1.Checked) { txtFeedHeatNo.Enabled = true; } else { txtFeedHeatNo.Enabled = false; }
  79. if (ultraCheckEditor3.Checked) { ultraTextEditor3.Enabled = true; } else { ultraTextEditor3.Enabled = false; }
  80. }
  81. /// <summary>
  82. /// 初始时间
  83. /// </summary>
  84. private void InitDate()
  85. {
  86. DateTime datetime = DateTime.Now;
  87. dateBegin.Value = datetime.AddDays(1 - datetime.Day);
  88. dateEnd.Value = datetime.AddDays(1 - datetime.Day).AddMonths(1).AddDays(-1);
  89. }
  90. public override void ToolBar_Click(object sender, string ToolbarKey)
  91. {
  92. base.ToolBar_Click(sender, ToolbarKey);
  93. switch (ToolbarKey)
  94. {
  95. case "Query"://查询
  96. QueryM();
  97. break;
  98. case "Issued"://下发
  99. Issued("0");
  100. break;
  101. case "IssuedU"://撤销
  102. Issued("1");
  103. break;
  104. case "UpdateMemo"://修改备注
  105. UpdateMemo();
  106. break;
  107. case"UpdateGoWhere":
  108. updateGoWhere();
  109. break;
  110. case "UpdateFlagHeatNo":
  111. updateFlagHeatNo();
  112. break;
  113. case "CancleFlagHeatNo":
  114. cancleFlagHeatNo();
  115. break;
  116. case "Print"://打印
  117. doPrint();
  118. break;
  119. case "PrintTH"://打印
  120. doPrintTH();
  121. break;
  122. case "PrintTH2"://打印
  123. doPrintTH2();
  124. break;
  125. case "AddFeedLien"://获取上料行
  126. doAddFeedLien();
  127. break;
  128. case "UpdateHeat"://修改轧管判定炉号
  129. UpdateFeedHeattNo();
  130. break;
  131. case "Import"://导出
  132. doImport();
  133. break;
  134. case "Close": //关闭
  135. this.Close();
  136. break;
  137. default:
  138. break;
  139. }
  140. }
  141. /// <summary>
  142. /// 打印(天淮)
  143. /// </summary>
  144. private void doPrintTH()
  145. {
  146. UltraGridRow row = ultraGridZyD.ActiveRow;
  147. if (row == null) return;
  148. int countM = 0;
  149. string judgeStoveNo = "";
  150. string plineCode = "";
  151. foreach (UltraGridRow item in ultraGridZyD.Rows)
  152. {
  153. if (Convert.ToBoolean(item.Cells["CHC"].Text) == true)
  154. {
  155. countM++;
  156. if (item.Cells["Planstatus"].Text.ToString().Trim().Equals("计划"))
  157. {
  158. MessageUtil.ShowTips("选中该轧管炉计划状态是计划状态,不能打印!");
  159. return;
  160. }
  161. plineCode = item.Cells["PlineCode"].Text.ToString().Trim();
  162. judgeStoveNo += "'" + item.Cells["FeedHeatNo"].Text.ToString().Trim() + "',";
  163. }
  164. }
  165. if (countM == 0)
  166. {
  167. MessageUtil.ShowTips("请勾选需要打印的轧管炉计划主信息!");
  168. return;
  169. }
  170. if (judgeStoveNo.Equals("")) return;
  171. judgeStoveNo = judgeStoveNo.Substring(1, judgeStoveNo.Length - 3);
  172. string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilZgPlanTH.cpt&op=view" + "&JUDGE_STOVE_NO=" + judgeStoveNo + "&PLINE_CODE=" + plineCode;
  173. FrmRepExcel fBug = new FrmRepExcel(ob, strurl);
  174. fBug.AutoSize = true;
  175. fBug.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
  176. fBug.Text = "轧管炉计划打印";
  177. fBug.ShowDialog();
  178. }
  179. /// <summary>
  180. /// 打印(天淮)
  181. /// </summary>
  182. private void doPrintTH2()
  183. {
  184. UltraGridRow row = ultraGridZyD.ActiveRow;
  185. if (row == null) return;
  186. int countM = 0;
  187. string judgeStoveNo = "";
  188. string plineCode = "";
  189. foreach (UltraGridRow item in ultraGridZyD.Rows)
  190. {
  191. if (Convert.ToBoolean(item.Cells["CHC"].Text) == true)
  192. {
  193. countM++;
  194. if (item.Cells["Planstatus"].Text.ToString().Trim().Equals("计划"))
  195. {
  196. MessageUtil.ShowTips("选中该轧管炉计划状态是计划状态,不能打印!");
  197. return;
  198. }
  199. plineCode = item.Cells["PlineCode"].Text.ToString().Trim();
  200. judgeStoveNo += "'" + item.Cells["FeedHeatNo"].Text.ToString().Trim() + "',";
  201. }
  202. }
  203. if (countM == 0)
  204. {
  205. MessageUtil.ShowTips("请勾选需要打印的轧管炉计划主信息!");
  206. return;
  207. }
  208. if (judgeStoveNo.Equals("")) return;
  209. judgeStoveNo = judgeStoveNo.Substring(1, judgeStoveNo.Length - 3);
  210. string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilZgPlanTH.cpt&op=view" + "&JUDGE_STOVE_NO=" + judgeStoveNo + "&PLINE_CODE=" + plineCode;
  211. System.Diagnostics.Process.Start(strurl);
  212. //FrmRepExcel fBug = new FrmRepExcel(ob, strurl);
  213. //fBug.AutoSize = true;
  214. //fBug.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
  215. //fBug.Text = "轧管炉计划打印";
  216. //fBug.ShowDialog();
  217. }
  218. /// <summary>
  219. /// 修改物流去向
  220. /// </summary>
  221. private void updateGoWhere()
  222. {
  223. this.ultraGridZyD.UpdateData();
  224. IQueryable<UltraGridRow> checkMagRows = this.ultraGridZyD.Rows.AsQueryable().Where(" CHC = 'True'");
  225. if (checkMagRows.Count() == 0)
  226. {
  227. MessageUtil.ShowTips("请选择需要修改物流去向的数据信息!");
  228. return;
  229. }
  230. ArrayList parmList = new ArrayList();
  231. foreach (UltraGridRow row in checkMagRows)
  232. {
  233. PlnZyZgMEntity plnZgTity = (PlnZyZgMEntity)row.ListObject;
  234. plnZgTity.GowhereCode = row.Cells["GowhereCode"].Value.ToString();
  235. plnZgTity.GowhereName = row.Cells["GowhereCode"].Text.ToString();
  236. string plnZgEntity = JSONFormat.Format(plnZgTity);
  237. parmList.Add(plnZgEntity);
  238. }
  239. CoreClientParam ccp = new CoreClientParam();
  240. ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD";
  241. ccp.MethodName = "updateGoWhere";
  242. ccp.ServerParams = new object[] { parmList };
  243. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  244. if (ccp.ReturnCode != -1)
  245. {
  246. if (ccp.ReturnInfo.Equals("修改成功!"))
  247. {
  248. QueryM();
  249. MessageUtil.ShowTips(ccp.ReturnInfo);
  250. }
  251. else
  252. {
  253. MessageUtil.ShowTips(ccp.ReturnInfo);
  254. }
  255. }
  256. }
  257. /// <summary>
  258. /// 获取天津喷印炉号
  259. /// </summary>
  260. private void updateFlagHeatNo()
  261. {
  262. this.ultraGridZyD.UpdateData();
  263. IQueryable<UltraGridRow> checkMagRows = this.ultraGridZyD.Rows.AsQueryable().Where(" CHC = 'True'");
  264. if (checkMagRows.Count() == 0)
  265. {
  266. MessageUtil.ShowTips("请选择需要获取天津喷印炉号的数据信息!");
  267. return;
  268. }
  269. ArrayList parmList = new ArrayList();
  270. foreach (UltraGridRow row in checkMagRows)
  271. {
  272. PlnZyZgMEntity plnZgTity = (PlnZyZgMEntity)row.ListObject;
  273. if (!plnZgTity.FlagHeatNo.Equals(""))
  274. {
  275. MessageUtil.ShowTips("已有喷印炉号,不能获取喷印炉号!");
  276. return;
  277. }
  278. string plnZgEntity = JSONFormat.Format(plnZgTity);
  279. parmList.Add(plnZgEntity);
  280. }
  281. CoreClientParam ccp = new CoreClientParam();
  282. ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD";
  283. ccp.MethodName = "updateFlagHeatNo";
  284. ccp.ServerParams = new object[] { parmList };
  285. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  286. if (ccp.ReturnCode != -1)
  287. {
  288. if (ccp.ReturnInfo.Equals("获取成功!"))
  289. {
  290. QueryM();
  291. MessageUtil.ShowTips(ccp.ReturnInfo);
  292. }
  293. else
  294. {
  295. MessageUtil.ShowTips(ccp.ReturnInfo);
  296. }
  297. }
  298. }
  299. /// <summary>
  300. /// 撤销喷印炉号
  301. /// </summary>
  302. private void cancleFlagHeatNo()
  303. {
  304. this.ultraGridZyD.UpdateData();
  305. IQueryable<UltraGridRow> checkMagRows = this.ultraGridZyD.Rows.AsQueryable().Where(" CHC = 'True'");
  306. if (checkMagRows.Count() == 0)
  307. {
  308. MessageUtil.ShowTips("请选择需要撤销喷印炉号的数据信息!");
  309. return;
  310. }
  311. ArrayList parmList = new ArrayList();
  312. foreach (UltraGridRow row in checkMagRows)
  313. {
  314. PlnZyZgMEntity plnZgTity = (PlnZyZgMEntity)row.ListObject;
  315. string plnZgEntity = JSONFormat.Format(plnZgTity);
  316. parmList.Add(plnZgEntity);
  317. }
  318. CoreClientParam ccp = new CoreClientParam();
  319. ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD";
  320. ccp.MethodName = "cancleFlagHeatNo";
  321. ccp.ServerParams = new object[] { parmList };
  322. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  323. if (ccp.ReturnCode != -1)
  324. {
  325. if (ccp.ReturnInfo.Equals("撤销成功!"))
  326. {
  327. QueryM();
  328. MessageUtil.ShowTips(ccp.ReturnInfo);
  329. }
  330. else
  331. {
  332. MessageUtil.ShowTips(ccp.ReturnInfo);
  333. }
  334. }
  335. }
  336. private int activation= 0;
  337. /// <summary>
  338. /// 导出
  339. /// </summary>
  340. private void doImport()
  341. {
  342. if (activation < 2)
  343. {
  344. GridHelper.ulGridToExcel(ultraGridZyD, "轧管炉计划主信息");
  345. }
  346. else
  347. {
  348. GridHelper.ulGridToExcel(ultraGrid1, "轧管炉计划详情");
  349. }
  350. }
  351. private void QueryM()
  352. {
  353. if (ultraExpandableGroupBox1.Expanded == false)
  354. {
  355. QueryC();
  356. }
  357. else
  358. {
  359. Query();
  360. }
  361. }
  362. private void Query()
  363. {
  364. //产线
  365. string plineCode = "";
  366. if (chcLine.Checked)
  367. {
  368. plineCode = txtLine.Value == null ? "" : txtLine.Value.ToString();
  369. }
  370. //if (txtLine.Text.Equals(""))
  371. //{
  372. // MessageUtil.ShowTips("请选择产线!");
  373. // return;
  374. //}
  375. string timeBegin = "";
  376. string timeEnd = "";
  377. if (chcTime.Checked && dateBegin.Value != null && dateEnd.Value != null)
  378. {
  379. timeBegin = DateTime.Parse(dateBegin.Value.ToString()).ToString("yyyy-MM-dd");
  380. timeEnd = DateTime.Parse(dateEnd.Value.ToString()).ToString("yyyy-MM-dd");
  381. }
  382. //string plineCode = "";
  383. //if(chcLine.Checked&& txtLine.Value != null){plineCode=txtLine.Value.ToString();}
  384. string orderNo = "";
  385. if (chcOrderNo.Checked) { orderNo = txtOrderNo.Text.Trim(); }
  386. string proPlanId = "";
  387. if (chcProPlanId.Checked) { proPlanId = txtProPlanId.Text.Trim(); }
  388. string heatId = "";
  389. if (chcId.Checked) { heatId = txtId.Text.Trim(); }
  390. string judgeNo = "";
  391. if (chcJudgeNo.Checked) { judgeNo = txtJudgeNo.Text.Trim(); }
  392. string feedHeatNo = "";
  393. if (ultraCheckEditor1.Checked) { feedHeatNo = txtFeedHeatNo.Text.Trim(); }
  394. string feedHeatNo2 = "";
  395. if (ultraCheckEditor3.Checked) { feedHeatNo2 = ultraTextEditor3.Text.Trim(); }
  396. string lotNo = "";
  397. if (chkLotNo.Checked) {
  398. lotNo = txtLotNo.Text.Trim();
  399. }
  400. string lotNo1 = "";
  401. string lotNo2 = "";
  402. if (this.ultraCheckEditor2.Checked)
  403. {
  404. lotNo1 = this.ultraTextEditor1.Text.Trim();
  405. lotNo2 = this.ultraTextEditor2.Text.Trim();
  406. }
  407. //执行状态
  408. string[] statusArr = contorlPlanStatusZy1.statusArr;
  409. List<PlnZyZgMEntity> listSourceM = EntityHelper.GetData<PlnZyZgMEntity>
  410. ("com.steering.pss.plnsaleord.planStove.FrmPlanStoveD.queryPlanStoveD", new object[] { timeBegin, timeEnd, plineCode, orderNo, proPlanId, heatId, statusArr, judgeNo, feedHeatNo, lotNo, lotNo1, lotNo2, feedHeatNo2 }, ob);
  411. plnZyZgMEntityBindingSource.DataSource = listSourceM;
  412. //GridHelper.RefreshAndAutoSize(ultraGridZyD);
  413. foreach (UltraGridRow ugr in ultraGridZyD.Rows)
  414. {
  415. int countMess = 0;
  416. if (!_heatPlanNo.Equals(""))
  417. {
  418. if (ugr.Cells["HeatPlanNo"].Text.Trim().Equals(_heatPlanNo))
  419. {
  420. ugr.Activate();
  421. break;
  422. }
  423. }
  424. if (_EntityList != null)
  425. {
  426. for (int i = 0; i < _EntityList.Count; i++)
  427. {
  428. PlnZyZgMEntity entity = (PlnZyZgMEntity)_EntityList[i];
  429. if (ugr.Cells["HeatPlanNo"].Text.Trim().Equals(entity.HeatPlanNo))
  430. {
  431. ugr.Appearance.BackColor = Color.Wheat;
  432. ugr.Activate();
  433. }
  434. }
  435. }
  436. //没有实际炉计划,主炉计划变颜色
  437. ////foreach (UltraGridRow itemc in ugr.ChildBands[0].Rows)
  438. ////{
  439. //// countMess++;
  440. ////}
  441. ////if (countMess == 0)
  442. ////{
  443. //// ugr.RowSelectorAppearance.BackColor = Color.GreenYellow;
  444. ////}
  445. //if (countMess > 0)
  446. //{
  447. // ugr.Cells["PlnInsingleNum"].Appearance.BackColor = Color.Red;
  448. // ugr.Cells["PlnInsingleWt"].Appearance.BackColor = Color.Red;
  449. //}
  450. }
  451. _EntityList = null;
  452. _heatPlanNo = "";
  453. }
  454. private void QueryC()
  455. {
  456. //产线
  457. string plineCode = "";
  458. if (chcLine.Checked)
  459. {
  460. plineCode = txtLine.Value == null ? "" : txtLine.Value.ToString();
  461. }
  462. //if (txtLine.Text.Equals(""))
  463. //{
  464. // MessageUtil.ShowTips("请选择产线!");
  465. // return;
  466. //}
  467. string timeBegin = "";
  468. string timeEnd = "";
  469. if (chcTime.Checked && dateBegin.Value != null && dateEnd.Value != null)
  470. {
  471. timeBegin = DateTime.Parse(dateBegin.Value.ToString()).ToString("yyyy-MM-dd");
  472. timeEnd = DateTime.Parse(dateEnd.Value.ToString()).ToString("yyyy-MM-dd");
  473. }
  474. //string plineCode = "";
  475. //if(chcLine.Checked&& txtLine.Value != null){plineCode=txtLine.Value.ToString();}
  476. string orderNo = "";
  477. if (chcOrderNo.Checked) { orderNo = txtOrderNo.Text.Trim(); }
  478. string proPlanId = "";
  479. if (chcProPlanId.Checked) { proPlanId = txtProPlanId.Text.Trim(); }
  480. string heatId = "";
  481. if (chcId.Checked) { heatId = txtId.Text.Trim(); }
  482. string judgeNo = "";
  483. if (chcJudgeNo.Checked) { judgeNo = txtJudgeNo.Text.Trim(); }
  484. string feedHeatNo = "";
  485. if (ultraCheckEditor1.Checked) { feedHeatNo = txtFeedHeatNo.Text.Trim(); }
  486. string lotNo = "";
  487. if(chkLotNo.Checked)
  488. {
  489. lotNo = txtLotNo.Text.Trim();
  490. }
  491. //执行状态
  492. string[] statusArr = contorlPlanStatusZy1.statusArr;
  493. List<PlnZyZgMCEntity> listSourceC = EntityHelper.GetData<PlnZyZgMCEntity>
  494. ("com.steering.pss.plnsaleord.planStove.FrmPlanStoveD.queryPlanStoveM", new object[] { timeBegin, timeEnd, plineCode, orderNo, proPlanId, heatId, statusArr, judgeNo, feedHeatNo, lotNo }, ob);
  495. plnZyZgMCEntityBindingSource.DataSource = listSourceC;
  496. //GridHelper.RefreshAndAutoSize(ultraGridZyD);
  497. foreach (UltraGridRow ugr in ultraGrid1.Rows)
  498. {
  499. //没有实际炉计划,主炉计划变颜色
  500. if (ugr.Cells["HeatPlanSqe"].Value.ToString().Equals(""))
  501. {
  502. //ugr.RowSelectorAppearance.BackColor = Color.GreenYellow;
  503. ugr.Appearance.BackColor = Color.Orange;
  504. }
  505. }
  506. }
  507. /// <summary>
  508. /// 顺序调整
  509. /// </summary>
  510. /// <param name="sender"></param>
  511. /// <param name="e"></param>
  512. private void ultraGridZyD_MouseDown(object sender, MouseEventArgs e)
  513. {
  514. try
  515. { ultraGridZyD.UpdateData(); }
  516. catch (Exception)
  517. {
  518. MessageUtil.ShowWarning("数据异常,请刷新数据!"); return;
  519. }
  520. if (e.Button == MouseButtons.Right)
  521. {
  522. string plineCodeB = "";
  523. int count = 0;
  524. foreach (UltraGridRow ugrca in ultraGridZyD.Rows)
  525. {
  526. if (plineCodeB.Equals(""))
  527. {
  528. plineCodeB = ugrca.Cells["PlineCode"].Text.ToString();
  529. }
  530. if (!plineCodeB.Equals(ugrca.Cells["PlineCode"].Text.ToString()))
  531. {
  532. count++;
  533. }
  534. }
  535. if (count > 1)
  536. {
  537. MessageUtil.ShowTips("调整顺序时只允许界面存在相同产线,请重新查询!");
  538. return;
  539. }
  540. //移动行
  541. ArrayList entityList = ProducHelper.GetChcRows<PlnZyZgMEntity>(ultraGridZyD);
  542. if (entityList == null || entityList.Count == 0)
  543. {
  544. return;
  545. }
  546. //定位行
  547. UIElement myUIElement = ultraGridZyD.DisplayLayout.UIElement.ElementFromPoint(new Point(e.X, e.Y));
  548. UltraGridCell myCell = (UltraGridCell)myUIElement.GetContext(typeof(UltraGridCell));
  549. if (myCell == null) { return; }
  550. UltraGridRow ugr = myCell.Row;
  551. if (ugr == null) { return; }
  552. PlnZyZgMEntity entityD = (PlnZyZgMEntity)ugr.ListObject;
  553. bool flag = StoveHelper.SortPlanOrder(entityList, entityD, "D", "", this.ob);
  554. if (flag)
  555. {
  556. _EntityList = entityList;
  557. Query();
  558. }
  559. }
  560. }
  561. /// <summary>
  562. /// 修改备注
  563. /// </summary>
  564. private void UpdateMemo()
  565. {
  566. ultraGridZyD.UpdateData();
  567. UltraGridRow row = ultraGridZyD.ActiveRow;
  568. if (row == null) return;
  569. int countM = 0;
  570. ArrayList list = new ArrayList();
  571. foreach (UltraGridRow item in ultraGridZyD.Rows)
  572. {
  573. if (Convert.ToBoolean(item.Cells["CHC"].Text) == true)
  574. {
  575. countM++;
  576. ArrayList list1 = new ArrayList();
  577. //if (!item.Cells["Planstatus"].Text.ToString().Equals("计划"))
  578. //{
  579. // MessageUtil.ShowTips("选中该炉计划已下发,不能修改备注!");
  580. // return;
  581. //}
  582. list1.Add(item.Cells["Memo"].Text.ToString().Trim());
  583. list1.Add(item.Cells["HeatPlanNo"].Text.ToString().Trim());
  584. list1.Add(item.Cells["FeedHeatNo"].Text.ToString().Trim());
  585. list.Add(list1);
  586. }
  587. }
  588. if (countM == 0)
  589. {
  590. MessageUtil.ShowTips("请勾选需要修改的轧管炉计划主信息!");
  591. return;
  592. }
  593. if (MessageUtil.ShowYesNoAndQuestion("是否确认修改备注?") ==
  594. DialogResult.No)
  595. return;
  596. PlanComm.WaitFromOpen(this.Cursor);
  597. CoreClientParam ccp = new CoreClientParam();
  598. ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD";
  599. ccp.MethodName = "doUpdateMemo";
  600. ccp.ServerParams = new object[] { list, this.UserInfo.GetUserName() };
  601. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  602. PlanComm.WaitFromColse(this.Cursor);
  603. if (ccp.ReturnCode == -1) ;
  604. MessageUtil.ShowTips(ccp.ReturnInfo);
  605. if (ccp.ReturnInfo.Equals("修改成功!"))
  606. {
  607. Query();
  608. }
  609. }
  610. /// <summary>
  611. /// 修改轧批号,炉号
  612. /// </summary>
  613. private void UpdateFeedHeattNo()
  614. {
  615. ultraGridZyD.UpdateData();
  616. UltraGridRow row = ultraGridZyD.ActiveRow;
  617. if (row == null) return;
  618. int countM = 0;
  619. ArrayList list = new ArrayList();
  620. foreach (UltraGridRow item in ultraGridZyD.Rows)
  621. {
  622. if (Convert.ToBoolean(item.Cells["CHC"].Text) == true)
  623. {
  624. countM++;
  625. ArrayList list1 = new ArrayList();
  626. if (!item.Cells["Planstatus"].Text.ToString().Equals("计划"))
  627. {
  628. MessageUtil.ShowTips("选中的炉计划已不是计划状态,不能修改!");
  629. return;
  630. }
  631. //list1.Add(item.Cells["ZyBatchId"].Text.ToString().Trim());
  632. list1.Add(item.Cells["HeatPlanNo"].Text.ToString().Trim());
  633. list1.Add(item.Cells["FeedHeatNo"].Text.ToString().Trim());
  634. list.Add(list1);
  635. }
  636. }
  637. if (countM == 0)
  638. {
  639. MessageUtil.ShowTips("请勾选需要修改的轧管炉计划主信息!");
  640. return;
  641. }
  642. if (MessageUtil.ShowYesNoAndQuestion("是否确认修改轧批号或判定炉号?") ==
  643. DialogResult.No)
  644. return;
  645. PlanComm.WaitFromOpen(this.Cursor);
  646. CoreClientParam ccp = new CoreClientParam();
  647. ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD";
  648. ccp.MethodName = "doUpdateFeedHeattNo";
  649. ccp.ServerParams = new object[] { list, this.UserInfo.GetUserName() };
  650. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  651. PlanComm.WaitFromColse(this.Cursor);
  652. if (ccp.ReturnCode == -1) ;
  653. MessageUtil.ShowTips(ccp.ReturnInfo);
  654. if (ccp.ReturnInfo.Equals("修改成功!"))
  655. {
  656. Query();
  657. }
  658. }
  659. /// <summary>
  660. /// 获取上料行
  661. /// </summary>
  662. private void doAddFeedLien()
  663. {
  664. UltraGridRow row = ultraGridZyD.ActiveRow;
  665. if (row == null) return;
  666. int countM = 0;
  667. ArrayList list = new ArrayList();
  668. foreach (UltraGridRow item in ultraGridZyD.Rows)
  669. {
  670. if (!item.HasParent() && Convert.ToBoolean(item.Cells["CHC"].Text) == true)
  671. {
  672. countM++;
  673. ArrayList list1 = new ArrayList();
  674. if (!item.Cells["Planstatus"].Text.ToString().Equals("下发"))
  675. {
  676. MessageUtil.ShowTips("选中该炉计划不是下发状态,不能获取上料行!");
  677. return;
  678. }
  679. if (!item.Cells["FeedRowNo"].Text.ToString().Equals("未生成上料行"))
  680. {
  681. MessageUtil.ShowTips("选中该炉计划已生成上料行,不能重复获取上料行!");
  682. return;
  683. }
  684. list1.Add(item.Cells["HeatPlanNo"].Text.ToString().Trim());
  685. list.Add(list1);
  686. }
  687. }
  688. if (countM == 0)
  689. {
  690. MessageUtil.ShowTips("请勾选需要获取上料行并且是下发状态的轧管炉计划!");
  691. return;
  692. }
  693. PlanComm.WaitFromOpen(this.Cursor);
  694. CoreClientParam ccp = new CoreClientParam();
  695. ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD";
  696. ccp.MethodName = "doAddFeedLien";
  697. ccp.ServerParams = new object[] { list, this.UserInfo.GetUserName() };
  698. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  699. PlanComm.WaitFromColse(this.Cursor);
  700. if (ccp.ReturnCode == -1) ;
  701. MessageUtil.ShowTips(ccp.ReturnInfo);
  702. if (ccp.ReturnInfo.Equals("获取成功!"))
  703. {
  704. Query();
  705. }
  706. }
  707. /// <summary>
  708. /// 打印
  709. /// </summary>
  710. private void doPrint()
  711. {
  712. UltraGridRow row = ultraGridZyD.ActiveRow;
  713. if (row == null) return;
  714. int countM = 0;
  715. string judgeStoveNo = "";
  716. string plineCode="";
  717. foreach (UltraGridRow item in ultraGridZyD.Rows)
  718. {
  719. if (Convert.ToBoolean(item.Cells["CHC"].Text) == true)
  720. {
  721. countM++;
  722. if (item.Cells["Planstatus"].Text.ToString().Trim().Equals("计划"))
  723. {
  724. MessageUtil.ShowTips("选中该轧管炉计划状态是计划状态,不能打印!");
  725. return;
  726. }
  727. //if (!item.Cells["Planstatus"].Text.ToString().Equals("计划"))
  728. //{
  729. // MessageUtil.ShowTips("选中该炉计划已下发,不能修改备注!");
  730. // return;
  731. //}
  732. plineCode= item.Cells["PlineCode"].Text.ToString().Trim();
  733. judgeStoveNo += "'" + item.Cells["FeedHeatNo"].Text.ToString().Trim() + "',";
  734. }
  735. }
  736. if (countM == 0)
  737. {
  738. MessageUtil.ShowTips("请勾选需要打印的轧管炉计划主信息!");
  739. return;
  740. }
  741. //if (MessageUtil.ShowYesNoAndQuestion("是否确认打印炉计划?") ==
  742. //DialogResult.No)
  743. // return;
  744. if (judgeStoveNo.Equals("")) return;
  745. judgeStoveNo = judgeStoveNo.Substring(1, judgeStoveNo.Length - 3);
  746. string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilZgPlan.cpt&op=view" + "&JUDGE_STOVE_NO=" + judgeStoveNo + "&PLINE_CODE=" + plineCode;
  747. FrmRepExcel fBug = new FrmRepExcel(ob, strurl);
  748. fBug.AutoSize = true;
  749. fBug.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
  750. fBug.Text = "轧管炉计划打印";
  751. fBug.ShowDialog();
  752. }
  753. /// <summary>
  754. /// 下发炉计划
  755. /// </summary>
  756. /// <param name="flag"></param>
  757. private void Issued(string flag)
  758. {
  759. UltraGridRow row = ultraGridZyD.ActiveRow;
  760. if (row == null) return;
  761. int countM = 0;
  762. int countC = 0;
  763. ArrayList list = new ArrayList();
  764. foreach (UltraGridRow item in ultraGridZyD.Rows)
  765. {
  766. if (Convert.ToBoolean(item.Cells["CHC"].Text) == true)
  767. {
  768. countM++;
  769. ArrayList list1 = new ArrayList();
  770. if (flag.Equals("0") && !item.Cells["Planstatus"].Text.ToString().Equals("计划"))
  771. {
  772. MessageUtil.ShowTips("选中该炉计划已下发,不能重复下发!");
  773. return;
  774. }
  775. //if (flag.Equals("0") && item.Cells["SteelFalg"].Text.ToString().Trim().Equals("未结炉"))
  776. //{
  777. // MessageUtil.ShowTips("选中该炉计划未炼钢切割结炉,不能下发!");
  778. // return;
  779. //}
  780. if (flag.Equals("1") && item.Cells["Planstatus"].Text.ToString().Equals("计划"))
  781. {
  782. MessageUtil.ShowTips("选中该炉计划不处于下发状态,不能撤销!");
  783. return;
  784. }
  785. list1.Add(item.Cells["HeatPlanNo"].Text.ToString().Trim());
  786. list1.Add(item.Cells["JudgeStoveNo"].Text.ToString().Trim());
  787. list1.Add(item.Cells["StoveNo"].Text.ToString().Trim());
  788. list1.Add(item.Cells["ZyBatchId"].Text.ToString().Trim());
  789. list.Add(list1);
  790. //if (flag.Equals("0"))
  791. //{
  792. // foreach (UltraGridRow itemc in item.ChildBands[0].Rows)
  793. // {
  794. // countC++;
  795. // }
  796. // if (countC == 0)
  797. // {
  798. // MessageUtil.ShowTips("该炉未生成实际炉计划,不能下发!");
  799. // return;
  800. // }
  801. //}
  802. }
  803. }
  804. if (countM == 0)
  805. {
  806. MessageUtil.ShowTips("请勾选轧管炉计划主信息!");
  807. return;
  808. }
  809. if (MessageUtil.ShowYesNoAndQuestion((flag.Equals("0") ? "是否下发?" : "是否撤销下发?")) ==
  810. DialogResult.No)
  811. return;
  812. PlanComm.WaitFromOpen(this.Cursor);
  813. CoreClientParam ccp = new CoreClientParam();
  814. ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD";
  815. ccp.MethodName = "doFurnacePlan";
  816. ccp.ServerParams = new object[] { list, this.UserInfo.GetUserName(), flag };
  817. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  818. PlanComm.WaitFromColse(this.Cursor);
  819. if (ccp.ReturnCode == -1) ;
  820. MessageUtil.ShowTips(ccp.ReturnInfo);
  821. if (ccp.ReturnInfo.Equals(flag.Equals("0") ? "下发成功!" : "撤销成功!"))
  822. {
  823. Query();
  824. }
  825. }
  826. /// <summary>
  827. /// 托选
  828. /// </summary>
  829. /// <param name="sender"></param>
  830. /// <param name="e"></param>
  831. private void ultraGridZyD_AfterSelectChange(object sender, AfterSelectChangeEventArgs e)
  832. {
  833. foreach (UltraGridRow uRow in ultraGridZyD.Selected.Rows)
  834. {
  835. if (uRow.GetType() != typeof(Infragistics.Win.UltraWinGrid.UltraGridGroupByRow))
  836. {
  837. uRow.Cells["CHC"].Value = true;
  838. }
  839. }
  840. }
  841. private int splitterDistance = 0;
  842. int count1 =0;
  843. int count2= 0;
  844. private void ultraExpandableGroupBox1_ExpandedStateChanged(object sender, EventArgs e)
  845. {
  846. if (ultraExpandableGroupBox1.Expanded == false)
  847. {
  848. this.splitContainer1.SplitterDistance =26;
  849. count1 = 26;
  850. }
  851. else
  852. {
  853. if (ultraExpandableGroupBox2.Expanded == false)
  854. {
  855. this.splitContainer1.SplitterDistance = splitContainer1.Size.Height - 26;
  856. }
  857. else
  858. {
  859. this.splitContainer1.SplitterDistance = splitterDistance == 0 ? splitContainer1.Size.Height / 2 : splitterDistance;
  860. }
  861. count1 = splitContainer1.Size.Height - 26;
  862. }
  863. }
  864. private void ultraExpandableGroupBox2_ExpandedStateChanged(object sender, EventArgs e)
  865. {
  866. if (ultraExpandableGroupBox2.Expanded == false)
  867. {
  868. if (count1 == 0) { count1 = splitContainer1.Size.Height - 26; }
  869. this.splitContainer1.SplitterDistance = count1;
  870. }
  871. else
  872. {
  873. if (ultraExpandableGroupBox1.Expanded==false) {
  874. this.splitContainer1.SplitterDistance = 26;
  875. }
  876. else
  877. {
  878. //this.splitContainer1.SplitterDistance = count1;
  879. this.splitContainer1.SplitterDistance = splitterDistance == 0 ? splitContainer1.Size.Height / 2 : splitterDistance;
  880. }
  881. }
  882. }
  883. private void ultraGridZyD_AfterRowActivate(object sender, EventArgs e)
  884. {
  885. UltraGridRow row = ultraGridZyD.ActiveRow;
  886. if (row == null) return;
  887. QueryMRow(row.Cells["HeatPlanNo"].Text.ToString().Trim());
  888. }
  889. private void QueryMRow(string heatPlanNo)
  890. {
  891. List<PlnZyZgMCEntity> listSourceM = EntityHelper.GetData<PlnZyZgMCEntity>
  892. ("com.steering.pss.plnsaleord.planStove.FrmPlanStoveD.queryPlanStoveRow", new object[] { heatPlanNo }, ob);
  893. plnZyZgMCEntityBindingSource.DataSource = listSourceM;
  894. foreach (UltraGridRow ugr in ultraGrid1.Rows)
  895. {
  896. //没有实际炉计划,主炉计划变颜色
  897. if (ugr.Cells["HeatPlanSqe"].Value.ToString().Equals(""))
  898. {
  899. //ugr.RowSelectorAppearance.BackColor = Color.GreenYellow;
  900. ugr.Appearance.BackColor = Color.Orange;
  901. }
  902. }
  903. }
  904. private void ultraGrid1_InitializeLayout(object sender,InitializeLayoutEventArgs e)
  905. {
  906. StoveHelper.CustomMergedCellEvaluator merge = new StoveHelper.CustomMergedCellEvaluator("HeatPlanNo");
  907. e.Layout.Bands[0].Columns["HeatPlanNo"].MergedCellStyle = MergedCellStyle.Always;
  908. e.Layout.Bands[0].Columns["HeatPlanNo"].MergedCellEvaluator = merge;
  909. e.Layout.Bands[0].Columns["JudgeStoveNo"].MergedCellStyle = MergedCellStyle.Always;
  910. e.Layout.Bands[0].Columns["JudgeStoveNo"].MergedCellEvaluator = merge;
  911. e.Layout.Bands[0].Columns["FlagStoveNo"].MergedCellStyle = MergedCellStyle.Always;
  912. e.Layout.Bands[0].Columns["FlagStoveNo"].MergedCellEvaluator = merge;
  913. e.Layout.Bands[0].Columns["Memo"].MergedCellStyle = MergedCellStyle.Always;
  914. e.Layout.Bands[0].Columns["Memo"].MergedCellEvaluator = merge;
  915. e.Layout.Bands[0].Columns["StoveNo"].MergedCellStyle = MergedCellStyle.Always;
  916. e.Layout.Bands[0].Columns["StoveNo"].MergedCellEvaluator = merge;
  917. e.Layout.Bands[0].Columns["PlnInsingleNum"].MergedCellStyle = MergedCellStyle.Always;
  918. e.Layout.Bands[0].Columns["PlnInsingleNum"].MergedCellEvaluator = merge;
  919. e.Layout.Bands[0].Columns["PlnInsingleWt"].MergedCellStyle = MergedCellStyle.Always;
  920. e.Layout.Bands[0].Columns["PlnInsingleWt"].MergedCellEvaluator = merge;
  921. e.Layout.Bands[0].Columns["ZyBatchId"].MergedCellStyle = MergedCellStyle.Always;
  922. e.Layout.Bands[0].Columns["ZyBatchId"].MergedCellEvaluator = merge;
  923. e.Layout.Bands[0].Columns["GxProSeq"].MergedCellStyle = MergedCellStyle.Always;
  924. e.Layout.Bands[0].Columns["GxProSeq"].MergedCellEvaluator = merge;
  925. e.Layout.Bands[0].Columns["TotMumM"].MergedCellStyle = MergedCellStyle.Always;
  926. e.Layout.Bands[0].Columns["TotMumM"].MergedCellEvaluator = merge;
  927. e.Layout.Bands[0].Columns["totWeightM"].MergedCellStyle = MergedCellStyle.Always;
  928. e.Layout.Bands[0].Columns["totWeightM"].MergedCellEvaluator = merge;
  929. e.Layout.Bands[0].Columns["FeedHeatNo"].MergedCellStyle = MergedCellStyle.Always;
  930. e.Layout.Bands[0].Columns["FeedHeatNo"].MergedCellEvaluator = merge;
  931. e.Layout.Bands[0].Columns["LenGpSingle"].MergedCellStyle = MergedCellStyle.Always;
  932. e.Layout.Bands[0].Columns["LenGpSingle"].MergedCellEvaluator = merge;
  933. e.Layout.Bands[0].Columns["Planstatus"].MergedCellStyle = MergedCellStyle.Always;
  934. e.Layout.Bands[0].Columns["Planstatus"].MergedCellEvaluator = merge;
  935. e.Layout.Bands[0].Columns["PlnOutsingleNum"].MergedCellStyle = MergedCellStyle.Always;
  936. e.Layout.Bands[0].Columns["PlnOutsingleNum"].MergedCellEvaluator = merge;
  937. e.Layout.Bands[0].Columns["PlnOutsingleW"].MergedCellStyle = MergedCellStyle.Always;
  938. e.Layout.Bands[0].Columns["PlnOutsingleW"].MergedCellEvaluator = merge;
  939. e.Layout.Bands[0].Columns["ReducedWt"].MergedCellStyle = MergedCellStyle.Always;
  940. e.Layout.Bands[0].Columns["ReducedWt"].MergedCellEvaluator = merge;
  941. }
  942. private void ultraGridZyD_Click(object sender, EventArgs e)
  943. {
  944. activation = 1;
  945. }
  946. private void ultraGrid1_Click(object sender, EventArgs e)
  947. {
  948. activation = 2;
  949. }
  950. private void ultraGridZyD_ClickCell(object sender, ClickCellEventArgs e)
  951. {
  952. activation = 1;
  953. }
  954. private void ultraGrid1_ClickCell(object sender, ClickCellEventArgs e)
  955. {
  956. activation = 2;
  957. }
  958. private void chkLotNo_CheckedChanged(object sender, EventArgs e)
  959. {
  960. this.txtLotNo.Enabled = this.chkLotNo.Checked;
  961. }
  962. private void ultraCheckEditor2_CheckedChanged(object sender, EventArgs e)
  963. {
  964. this.ultraTextEditor1.Enabled = this.ultraTextEditor2.Enabled = this.ultraCheckEditor2.Checked;
  965. }
  966. private void ultraCheckEditor3_CheckedChanged(object sender, EventArgs e)
  967. {
  968. if (ultraCheckEditor3.Checked) { ultraTextEditor3.Enabled = true; } else { ultraTextEditor3.Enabled = false; }
  969. }
  970. }
  971. }