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 System.Collections; using Core.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Control; using Infragistics.Win.UltraWinGrid; namespace Core.StlMes.Client.PipeLeaveFactory { public partial class FrmAskDayPlan : FrmBase { private string billNO = ""; private string stationNo = ""; private string spLine = ""; private string reveNo = ""; public FrmAskDayPlan(string BillNo,string Station,string spcl,string Reveion, OpeBase ob) { billNO = BillNo; stationNo = Station; spLine = spcl; reveNo = Reveion; this.ob = ob; InitializeComponent(); } /// /// 处理ultraToolbarsManager1的点击事件 /// /// /// private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e) { switch (e.Tool.Key) { case "Query": doQuery(); break; case "Save": doSave(); this.Close(); break; case "Close": this.Close(); break; default: break; } } /// /// 日请车批车号 /// private string askDay = ""; public string AskDay { get { return askDay; } set { askDay = value; } } /// /// 日批复数 /// public string batchDay = ""; public string BatchDay { get { return batchDay; } set { batchDay = value; } } /// /// 日申请数 /// private string velDay = ""; public string VelDay { get { return velDay; } set { velDay = value; } } private string appFalg = ""; public string AppFalg { get { return appFalg; } set { appFalg = value; } } private string askMonth = ""; public string AskMonth { get { return askMonth; } set { askMonth = value; } } private string sendPlan = ""; public string SendPlan { get { return sendPlan; } set { sendPlan = value; } } private string wagPlan = ""; public string WagPlan { get { return wagPlan; } set { wagPlan = value; } } /// /// 查询 /// private void doQuery() { ArrayList list = new ArrayList(); if (spLine.Equals("")) { spLine = "N"; } list.Add(billNO); list.Add(stationNo); list.Add(spLine); list.Add(reveNo); DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.FrmTallYsheet.doQueryAskDay", new object[] { list }, this.ob); GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true); } /// /// 确认 /// private void doSave() { ultraGrid1.UpdateData(); UltraGridRow ugr = ultraGrid1.ActiveRow; if (ugr == null) return; askDay = ugr.Cells["ASK_DAY_NO"].Text.Trim(); batchDay = ugr.Cells["BATCH_DAY_NUM"].Text.Trim(); velDay = ugr.Cells["VEHICLE_DAY_NUM"].Text.Trim(); appFalg = ugr.Cells["APP_FLAG"].Text.Trim(); askMonth = ugr.Cells["ASK_MONTH_NO"].Text.Trim(); sendPlan = ugr.Cells["ASK_DAY_PK"].Text.Trim(); wagPlan = ugr.Cells["WAGONS_PLAN_NO"].Text.Trim(); this.DialogResult = DialogResult.OK; this.Close(); } private void FrmPleDayCar_Load(object sender, EventArgs e) { doQuery(); } private void ultraGrid1_DoubleClickCell(object sender, DoubleClickCellEventArgs e) { doSave(); } } }