| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- 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 Infragistics.Win.UltraWinGrid;
- namespace Core.LZMes.Client.UIB
- {
- public partial class UIB010360 : FrmBase
- {
- public UIB010360()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- }
- }
- public void DoQuery()
- {
- try
- {
- CoreClientParam ccp = new CoreClientParam();
- this.dataSet1.Clear();
- ArrayList al = new ArrayList();
- if (this.comboBox1.Text.ToString() == "热轧")
- {
- al.Add("UIB010360_01_HOST.SELECT");
- }
- else if (this.comboBox1.Text.ToString() == "炼钢")
- {
- al.Add("UIB010360_01_LG.SELECT");
- }
- else if (this.comboBox1.Text.ToString() == "酸轧")
- {
- al.Add("UIB010360_01_SUAN.SELECT");
- }
- else if (this.comboBox1.Text.ToString() == "连退")
- {
- al.Add("UIB010360_01_LIAN.SELECT");
- }
- al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000");
- al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999");
- ccp.ServerName = "UIB.COM.ComDBQuery";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { al };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- catch (Exception ex)
- {
- }
- }
- private void UIB010360_Load(object sender, EventArgs e)
- {
- try
- {
- this.comboBox1.SelectedIndex = 0;
- }
- catch (Exception ex)
- {
- }
- }
- private void ultraGrid1_MouseDoubleClick(object sender, MouseEventArgs e)
- {
-
- }
- private void ultraGrid1_MouseDown(object sender, MouseEventArgs e)
- {
- try
- {
- if (this.ultraGrid1.ActiveCell.Column.Key != "DANG_WGT"
- && this.ultraGrid1.ActiveCell.Column.Key != "YUE_WGT")
- return;
- if (this.ultraGrid1.ActiveRow.Cells[this.ultraGrid1.ActiveCell.Column.Index].Text.ToString() == "0")
- return;
- CUIB010360 frm = new CUIB010360();
- frm.ob = this.ob;
- frm.pLine = this.comboBox1.Text.ToString();
- frm.ordUseTp = this.ultraGrid1.ActiveRow.Cells["ORD_USE_CD"].Text;
- System.DateTime dt = System.DateTime.Now;
- //string TimeNow = string.Format("{0:yyyyMMddHHmmssffff}", dt);
- string TimeNow = string.Format("{0:yyyyMM}", dt);
- if (this.ultraGrid1.ActiveCell.Column.Key == "DANG_WGT")//当期
- {
- frm.sTime = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000";
- frm.eTime = this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999";
- }
- else if (this.ultraGrid1.ActiveCell.Column.Key == "YUE_WGT")//月累
- {
- frm.sTime = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMM") + "00000000";
- frm.eTime = this.ultraDateTimeEditor2.DateTime.ToString("yyyyMM") + "31999999";
- }
- frm.ShowDialog();
- }
- catch (Exception ex)
- {
- }
- }
- }
- }
|