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 { public partial class UIM030100 : FrmBase { public UIM030100() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": this.DoQuery(); break; case "Export": this.DoExport(); break; case "Exit": this.Close(); break; } } private void DoQuery() { try { this.dataSet1.Tables[0].Clear(); string queryDate = this.ultraDateTimeEditor1.Value == null ? "00000000" : this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd"); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIM.UIM02.UIM020010"; ccp.MethodName = "queryMaterialOfDay"; ccp.ServerParams = new object[] { queryDate }; ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp, 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; ultraGridExcelExporter1.Export(ultraGrid1, fileName); System.Diagnostics.Process.Start(fileName); } } catch (Exception EX) { MessageBox.Show(EX.ToString()); } } } }