| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- 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.UIM
- {
- public partial class UIM010270 : FrmBase
- {
- public UIM010270()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- case "Save":
- //this.DoSave();
- break;
- case "Exit":
- this.Close();
- break;
- }
- }
- private void DoQuery()
- {
- string dlivTp = "";
- if (ddlTransport.SelectedIndex > -1 && ddlTransport.Value != null)
- {
- dlivTp = ddlTransport.Value.ToString().Trim();
- }
- string ordNo = txtOrdNo.Text.ToString();
- string specStlGrd = txtSpecStlGrd.Text.ToString();
- int hasTot = 0;
- if (checkBox1.Checked == true)
- {
- hasTot = 1;
- }
- dataSet1.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "UIM.UIM010270";
- ccp.MethodName = "queryOrdResultForSale";
- ccp.ServerParams = new object[] { dlivTp,ordNo,specStlGrd,hasTot };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- double planWgtSum = 0;
- double actWgtSum = 0;
- DataRowCollection drs = dataSet1.Tables[0].Rows;
- for (int i = 0; i < drs.Count; i++)
- {
- planWgtSum += double.Parse(drs[i]["PLAN_WGT"].ToString());
- actWgtSum += double.Parse(drs[i]["ACT_WGT"].ToString());
- }
- this.dataSet2.Clear();
- maskedTextBox1.Text = planWgtSum.ToString();
- maskedTextBox2.Text = actWgtSum.ToString();
- }
- private void ultraGrid1_DoubleClickCell(object sender, Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs e)
- {
- Infragistics.Win.UltraWinGrid.UltraGrid uGrid = (Infragistics.Win.UltraWinGrid.UltraGrid)sender;
- string ordNo = uGrid.ActiveRow.Cells["ORD_NO"].Text.Trim();
- string ordSeq = uGrid.ActiveRow.Cells["ORD_SEQ"].Text.Trim();
- dataSet2.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "UIM.UIM010270";
- ccp.MethodName = "queryCoilResultByOrd";
- ccp.ServerParams = new object[] { ordNo, ordSeq };
- ccp.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- }
- }
|