| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- 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 UIC020220 : FrmBase
- {
- public UIC020220()
- {
- 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 = new CoreClientParam();
- //查询
- this.dataSet1.Clear();
- ArrayList al = new ArrayList();
- string s1 = this.ultraComboEditor1.Text;
- if (s1 == "热轧")
- {
- al.Add("UIC020220_01.SELECT");
- }
- else if (s1 == "连退")
- {
- al.Add("UIC020220_02.SELECT");
- }
- else
- {
- al.Add("UIC020220_03.SELECT");
- }
- //al.Add(this.ultraComboEditor1.Text);
- 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 UIC020220_Load(object sender, EventArgs e)
- {
- this.ultraComboEditor1.SelectedIndex = 0;
- }
- private void ultraGrid1_DoubleClick(object sender, EventArgs e)
- {
- try
- {
-
-
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
-
-
- }
- }
|