| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- 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 UIC020170 : FrmBase
- {
- public UIC020170()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "query":
- this.DoQuery();
- break;
- case "Export":
- this.DoExport();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- private void DoQuery()
- {
- try
- {
- CoreClientParam ccp = null;
- //查询
- this.dataSet1.Clear();
- ArrayList al = new ArrayList();
- al.Add("UIC010001_24.SELECT");
- al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd"));
- al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd"));
- 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);
- }
- 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 UIC010001_Load(object sender, EventArgs e)
- {
- this.ultraComboEditor1.SelectedIndex = 0;
- }
-
- //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());
- // }
- //}
-
- }
- }
|