using Core.Mes.Client.Comm.Control; using Core.Mes.Client.Comm.Server; using CoreFS.CA06; using Infragistics.Win.UltraWinGrid; 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 FrmSteelGrade : FrmBase { private OpeBase ob; private string gradename = ""; private string outs_billet_fl = ""; /// /// 钢种 /// public string Gradename { get { return gradename; } set { gradename = value; } } private string gradecode = ""; public string Gradecode { get { return gradecode; } set { gradecode = value; } } private string cic = ""; /// /// 钢种索引码 /// public string Cic { get { return cic; } set { cic = value; } } public FrmSteelGrade(OpeBase _ob, string _outs_billet_fl) { ob = _ob; outs_billet_fl = _outs_billet_fl; InitializeComponent(); } private void FrmSteelGrade_Load(object sender, EventArgs e) { DataTable dt = ServerHelper.GetData("com.steering.pss.plnsaleord.GpOptimize.CorePlnZgMStoGp.getQueryGrade1", new object[] { outs_billet_fl }, ob); GridHelper.CopyDataToDatatable(dt, this.dataTable1, true); } private void ultraGridGrade_Click(object sender, EventArgs e) { ultraGridGrade.UpdateData(); UltraGridRow ugr = ultraGridGrade.ActiveRow; if (ugr == null) return; string[] groupgz = null; if (!ugr.Cells["GRADENAME"].Text.Equals("")) { groupgz = ugr.Cells["GRADENAME"].Text.ToString().Split(';'); } string[] groupgzc = null; if (!ugr.Cells["GRADECODE"].Text.Equals("")) { groupgzc = ugr.Cells["GRADECODE"].Text.ToString().Split(';'); } gradename = groupgz[0]; gradecode = groupgzc[0]; cic = ugr.Cells["STD_IDX"].Text.Trim(); this.DialogResult = DialogResult.OK; this.Close(); } private void ultraGridGrade_ClickCell(object sender, ClickCellEventArgs e) { ultraGridGrade.UpdateData(); UltraGridRow ugr = ultraGridGrade.ActiveRow; if (ugr == null) return; string[] groupgz = null; if (!ugr.Cells["GRADENAME"].Text.Equals("")) { groupgz = ugr.Cells["GRADENAME"].Text.ToString().Split(';'); } string[] groupgzc = null; if (!ugr.Cells["GRADECODE"].Text.Equals("")) { groupgzc = ugr.Cells["GRADECODE"].Text.ToString().Split(';'); } gradename = groupgz[0]; gradecode = groupgzc[0]; cic = ugr.Cells["STD_IDX"].Text.Trim(); this.DialogResult = DialogResult.OK; this.Close(); } } }