| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- 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;
- namespace Core.LZMes.Client.UIK
- {
- public partial class UIK050020 : FrmBase
- {
- public UIK050020()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- }
- }
- private void DoQuery()
- {
- try
- {
- string zgNum = "";
- string zgAr = "";
- string beginTime = "";
- string endTime = "";
- bool flag = false;
- CoreClientParam ccp = new CoreClientParam();
- CoreClientParam ccp2 = new CoreClientParam();
- //if (this.zgNumber.Text == "" && this.zgArea.Text == "" && this.ultraCheckEditor1.Checked == false)
- //{
- // MessageBox.Show("请选择查询条件!");
- //}
- //else
- //{
- if (this.ultraCheckEditor1.Checked)
- {
- this.dataSet1.Tables[0].Clear();
- this.dataSet2.Tables[0].Clear();
- this.zgArea.Clear();
- this.zgNumber.Clear();
- this.ultraCheckEditor1.Checked = false;
- ccp.ServerName = "UIK.UIK05.UIK050020";
- ccp.MethodName = "DoQueryShang";
- ccp.ServerParams = new object[] { zgNum, zgAr, flag ,beginTime,endTime};
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- DataRowCollection drc1 = this.dataSet1.Tables[0].Rows;
- ccp2.ServerName = "UIK.UIK05.UIK050020";
- ccp2.MethodName = "DoQueryXia";
- ccp2.ServerParams = new object[] { zgNum, zgAr, flag, beginTime, endTime };
- ccp2.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp2, CoreInvokeType.Internal);
- DataRowCollection drc2 = this.dataSet2.Tables[0].Rows;
- if (drc1.Count <= 0)
- {
- MessageBox.Show("暂无记录!");
- }
- return;
- }
- else
- {
- flag = true;
- if (this.zgArea.Text == "" || this.zgNumber.Text == "")
- {
- if (this.zgNumber.Text == "")
- {
- this.dataSet1.Tables[0].Clear();
- this.dataSet2.Tables[0].Clear();
- zgAr = this.zgArea.Text;
- beginTime = ultraDateTimeEditor1.Value != null ? ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd000000") : "";
- endTime = ultraDateTimeEditor2.Value != null ? ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd999999") : "";
- this.zgArea.Clear();
- this.zgNumber.Clear();
- this.ultraCheckEditor1.Checked = false;
- ccp.ServerName = "UIK.UIK05.UIK050020";
- ccp.MethodName = "DoQueryShang";
- ccp.ServerParams = new object[] { zgNum, zgAr, flag, beginTime, endTime };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- DataRowCollection drc1 = this.dataSet1.Tables[0].Rows;
- ccp2.ServerName = "UIK.UIK05.UIK050020";
- ccp2.MethodName = "DoQueryXia";
- ccp2.ServerParams = new object[] { zgNum, zgAr, flag, beginTime, endTime };
- ccp2.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp2, CoreInvokeType.Internal);
- DataRowCollection drc2 = this.dataSet2.Tables[0].Rows;
- if (drc1.Count <= 0)
- {
- MessageBox.Show("该区域的记录不存在!");
- }
- return;
-
- }
- if (this.zgArea.Text == "")
- {
- this.dataSet1.Tables[0].Clear();
- this.dataSet2.Tables[0].Clear();
- zgNum = this.zgNumber.Text;
- beginTime = ultraDateTimeEditor1.Value != null ? ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd000000") : "";
- endTime = ultraDateTimeEditor2.Value != null ? ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd999999") : "";
- this.zgArea.Clear();
- this.zgNumber.Clear();
- this.ultraCheckEditor1.Checked = false;
- ccp.ServerName = "UIK.UIK05.UIK050020";
- ccp.MethodName = "DoQueryShang";
- ccp.ServerParams = new object[] { zgNum, zgAr, flag, beginTime, endTime };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- DataRowCollection drc1 = this.dataSet1.Tables[0].Rows;
- ccp2.ServerName = "UIK.UIK05.UIK050020";
- ccp2.MethodName = "DoQueryXia";
- ccp2.ServerParams = new object[] { zgNum, zgAr, flag, beginTime, endTime };
- ccp2.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp2, CoreInvokeType.Internal);
- DataRowCollection drc2 = this.dataSet2.Tables[0].Rows;
- if (drc1.Count <= 0)
- {
- MessageBox.Show("该轧辊顺序号记录不存在,请查证后查询!");
- }
- return;
- }
- }
- if (this.zgArea.Text == "" && this.zgNumber.Text == "")
- {
- beginTime = ultraDateTimeEditor1.Value != null ? ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd000000") : "";
- endTime = ultraDateTimeEditor2.Value != null ? ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd999999") : "";
- this.zgArea.Clear();
- this.zgNumber.Clear();
- this.ultraCheckEditor1.Checked = false;
- ccp.ServerName = "UIK.UIK05.UIK050020";
- ccp.MethodName = "DoQueryShang";
- ccp.ServerParams = new object[] { zgNum, zgAr, flag, beginTime, endTime };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- DataRowCollection drc1 = this.dataSet1.Tables[0].Rows;
- ccp2.ServerName = "UIK.UIK05.UIK050020";
- ccp2.MethodName = "DoQueryXia";
- ccp2.ServerParams = new object[] { zgNum, zgAr, flag, beginTime, endTime };
- ccp2.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp2, CoreInvokeType.Internal);
- DataRowCollection drc2 = this.dataSet1.Tables[0].Rows;
- if (drc1.Count <= 0)
- {
- MessageBox.Show("记录不存在,请查证后查询!");
- }
- return;
- }
- else
- {
- this.dataSet1.Tables[0].Clear();
- this.dataSet2.Tables[0].Clear();
-
- zgNum = this.zgNumber.Text;
- zgAr = this.zgArea.Text;
- beginTime = ultraDateTimeEditor1.Value != null ? ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd000000") : "";
- endTime = ultraDateTimeEditor2.Value != null ? ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd999999") : "";
- this.zgArea.Clear();
- this.zgNumber.Clear();
- this.ultraCheckEditor1.Checked = false;
- ccp.ServerName = "UIK.UIK05.UIK050020";
- ccp.MethodName = "DoQueryShang";
- ccp.ServerParams = new object[] { zgNum, zgAr, flag, beginTime, endTime };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- DataRowCollection drc1 = this.dataSet1.Tables[0].Rows;
- ccp2.ServerName = "UIK.UIK05.UIK050020";
- ccp2.MethodName = "DoQueryXia";
- ccp2.ServerParams = new object[] { zgNum, zgAr, flag, beginTime, endTime };
- ccp2.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp2, CoreInvokeType.Internal);
- DataRowCollection drc2 = this.dataSet2.Tables[0].Rows;
- if (drc1.Count <= 0)
- {
- MessageBox.Show("记录不存在,请查证后查询!");
- }
- return;
-
- }
- }
- }
- // }
- catch(Exception Ex)
- {
- MessageBox.Show(Ex.ToString());
- }
- }
-
- //if (this.ultraCheckEditor1.Checked)
- //{
- // ccp.ServerName = "UIK.UIK05.UIK050020";
- // ccp.MethodName = "DoQueryShang";
- // ccp.ServerParams = new object[] { zgNum, zgAr, flag };
- // ccp.SourceDataTable = dt;
- // this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- // this.ultraGrid1.DataSource = dt;
- //}
- //else
- //{
- // flag = "1";
- // if()
- //}
-
- //
- // string zgNum = this.zgNumber.Text;
- // string zgAr = this.zgArea.Text;
- // DataTable dt = new DataTable();
- // DataTable dt2 = new DataTable();
- // CoreClientParam ccp = new CoreClientParam();
- // ccp.ServerName = "UIK.UIK05.UIK050020";
- // ccp.MethodName = "DoQueryShang";
- // ccp.ServerParams = new object[] { zgNum, zgAr, startTime ,endTime};
- // ccp.SourceDataTable = dt;
- // this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- // this.ultraGrid1.DataSource = dt;
-
- //
-
-
- private void UIK050020_Load(object sender, EventArgs e)
- {
-
- }
-
- private void ultraCheckEditor1_CheckedChanged(object sender, EventArgs e)
- {
- try
- {
- if (this.ultraCheckEditor1.Checked)
- {
- this.zgNumber.Enabled = false;
- this.zgArea.Enabled = false;
- }
- if (!this.ultraCheckEditor1.Checked)
- {
- this.zgNumber.Enabled = true;
- this.zgArea.Enabled = true;
- }
- }
- catch (Exception Ex)
- {
- MessageBox.Show(Ex.ToString());
- }
- }
- //private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
- //{
-
- // Infragistics.Win.UltraWinGrid.UltraGridRow row = this.ultraGrid2.ActiveRow;
- // if (this.ultraGrid1.ActiveRow.Cells["SPEC_NO"].Text == row.Cells["SPEC_NO"].Text)
- // {
- // ////int i = this.ultraGrid1.ActiveRow.Index;
- // //row.Cells["SPEC_NO"].Text
- // //this.ultraGrid2.cell2
-
-
- // }
- //}
-
-
-
-
-
- }
- }
|