| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- 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
- {
- /// <summary>
- /// 轧后库可发量查询
- /// </summary>
- public partial class UIM010280 : FrmBase
- {
- public UIM010280()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- case "Save":
- //this.DoSave();
- break;
- }
- }
- private void DoQuery()
- {
- string dlivTp = "";
- if (-1 < ultraComboEditor1.SelectedIndex)
- {
- dlivTp = ultraComboEditor1.Value.ToString().Trim();
- }
- string ordNo = textBox1.Text.ToString();
- string specStlGrd = textBox2.Text.ToString();
- int hasTot = 0;
- if (checkBox1.Checked)
- {
- hasTot = 1;
- }
- dataSet1.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "UIM.UIM010280";
- 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());
- }
- maskedTextBox1.Text = planWgtSum.ToString();
- maskedTextBox2.Text = actWgtSum.ToString();
- }
- private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs 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();
- int hasTot = 0;
- if (checkBox1.Checked)
- {
- hasTot = 1;
- }
- dataSet2.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "UIM.UIM010280";
- ccp.MethodName = "queryCoilResultByOrd";
- ccp.ServerParams = new object[] { ordNo, ordSeq, hasTot };
- ccp.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- }
- }
|