using Core.Mes.Client.Comm.Control; using Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.PlnSaleOrd.BaseMethod; using Core.StlMes.Client.PlnSaleOrd.炼钢计划; using Core.StlMes.Client.PlnSaleOrd.炉计划.Entity; using CoreFS.CA06; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Core.StlMes.Client.PlnSaleOrd.炉计划 { public partial class FrmPlnFurnace : FrmBase { public FrmPlnFurnace() { InitializeComponent(); } private void FrmPlnFurnace_Load(object sender, EventArgs e) { //订单排产 EntityHelper.ShowGridCaption(ultraGridZyD.DisplayLayout.Bands[0]); EntityHelper.ShowGridCaption(ultraGridZyD.DisplayLayout.Bands[1]); BaseHelper.setUltraGridColumnMaxInput(ultraGridZyD, new string[] { "WtGpSingle", "PlnInsingleWt", "PlnOutsingleW" }); BaseHelper.setUltraGridColumnBits(ultraGridZyD, new string[] { "PlnInsingleNum", "PlnOutsingleNum" }); BaseHelper.InitCellPosition(ultraGridZyD, new string[] { "GxProSeq", "GxPlanNo","OrderSeq", "DeliveryNo", "LenRollMax", "LenRollMin", "Aimoutdiameter","Aimwallthick","CcmGxPlanNo","Aimlength" ,"Diameter","LenGpSingle","WtGpSingle","PlnInsingleNum","PlnInsingleWt","PlnOutsingleNum", "PlnOutsingleW","Outdiameter", "Wallthick","OutdiameterZg","WallthickZg","RollLength","OutnumCut","LenCutend","LenCuthead","DiameterMandrel","CraftSeq"}); BaseHelper.InitCellPositionC(ultraGridZyD, new string[] { "Diameter", "LenGpSingle", "WtGpSingle", "CutNumGp", "LengthM", "WeightM", "PlanIndoubleNum", "PlanIndoubleWt", "RealIndoubleNum", "RealIndoubleWt", "GxPlanNo" }); BaseHelper.GridColumnSum(ultraGridZyD, new string[] { "PlnInsingleWt", "PlnOutsingleW" }); BaseHelper.GridColumnCount(ultraGridZyD, new string[] { "PlnInsingleNum", "PlnOutsingleNum" }); //BaseHelper.InitCellPositionMiddle(ultraGridZyD, new string[] { "Isendgx", "IfWlMatched", "IfMonitorZg" }); SteelHelper.ForbidSort(ultraGridZyD); } public override void ToolBar_Click(object sender, string ToolbarKey) { base.ToolBar_Click(sender, ToolbarKey); switch (ToolbarKey) { case "Query"://查询 Query(); break; case "Close": //关闭 this.Close(); break; default: break; } } private void Query() { string judgeNo = ""; if (chcJudgeNo.Checked) { judgeNo = txtJudgeNo.Text.Trim(); } List listSourceM = EntityHelper.GetData ("com.steering.pss.plnsaleord.planStove.FrmPlanStoveD.queryPlanStoveD", new object[] { judgeNo }, ob); List listSourceC = EntityHelper.GetData ("com.steering.pss.plnsaleord.planStove.FrmPlanStoveD.queryPlanStoveDc", new object[] { judgeNo }, ob); EntityHelper.AddEntityRelation(listSourceM, listSourceC, "HeatPlanNo", "HeatPlanNo"); plnZyZgMEntityBindingSource.DataSource = listSourceM; GridHelper.RefreshAndAutoSize(ultraGridZyD); } /// ///同步00 /// /// /// private void ultraButton1_Click(object sender, EventArgs e) { PlanComm.WaitFromOpen(this.Cursor); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD"; ccp.MethodName = "doSynchronous"; ccp.ServerParams = new object[] {"00"}; ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal); PlanComm.WaitFromColse(this.Cursor); if (ccp.ReturnCode == -1) ; MessageUtil.ShowTips(ccp.ReturnInfo); if (ccp.ReturnInfo.Equals("同步00成功!")) { //Query(); } } /// ///同步10 /// /// /// private void ultraButton2_Click(object sender, EventArgs e) { PlanComm.WaitFromOpen(this.Cursor); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD"; ccp.MethodName = "doSynchronous"; ccp.ServerParams = new object[] { "10" }; ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal); PlanComm.WaitFromColse(this.Cursor); if (ccp.ReturnCode == -1) ; MessageUtil.ShowTips(ccp.ReturnInfo); if (ccp.ReturnInfo.Equals("同步10成功!")) { //Query(); } } /// ///同步20 /// /// /// private void ultraButton3_Click(object sender, EventArgs e) { PlanComm.WaitFromOpen(this.Cursor); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmPlanStoveD"; ccp.MethodName = "doSynchronous"; ccp.ServerParams = new object[] { "20" }; ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal); PlanComm.WaitFromColse(this.Cursor); if (ccp.ReturnCode == -1) ; MessageUtil.ShowTips(ccp.ReturnInfo); if (ccp.ReturnInfo.Equals("同步20成功!")) { //Query(); } } } }