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.UIC { public partial class UIC030001 : FrmBase { public UIC030001() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": this.DoQuery(); break; case "Export": this.DoExport(); break; case "Export1": this.DoExport1(); break; case "Close": this.Close(); break; } } private void DoQuery() { try { //UIK.UIK020030 s = new UIK.UIK020030(); //s.DoQuery1(); //实绩刷新 //s.ob = this.ob; //s.DoQuery1(); CoreClientParam ccp = null; //查询 this.dataSet1.Clear(); ArrayList al = new ArrayList(); al.Add("UIC030001_01.SELECT"); al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd")+"000000"); al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd")+"999999"); al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000"); al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999"); al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000"); al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999"); al.Add(this.ultraDateTimeEditor2.DateTime.AddDays(1).ToString("yyyy/MM/dd")); al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyy/MM/dd")); al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000"); al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999"); ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBQuery"; ccp.MethodName = "doSimpleQuery"; ccp.ServerParams = new object[] { al }; ccp.IfShowErrMsg = false; ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); ArrayList a2 = new ArrayList(); a2.Add("UIC030001_02.SELECT"); a2.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000"); a2.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999"); a2.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000"); a2.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999"); a2.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000"); a2.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999"); a2.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000"); a2.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999"); ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBQuery"; ccp.MethodName = "doSimpleQuery"; ccp.ServerParams = new object[] { a2 }; ccp.IfShowErrMsg = false; ccp.SourceDataTable = this.dataSet1.Tables[1]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } private void DoExport() { try { if (this.ultraGrid1.Rows.Count == 0) { MessageBox.Show("没有可以导出的数据", "提示"); return; } 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 DoExport1() { try { if (this.ultraGrid2.Rows.Count == 0) { MessageBox.Show("没有可以导出的数据", "提示"); return; } if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK) { string fName = this.saveFileDialog1.FileName; this.ultraGridExcelExporter1.Export(this.ultraGrid2, fName); Process.Start(fName); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } private void button1_Click(object sender, EventArgs e) { try { CUIC030120 CWindow = new CUIC030120(); CWindow.ob = this.ob; if (CWindow.ShowDialog() == DialogResult.OK) { //null; } CWindow.Dispose(); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } } }