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; namespace Core.LZMes.Client.UIK { public partial class UIK010060 : FrmBase { public UIK010060() { InitializeComponent(); } private void UIK010060_Load(object sender, EventArgs e) { this.ultraCalendarENDTIME.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query"://查询 this.DoQuery(); break; } } private void ultraCheckEditor1_CheckedChanged(object sender, EventArgs e) { if (this.ultraCheckEditor1.Checked) { this.ultraCalendarENDTIME.Enabled = true; this.ultraCalendarSTRATTIME.Enabled = true; this.ultraCheckAll.Checked = false; } if (!this.ultraCheckEditor1.Checked) { this.ultraCalendarENDTIME.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; } } private void ultraCheckAll_CheckedChanged(object sender, EventArgs e) { try { if (this.ultraCheckAll.Checked) { this.ultraCheckEditor1.Checked = false; this.ultraCalendarSTRATTIME.Enabled = false; this.ultraCalendarENDTIME.Enabled = false; } } catch (Exception Ex) { MessageBox.Show(Ex.ToString()); } } private void DoQuery() { if (this.ultraCalendarENDTIME.Enabled == false && this.ultraCalendarSTRATTIME.Enabled == false) { this.ultraCalendarENDTIME.Text = ""; this.ultraCalendarSTRATTIME.Text = ""; } try { string starttiem = this.ultraCalendarSTRATTIME.Text.ToString(); string endtime = this.ultraCalendarENDTIME.Text.ToString(); bool flag = false; CoreClientParam ccp = new CoreClientParam(); //DataTable dt = new DataTable(); if (this.ultraCheckEditor1.Checked == false && this.ultraCheckAll.Checked == false) { MessageBox.Show("请选择查询条件!"); } else { if (this.ultraCheckAll.Checked) { this.dataSet1.Tables[0].Clear(); this.ultraCheckAll.Checked = false; ccp.ServerName = "UIK.UIK01.UIK010060"; ccp.MethodName = "DoQuery"; ccp.ServerParams = new object[] { starttiem, endtime, flag }; ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); DataRowCollection drc = this.dataSet1.Tables[0].Rows; if (drc.Count <= 0) { MessageBox.Show("暂无酸洗液记录!"); } this.ultraCalendarENDTIME.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; return; } if (this.ultraCheckEditor1.Checked) { flag = true; this.dataSet1.Tables[0].Clear(); ccp.ServerName = "UIK.UIK01.UIK010060"; ccp.MethodName = "DoQuery"; ccp.ServerParams = new object[] { starttiem, endtime, flag }; ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); DataRowCollection drc = this.dataSet1.Tables[0].Rows; if (drc.Count <= 0) { MessageBox.Show("暂无酸洗液记录!"); } this.ultraCheckAll.Checked = false; this.ultraCalendarENDTIME.Enabled = false; this.ultraCalendarSTRATTIME.Enabled = false; return; } } } catch (Exception Ex) { MessageBox.Show(Ex.ToString()); } } } }