FrmPlnFurnace.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.Mes.Client.Comm.Tool;
  3. using Core.StlMes.Client.PlnSaleOrd.BaseMethod;
  4. using Core.StlMes.Client.PlnSaleOrd.炼钢计划;
  5. using Core.StlMes.Client.PlnSaleOrd.炉计划.Entity;
  6. using CoreFS.CA06;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.ComponentModel;
  10. using System.Data;
  11. using System.Drawing;
  12. using System.Linq;
  13. using System.Text;
  14. using System.Windows.Forms;
  15. namespace Core.StlMes.Client.PlnSaleOrd.炉计划
  16. {
  17. public partial class FrmPlnFurnace : FrmBase
  18. {
  19. public FrmPlnFurnace()
  20. {
  21. InitializeComponent();
  22. }
  23. private void FrmPlnFurnace_Load(object sender, EventArgs e)
  24. {
  25. //订单排产
  26. EntityHelper.ShowGridCaption<PlnZyZgMEntity>(ultraGridZyD.DisplayLayout.Bands[0]);
  27. EntityHelper.ShowGridCaption<PlnZyZgCEntity>(ultraGridZyD.DisplayLayout.Bands[1]);
  28. BaseHelper.setUltraGridColumnMaxInput(ultraGridZyD, new string[] { "WtGpSingle", "PlnInsingleWt", "PlnOutsingleW" });
  29. BaseHelper.setUltraGridColumnBits(ultraGridZyD, new string[] { "PlnInsingleNum", "PlnOutsingleNum" });
  30. BaseHelper.InitCellPosition(ultraGridZyD, new string[] { "GxProSeq", "GxPlanNo","OrderSeq", "DeliveryNo", "LenRollMax", "LenRollMin", "Aimoutdiameter","Aimwallthick","CcmGxPlanNo","Aimlength" ,"Diameter","LenGpSingle","WtGpSingle","PlnInsingleNum","PlnInsingleWt","PlnOutsingleNum",
  31. "PlnOutsingleW","Outdiameter", "Wallthick","OutdiameterZg","WallthickZg","RollLength","OutnumCut","LenCutend","LenCuthead","DiameterMandrel","CraftSeq"});
  32. BaseHelper.InitCellPositionC(ultraGridZyD, new string[] { "Diameter", "LenGpSingle", "WtGpSingle", "CutNumGp", "LengthM", "WeightM", "PlanIndoubleNum", "PlanIndoubleWt", "RealIndoubleNum", "RealIndoubleWt", "GxPlanNo" });
  33. BaseHelper.GridColumnSum(ultraGridZyD, new string[] { "PlnInsingleWt", "PlnOutsingleW" });
  34. BaseHelper.GridColumnCount(ultraGridZyD, new string[] { "PlnInsingleNum", "PlnOutsingleNum" });
  35. //BaseHelper.InitCellPositionMiddle(ultraGridZyD, new string[] { "Isendgx", "IfWlMatched", "IfMonitorZg" });
  36. SteelHelper.ForbidSort(ultraGridZyD);
  37. }
  38. public override void ToolBar_Click(object sender, string ToolbarKey)
  39. {
  40. base.ToolBar_Click(sender, ToolbarKey);
  41. switch (ToolbarKey)
  42. {
  43. case "Query"://查询
  44. Query();
  45. break;
  46. case "Close": //关闭
  47. this.Close();
  48. break;
  49. default:
  50. break;
  51. }
  52. }
  53. private void Query()
  54. {
  55. string judgeNo = "";
  56. if (chcJudgeNo.Checked) { judgeNo = txtJudgeNo.Text.Trim(); }
  57. List<PlnZyZgMEOntity> listSourceM = EntityHelper.GetData<PlnZyZgMEOntity>
  58. ("com.steering.pss.plnsaleord.planStove.FrmPlanStoveD.queryPlanStoveD", new object[] { judgeNo }, ob);
  59. List<PlnZyZgCEntity> listSourceC = EntityHelper.GetData<PlnZyZgCEntity>
  60. ("com.steering.pss.plnsaleord.planStove.FrmPlanStoveD.queryPlanStoveDc", new object[] { judgeNo }, ob);
  61. EntityHelper.AddEntityRelation<PlnZyZgMEOntity, PlnZyZgCEntity>(listSourceM, listSourceC, "HeatPlanNo", "HeatPlanNo");
  62. plnZyZgMEntityBindingSource.DataSource = listSourceM;
  63. GridHelper.RefreshAndAutoSize(ultraGridZyD);
  64. }
  65. /// <summary>
  66. ///同步00
  67. /// </summary>
  68. /// <param name="sender"></param>
  69. /// <param name="e"></param>
  70. private void ultraButton1_Click(object sender, EventArgs e)
  71. {
  72. PlanComm.WaitFromOpen(this.Cursor);
  73. CoreClientParam ccp = new CoreClientParam();
  74. ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD";
  75. ccp.MethodName = "doSynchronous";
  76. ccp.ServerParams = new object[] {"00"};
  77. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  78. PlanComm.WaitFromColse(this.Cursor);
  79. if (ccp.ReturnCode == -1) ;
  80. MessageUtil.ShowTips(ccp.ReturnInfo);
  81. if (ccp.ReturnInfo.Equals("同步00成功!"))
  82. {
  83. //Query();
  84. }
  85. }
  86. /// <summary>
  87. ///同步10
  88. /// </summary>
  89. /// <param name="sender"></param>
  90. /// <param name="e"></param>
  91. private void ultraButton2_Click(object sender, EventArgs e)
  92. {
  93. PlanComm.WaitFromOpen(this.Cursor);
  94. CoreClientParam ccp = new CoreClientParam();
  95. ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD";
  96. ccp.MethodName = "doSynchronous";
  97. ccp.ServerParams = new object[] { "10" };
  98. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  99. PlanComm.WaitFromColse(this.Cursor);
  100. if (ccp.ReturnCode == -1) ;
  101. MessageUtil.ShowTips(ccp.ReturnInfo);
  102. if (ccp.ReturnInfo.Equals("同步10成功!"))
  103. {
  104. //Query();
  105. }
  106. }
  107. /// <summary>
  108. ///同步20
  109. /// </summary>
  110. /// <param name="sender"></param>
  111. /// <param name="e"></param>
  112. private void ultraButton3_Click(object sender, EventArgs e)
  113. {
  114. PlanComm.WaitFromOpen(this.Cursor);
  115. CoreClientParam ccp = new CoreClientParam();
  116. ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD";
  117. ccp.MethodName = "doSynchronous";
  118. ccp.ServerParams = new object[] { "20" };
  119. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  120. PlanComm.WaitFromColse(this.Cursor);
  121. if (ccp.ReturnCode == -1) ;
  122. MessageUtil.ShowTips(ccp.ReturnInfo);
  123. if (ccp.ReturnInfo.Equals("同步20成功!"))
  124. {
  125. //Query();
  126. }
  127. }
  128. }
  129. }