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 CoreFS.CA06; using Core.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Control; using Infragistics.Win.UltraWinGrid; using System.Net; using System.Collections; using CoreFS.SA06; namespace Core.StlMes.Client.BuyBillet { public partial class FrmBuyYP : FrmBase { private new CoreFS.CA06.OpeBase ob = new OpeBase(); private string id = string.Empty; public event Action OnAddNewYpFinished; public FrmBuyYP(OpeBase ops) { this.ob = ops; InitializeComponent(); } private void btn_close_Click(object sender, EventArgs e) { this.Close(); } private void FrmBuyYP_Load(object sender, EventArgs e) { Bind_PiKind(); } private void btn_save_Click(object sender, EventArgs e) { string pkind = this.cb_pkind.Value.ToString(); string gz = txt_steelgrade.Text.Trim(); string cic = txt_cic.Text.Trim(); string dm = txt_dm.Value.ToString(); string dbpc =txt_dbpc.Value.ToString(); string weight = txt_weight.Value.ToString(); ServerHelper.SetData("com.steering.pss.buybillet.Buybillet.InsertBUY_GP_REQ_YP", new object[] { pkind,gz,cic,dm,dbpc,weight }, this.ob); if (OnAddNewYpFinished != null) { OnAddNewYpFinished(); } this.Close(); } private void Bind_PiKind() { DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.queryGP_PIKIND", new object[] { }, this.ob); this.cb_pkind.DataSource = dt; this.cb_pkind.DisplayMember = "NAME"; this.cb_pkind.ValueMember = "CODE"; } private void txt_cb_gz_Click(object sender, EventArgs e) { FrmYpGradeCIC frm = new FrmYpGradeCIC(this.ob); frm.onSelection += new Action(frm_onSelection); frm.ShowDialog(); } private void frm_onSelection(string cic, string steelgrades) { txt_cic.Text = cic; txt_steelgrade.Text = steelgrades; } } }