| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- 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 FrmPleDayCar : FrmBase
- {
- private string station = "";
- private string receivNo = "";
- private string spLine = "";
- public FrmPleDayCar(string Station, string receiv, string spclin, OpeBase ob)
- {
- station = Station;
- receivNo = receiv;
- spLine = spclin;
- this.ob = ob;
- InitializeComponent();
- }
- /// <summary>
- /// 处理ultraToolbarsManager1的点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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;
- }
- }
- /// <summary>
- /// 月请车批车
- /// </summary>
- private string velMonth = "";
- public string VelMonth
- {
- get { return velMonth; }
- set { velMonth = value; }
- }
- /// <summary>
- /// 车皮运号
- /// </summary>
- private string wagons = "";
- public string Wagons
- {
- get { return wagons; }
- set { wagons = value; }
- }
- /// <summary>
- /// 月请车批车号
- /// </summary>
- private string askMonth = "";
- public string AskMonth
- {
- get { return askMonth; }
- set { askMonth = value; }
- }
- /// <summary>
- /// 批复数
- /// </summary>
- private string bathMonth = "";
- public string BathMonth
- {
- get { return bathMonth; }
- set { bathMonth = value; }
- }
- /// <summary>
- /// 是否补充
- /// </summary>
- private string wagflag = "";
- public string Wagflag
- {
- get { return wagflag; }
- set { wagflag = value; }
- }
- /// <summary>
- /// 月使用数
- /// </summary>
- private string actMonthNum = "";
- public string ActMonthNum
- {
- get { return actMonthNum; }
- set { actMonthNum = value; }
- }
- private string askDayNoPk;
- public string AskDayNoPk
- {
- get { return askDayNoPk; }
- set { askDayNoPk = value; }
- }
- /// <summary>
- /// 查询
- /// </summary>
- private void doQuery()
- {
- ArrayList list = new ArrayList();
- string spclNo = "N";
- if (!spLine.Equals(""))
- {
- spclNo = spLine;
- }
- list.Add(station);
- list.Add(spclNo);
- list.Add(receivNo);
- //list.Add("");
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipeleavefactory.FrmShipmentDayApp.doQueryAskMonth", new object[] { list }, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);
- }
- /// <summary>
- /// 确认
- /// </summary>
- private void doSave()
- {
- ultraGrid1.UpdateData();
- UltraGridRow ugr = ultraGrid1.ActiveRow;
- if (ugr == null) return;
- if (Convert.ToBoolean(ugr.Cells["WAGONS_FLAG"].Text)== true)
- {
- wagflag = "补充请车";
- }
- else
- {
- wagflag = "正常请车";
- }
- velMonth = ugr.Cells["VEHICLE_MONTH_NUM"].Text.Trim();
- wagons = ugr.Cells["WAGONS_PLAN_NO"].Text.Trim();
- askMonth = ugr.Cells["ASK_MONTH_NO"].Text.Trim();
- bathMonth = ugr.Cells["BATCH_MONTH_NUM"].Text.Trim();
- actMonthNum = ugr.Cells["ACT_MONTH_NUM"].Text.Trim();
- askDayNoPk = ugr.Cells["ASK_MONTH_PK"].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();
- }
- }
- }
|