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; using System.Diagnostics; namespace Core.LZMes.Client.UIK { public partial class UIK050104 : FrmBase { public UIK050104() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query"://查询 this.DoQuery(); break; case "Export"://添加换下轧辊实绩 this.DoExport(); break; //case "Update"://下发换下轧辊实绩 // this.DoUpdate(); // break; } } private void DoQuery() { try { string zgNum = ""; string beginTime = ""; string endTime = ""; string type = ""; CoreClientParam ccp = new CoreClientParam(); DataTable dt = new DataTable(); zgNum = this.ultraTextzgNum.Text; type = this.ultraComboEditor1.Text; beginTime = ultraDateTimeEditor1.Value != null ? ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") : ""; endTime = ultraDateTimeEditor2.Value != null ? ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") : ""; Hashtable ht = new Hashtable(); ht.Add("i1", beginTime); ht.Add("i2", endTime); ht.Add("o3", ""); ccp.ServerName = "UIB.COM.ComDBProcedure"; ccp.MethodName = "doXmlProcedure"; ccp.ServerParams = new object[] { "UIK050103_01.CALL", ht }; this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); this.dataSet1.Clear(); ArrayList al = new ArrayList(); al.Add("UIK050103_02.SELECT"); al.Add(zgNum); al.Add(type); al.Add(beginTime); al.Add(endTime); CoreClientParam ccp2 = new CoreClientParam(); ccp2.ServerName = "UIB.COM.ComDBQuery"; ccp2.MethodName = "doSimpleQuery"; ccp2.ServerParams = new object[] { al }; ccp2.IfShowErrMsg = false; ccp2.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp2, CoreInvokeType.Internal); this.dataSet2.Clear(); ArrayList ar = new ArrayList(); ar.Add("UIK050103_03.SELECT"); CoreClientParam ccp3 = new CoreClientParam(); ccp3.ServerName = "UIB.COM.ComDBQuery"; ccp3.MethodName = "doSimpleQuery"; ccp3.ServerParams = new object[] { ar }; ccp3.IfShowErrMsg = false; ccp3.SourceDataTable = this.dataSet2.Tables[0]; this.ExecuteQueryToDataTable(ccp3, CoreInvokeType.Internal); } catch (Exception Ex) { MessageBox.Show(Ex.ToString()); } } private void DoExport() { try { if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK) { string fileName = this.saveFileDialog1.FileName; this.ultraGridExcelExporter1.Export(ultraGrid1, fileName); System.Diagnostics.Process.Start(fileName); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } private void UIK050104_Load(object sender, EventArgs e) { } } }