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 System.Diagnostics; namespace Core.LZMes.Client.UIB { public partial class UIB030180 : FrmBase { public UIB030180() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": this.DoQuery(); break; case "DoExport": this.DoExport(); break; } } public void DoQuery() { try { ArrayList al = new ArrayList(); if (this.comboBox1.SelectedIndex == 0) { al.Add("UIB030180_01.SELECT"); } else if (this.comboBox1.SelectedIndex == 1) { al.Add("UIB030180_02.SELECT"); } else { al.Add("UIB030180_03.SELECT"); } al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000"); al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999"); this.dataSet1.Tables[0].Clear(); CoreClientParam ccp = new CoreClientParam(); 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) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } public void DoExport() { try { if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK) { string fName = this.saveFileDialog1.FileName; this.ultraGridExcelExporter1.Export(this.ultraGrid1, fName); Process.Start(fName); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } private void UIB030180_Load(object sender, EventArgs e) { this.comboBox1.SelectedIndex = 0; } } }