| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- 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;
- namespace Core.LZMes.Client.UIJ
- {
- public partial class UIJ040010 : FrmBase
- {
- public UIJ040010()
- {
- InitializeComponent();
- }
- private void UIJ040010_Load(object sender, EventArgs e)
- {
- this.ultraComboEditor1.SelectedIndex = 0;
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- case "Add":
- //this.DoAdd();
- break;
- case "Update":
- //this.DoUpdate();
- break;
- case "Delete":
- //this.DoDelete();
- break;
- case "Save":
- break;
- case "Exit":
- this.Close();
- break;
- }
- }
- private void DoQuery()
- {
- try
- {
- string dlivDirDate = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd");
- string dlivTp = this.ultraComboEditor1.Value.ToString(); ;
- string ordNo = this.textBox1.Text.Trim();
- this.dataSet1.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "UIJ.UIJ04.UIJ040010";
- ccp.MethodName = "queryShippingPlan";
- ccp.ServerParams = new object[] { dlivDirDate, dlivTp, ordNo };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- int coilCount = 0;
- int wgtCount = 0;
- DataRowCollection drs = this.dataSet1.Tables[0].Rows;
- for (int i = 0; i < drs.Count; i++)
- {
- coilCount += int.Parse(drs[i]["CNT"].ToString().Trim());
- wgtCount += int.Parse(drs[i]["ACT_WGT"].ToString().Trim());
- }
- this.textBox2.Text = coilCount.ToString();
- this.textBox3.Text = (wgtCount / 1000).ToString();
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
- {
- Infragistics.Win.UltraWinGrid.UltraGrid uGrid = (Infragistics.Win.UltraWinGrid.UltraGrid)sender;
- string dlivDirNo = uGrid.ActiveRow.Cells["DLIV_DIRNO"].Text.Trim();
- this.dataSet2.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "UIJ.UIJ04.UIJ040010";
- ccp.MethodName = "queryShippingCoil";
- ccp.ServerParams = new object[] { dlivDirNo };
- ccp.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- }
- }
|