| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- 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.UIM03
- {
- public partial class UIM030060 : FrmBase
- {
- public UIM030060()
- {
- 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 beginDate = this.ultraDateTimeEditor1.Value == null ? "00000000" : this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd");
- string endDate = this.ultraDateTimeEditor2.Value == null ? "00000000" : this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd");
- string coilNo = textBox9.Text.Trim(); ;
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "UIM.UIM02.UIM020010";
- ccp.MethodName = "queryStockHis";
- ccp.ServerParams = new object[] { beginDate,endDate,coilNo, CustomInfo };
- 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());
- }
- }
- private void UIM030060_Load(object sender, EventArgs e)
- {
- if (CustomInfo == "2")
- {
- ultraGrid1.DisplayLayout.Bands[0].Columns["PKG_QLT"].Hidden = false;
- }
- else
- {
- ultraGrid1.DisplayLayout.Bands[0].Columns["PKG_QLT"].Hidden = true;
- }
- }
- }
- }
|