| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- 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;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Tool;
- using CoreFS.CA06;
- namespace Core.StlMes.Client.Mcp.Treatment.HeatTreatment
- {
- public partial class FrmEntrustApproval : FrmBase
- {
- private int Type = 0;
- private List<string> SubNo;
- private string step = "";
- private string _name;
- public FrmEntrustApproval(OpeBase _ob, List<string> subNo, string step, string name, bool ShowPline= true,int type= 0,string[] validDataPurviewIds=null)
- {
- InitializeComponent();
- this.ob = _ob;
- SubNo = subNo;
- this.step = step;
- _name = name;
- Type = type;
- if (ShowPline)
- {
- if (step == "1")
- {
- chkFlag1.Visible = false;
- }
- //if (step == "3" && validDataPurviewIds!=null)
- //{
- // comm.InitDropPlinePowerW(cmbPline, validDataPurviewIds, ob);
- //}
- //else
- //{
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.frmEntrust.doQueryPlineCode",
- new object[] { "" }, _ob);
- cmbPline.DataSource = dt;
- cmbPline.DisplayMember = "PLINE_NAME";
- cmbPline.ValueMember = "PLINE_CODE";
- //}
-
- }
- else
- {
- plPline.Visible = false;
- }
- }
- public string Note { get { return txtNote.Text; } }
- public string PlineCode { get { return cmbPline.SelectedIndex<0?"": cmbPline.Value.ToString(); } }
- public string transCode { get { return cmbTrans.SelectedIndex < 0 ? "" : cmbTrans.Value.ToString(); } }
- private void ultraButton1_Click(object sender, EventArgs e)
- {
- if (plPline.Visible && cmbPline.SelectedIndex < 0)
- {
- MessageBox.Show("请选择需要委托的产线");
- return;
- }
- /* if (plPline.Visible && cmbTrans.SelectedIndex < 0)
- {
- MessageBox.Show("请选择用车方式");
- return;
- }*/
- if (Type == 0)
- {
- var ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.mcp.common.frmEntrust";
- ccp.MethodName = "ApprovalOk";
- ccp.ServerParams = new object[]
- {
- SubNo, step,PlineCode, Note, _name,chkFlag1.Checked,chkFlag2.Checked,transCode
- };
- ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("审核通过成功!"))
- this.DialogResult = DialogResult.OK;
- }
- }
- if (Type == 1)
- {
- var ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.mcp.common.frmEntrust";
- ccp.MethodName = "ApprovalFail";
- ccp.ServerParams = new object[]
- {
- SubNo, step, Note, _name
- };
- ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("审核不通过成功!"))
- this.DialogResult = DialogResult.OK;
- }
- }
- if (Type == 2)
- {
- var ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.mcp.common.frmEntrust";
- ccp.MethodName = "CancelApproval";
- ccp.ServerParams = new object[]
- {
- SubNo, step, Note, _name
- };
- ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销审核成功!"))
- this.DialogResult = DialogResult.OK;
- }
- }
- if (Type == 3)
- {
- var ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.mcp.common.frmEntrust";
- ccp.MethodName = "MarkCompleted";
- ccp.ServerParams = new object[]
- {
- SubNo, step, Note, _name
- };
- ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("委托完成!"))
- this.DialogResult = DialogResult.OK;
- }
- }
- if (Type == 4)
- {
- var ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.mcp.common.frmEntrust";
- ccp.MethodName = "CancleMarkCompleted";
- ccp.ServerParams = new object[]
- {
- SubNo, step, Note, _name
- };
- ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销委托完成!"))
- this.DialogResult = DialogResult.OK;
- }
- }
-
- }
- }
- }
|