| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- using Core.Mes.Client.Comm.Format;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.YdmBcPipeManage.Entity;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Data;
- namespace Core.StlMes.Client.YdmBcPipeManage
- {
- public partial class FrmOfflineHtt : FrmBase
- {
- public FrmOfflineHtt(OpeBase ob, string[] valid)
- {
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- InitializeComponent();
- _ob = ob;
- _valid = valid;
- }
- private string[] plineCode = null;
- private string[] _valid = null;
- private void FrmOfflineZg_Load(object sender, EventArgs e)
- {
- EntityHelper.ShowGridCaption<PlnZyRclMWithGroupPort>(ultraGrid1.DisplayLayout.Bands[0]);
- plineCode = BaseMethod.getPCodePline(_valid, _ob);
- var dt5 = ServerHelper.GetData("com.steering.mes.mcp.heatTreatment.ScrapHelper.doQuery",
- new object[] { "6002", new string[] { "600201", "600202", "600203", "600204", "600205", "600206", "600207", "600208", "600209", "600211" }, }, _ob);
- cmbProcess.DataSource = dt5;
- cmbProcess.DisplayMember = "BASENAME";
- cmbProcess.ValueMember = "BASECODE";
- doQueryMilPlan();
- }
- OpeBase _ob;
- /// <summary>
- /// 重写基类方法
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="To
- /// olbarKey"></param>
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "DoQuery":
- doQueryMilPlan();
- break;
- case"DoOffline":
- doOffline();
- break;
- case"DoBack":
- doBack();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- /// <summary>
- /// 查询可离线数据
- /// </summary>
- private void doQueryMilPlan()
- {
- string lotNo = "";
- string judgeNo = "";
- if(chkBatch.Checked && this.txtBatch.Text.Trim() != "")
- {
- lotNo = this.txtBatch.Text.Trim();
- }
- if(this.chkFurnace.Checked && this.txtFurnace.Text != "")
- {
- judgeNo = this.txtFurnace.Text.Trim();
- }
- List<PlnZyRclMWithGroupPort> listSource = EntityHelper.GetData<PlnZyRclMWithGroupPort>(
- "com.steering.mes.mcp.common.OfflineHelper.QueryHttCanOffLineData", new object[] { lotNo, judgeNo, plineCode }, _ob);
- plnZyRclMWithGroupPortBindingSource.DataSource = listSource;
- }
- /// <summary>
- /// 离线
- /// </summary>
- private void doOffline()
- {
- this.ultraGrid1.UpdateData();
- PlnZyRclMWithGroupPort PlnZyRclMWithGroupPort = this.ultraGrid1.ActiveRow.ListObject as PlnZyRclMWithGroupPort;
- if (PlnZyRclMWithGroupPort == null) return;
- if (cmbProcess.Text == "")
- {
- MessageUtil.ShowTips("离线时请选择离线工序点!");
- return;
- }
- if (PlnZyRclMWithGroupPort.EditCount==null)
- {
- MessageUtil.ShowTips("请输入离线支数!");
- return;
- }
- string gx = cmbProcess.SelectedItem.DataValue.ToString();
- string[] gxs = new string[]{};
- if (gx == "600202" || gx == "600203" || gx == "600204")
- {
- gxs = new string[] { "600202", "600203", "600204" };
- }
- else if (gx == "600205" || gx == "600206" || gx == "600207")
- {
- gxs = new string[] { "600205", "600206", "600207" };
- }
- else
- {
- gxs = new string[] { gx };
- }
- ArrayList list = new ArrayList();
- list.Add(PlnZyRclMWithGroupPort.HeatPlanNo);
- list.Add(PlnZyRclMWithGroupPort.PhyBatchNo);
- list.Add(gx);
- list.Add((int)(PlnZyRclMWithGroupPort.ProcessSeq??1));
- list.Add(this.UserInfo.GetUserName());
- list.Add(this.UserInfo.GetUserOrder());
- list.Add(this.UserInfo.GetUserGroup());
- list.Add((int)PlnZyRclMWithGroupPort.EditCount);
- list.Add(PlnZyRclMWithGroupPort.PlineCode);
- list.Add(gxs);
-
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.mcp.common.OfflineHelper";
- ccp.MethodName = "HttOffLine";
- ccp.ServerParams = new object[] { list };
- ccp = _ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("离线成功!"))
- {
- doQueryMilPlan();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- /// <summary>
- /// 撤销离线
- /// </summary>
- private void doBack()
- {
-
- }
- private void chkLotNo_CheckedChanged(object sender, EventArgs e)
- {
- this.txtBatch.Enabled = this.chkBatch.Checked;
- }
- private void chkFurnace_CheckedChanged(object sender, EventArgs e)
- {
- this.txtFurnace.Enabled = this.chkFurnace.Checked;
- }
-
-
- }
- }
|