| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- using Core.Mes.Client.Comm.Tool;
- using CoreFS.CA06;
- using System;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.Qcm
- {
- public delegate void MscCastRForgSucessHandler(object sender, MscCastRForgArgs e);
- public partial class PopupMscCastRForg : FrmBase
- {
- public event MscCastRForgSucessHandler MscCastRForgSucessEvent;
- private FrmMscCastRForg _frm;
- private string _process = "";
- private string _dimater = "";
- private string _height = "";
- private string _specCode = "";
- private string closeAction = "";
- public PopupMscCastRForg(string[] args, string exceptionMsg, OpeBase ob)
- {
- InitializeComponent();
- ExceptionHelper.RegistException();
- string str = args[0];
- string[] strs = str.Split(',');
- _process = strs[0].Trim();
- _dimater = strs[1].Trim();
- _height = strs[2].Trim();
- _specCode = strs[3].Trim();
- this.ob = ob;
- ultraStatusBar1.Panels["ExMsg"].Text = exceptionMsg;
- _frm = new FrmMscCastRForg();
- _frm.PopupLoad("", ob);
- this.panel5.Controls.Add(_frm.SplitContainer1);
- SetDefaltCondition();
- _frm.ToolBar_Click(null, "Query");
- }
- private void SetDefaltCondition()
- {
- _frm.SpecCode = _specCode;
- }
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "查询":
- _frm.ToolBar_Click(null, "Query");
- break;
- case "保存":
- _frm.ToolBar_Click(null, "Save");
- break;
- case "关闭":
- this.Close();
- break;
- }
- }
- private void btnClose_Click(object sender, EventArgs e)
- {
- closeAction = "Ok";
- if (MscCastRForgSucessEvent != null)
- {
- if (_frm.UltraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("请维护一条生产产线适用规格!");
- return;
- }
- MscCastRForgArgs e2 = new MscCastRForgArgs();
- e2.Result = "1";
- MscCastRForgSucessEvent(this, e2);
- }
- this.DialogResult = DialogResult.OK;
- }
- private void PopupMscCastRForg_FormClosing(object sender, FormClosingEventArgs e)
- {
- if (MscCastRForgSucessEvent != null && closeAction == "")
- {
- MscCastRForgArgs e2 = new MscCastRForgArgs();
- e2.Result = "0";
- MscCastRForgSucessEvent(this, e2);
- }
- }
- private void btnCancel_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- }
- public class MscCastRForgArgs : EventArgs
- {
- private string _result = "";
- public string Result
- {
- get { return _result; }
- set { _result = value; }
- }
- }
- }
|