| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- 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<PlnZyZgMEntity>(ultraGridZyD.DisplayLayout.Bands[0]);
- EntityHelper.ShowGridCaption<PlnZyZgCEntity>(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<PlnZyZgMEOntity> listSourceM = EntityHelper.GetData<PlnZyZgMEOntity>
- ("com.steering.pss.plnsaleord.planStove.FrmPlanStoveD.queryPlanStoveD", new object[] { judgeNo }, ob);
- List<PlnZyZgCEntity> listSourceC = EntityHelper.GetData<PlnZyZgCEntity>
- ("com.steering.pss.plnsaleord.planStove.FrmPlanStoveD.queryPlanStoveDc", new object[] { judgeNo }, ob);
- EntityHelper.AddEntityRelation<PlnZyZgMEOntity, PlnZyZgCEntity>(listSourceM, listSourceC, "HeatPlanNo", "HeatPlanNo");
- plnZyZgMEntityBindingSource.DataSource = listSourceM;
- GridHelper.RefreshAndAutoSize(ultraGridZyD);
- }
- /// <summary>
- ///同步00
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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();
- }
- }
- /// <summary>
- ///同步10
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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();
- }
- }
- /// <summary>
- ///同步20
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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();
- }
- }
- }
- }
|