| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- using Core.Mes.Client.Comm.Tool;
- using CoreFS.CA06;
- using System;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.Qcm
- {
- public delegate void UpsettingDialExpansionHandler(object sender, UpsettionDialExpansionArgs e);
- public partial class PopupUpsettingDialExpansion : FrmBase
- {
- public event UpsettingDialExpansionHandler UpsettingDialExpansionEvent;
- private string _gradeCode = "";
- private string _maxD = "";
- private string _maxH = "";
- private string _mscPline = "";
- private string _processCodeC = "";
- private string _ordLnPk = "";
- private string _designKey = "";
- private FrmUpsettingDialExpansion _frm;
- private string closeAction = "";
- /// <summary>
- /// 弹窗构造函数
- /// </summary>
- /// <param name="args">输入参数</param>
- public PopupUpsettingDialExpansion(string[] args, string exceptionMsg, OpeBase ob)
- {
- InitializeComponent();
- ExceptionHelper.RegistException();
- this.ob = ob;
- //_gradeCode = args[0];
- _maxD = args[1];
- _maxH = args[2];
- _ordLnPk = args[3];
- _designKey = args[4];
- string[] designObjKey = args[5].Split(',');
- if (designObjKey.Length > 1)
- {
- _mscPline = designObjKey[0];
- _processCodeC = designObjKey[1];
- }
- ultraStatusBar1.Panels["ExMsg"].Text = exceptionMsg;
- _frm = new FrmUpsettingDialExpansion();
- _frm.PopupLoad("", ob);
- this.panel5.Controls.Add(_frm.FrmBase_Fill_Panel1);
- SetDefaultCondition();
- _frm.ToolBar_Click(null, "doQuery");
- }
- private void btnClose_Click(object sender, EventArgs e)
- {
- closeAction = "Ok";
- if (UpsettingDialExpansionEvent != null)
- {
- if (_frm.UltraGrid2.ActiveRow == null)
- {
- MessageUtil.ShowWarning("请维护一条墩拔扩与轧管的对应关系!");
- return;
- }
- UpsettionDialExpansionArgs e2 = new UpsettionDialExpansionArgs();
- e2.MinD = _frm.UltraGrid2.GetActiveRowValue("MIN_D");
- e2.MinH = _frm.UltraGrid2.GetActiveRowValue("MIN_H");
- e2.Result = "1";
- UpsettingDialExpansionEvent(this, e2);
- }
- this.DialogResult = DialogResult.OK;
- }
- private void SetDefaultCondition()
- {
- _frm.GradeCode = _gradeCode;
- _frm.Dimater = _maxD;
- _frm.Height1 = _maxH;
- _frm.TxtMax_d.Value = double.Parse(_maxD);
- _frm.TxtMax_h.Value = double.Parse(_maxH);
- _frm.TxtMax_d.ReadOnly = true;
- _frm.TxtMax_h.ReadOnly = true;
- }
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "查询":
- _frm.ToolBar_Click(null, "doQuery");
- break;
- case "新增":
- _frm.ToolBar_Click(null, "doAdd");
- break;
- case "修改":
- _frm.ToolBar_Click(null, "doModify");
- break;
- case "作废":
- _frm.ToolBar_Click(null, "doDelete");
- break;
- case "恢复":
- _frm.ToolBar_Click(null, "doResume");
- break;
- case "刷新":
- _frm.ToolBar_Click(null, "Refresh");
- break;
- case "设定轧管规格":
- ZgSpecSet();
- break;
- case "关闭":
- this.Close();
- break;
- }
- }
- private void ZgSpecSet()
- {
- ZgSpecConfirmPopup popup = new ZgSpecConfirmPopup(_maxD, _maxH, _processCodeC, _designKey, _ordLnPk, _mscPline, ob);
- if (popup.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- }
- }
- private void PopupUpsettingDialExpansion_FormClosing(object sender, FormClosingEventArgs e)
- {
- if (UpsettingDialExpansionEvent != null && closeAction == "")
- {
- UpsettionDialExpansionArgs e2 = new UpsettionDialExpansionArgs();
- e2.Result = "0";
- UpsettingDialExpansionEvent(this, e2);
- }
- }
- private void btnCancel_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void PopupUpsettingDialExpansion_Load(object sender, EventArgs e)
- {
- }
- }
- public class UpsettionDialExpansionArgs : EventArgs
- {
- private string _result = "";
- public string Result
- {
- get { return _result; }
- set { _result = value; }
- }
- private string _minD = "";
- public string MinD
- {
- get { return _minD; }
- set { _minD = value; }
- }
- private string _minH = "";
- public string MinH
- {
- get { return _minH; }
- set { _minH = value; }
- }
- }
- }
|