| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- 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 UIK030030 : FrmBase
- {
- public UIK030030()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- }
- }
- private void DoQuery()
- {
- if (this.ultraCalendarENDTIME.Enabled == false && this.ultraCalendarSTRATTIME.Enabled == false)
- {
- this.ultraCalendarENDTIME.Text = "";
- this.ultraCalendarSTRATTIME.Text = "";
- }
- try
- {
- string mc_id = this.ultraTextMC_ID.Text.ToString();
- string starttiem = this.ultraCalendarSTRATTIME.Text.ToString();
- string endtime = this.ultraCalendarENDTIME.Text.ToString();
- bool flag = false;
- CoreClientParam ccp = new CoreClientParam();
- DataTable dt = new DataTable();
- if (mc_id == "" && starttiem == "" && endtime == "" && this.ultraCheckAll.Checked == false)
- {
- MessageBox.Show("请选择查询条件!");
- }
- else
- {
- if (this.ultraCheckAll.Checked)
- {
- this.ultraCheckAll.Checked = false;
- ccp.ServerName = "UIK.UIK03.UIK030030";
- ccp.MethodName = "DoQuery";
- ccp.ServerParams = new object[] { mc_id, starttiem, endtime, flag };
- ccp.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- this.ultraGrid1.DataSource = dt;
- if (dt.Rows.Count <= 0)
- {
- MessageBox.Show("暂无记录!");
- }
- this.ultraCalendarENDTIME.Enabled = false;
- this.ultraCalendarSTRATTIME.Enabled = false;
- return;
- }
- else
- {
- flag = true;
- if (this.ultraTextMC_ID.Text != "" || this.ultraCheckEditor1.Checked == true)
- {
- if (this.ultraTextMC_ID.Text == "")
- {
- this.ultraTextMC_ID.Clear();
- this.ultraCheckEditor1.Checked = false;
- this.ultraCheckAll.Checked = false;
- ccp.ServerName = "UIK.UIK03.UIK030030";
- ccp.MethodName = "DoQuery";
- ccp.ServerParams = new object[] { mc_id, starttiem, endtime, flag };
- ccp.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- this.ultraGrid1.DataSource = dt;
- if (dt.Rows.Count <= 0)
- {
- MessageBox.Show("该时间内没有在线设备信息!");
- }
- this.ultraCalendarENDTIME.Enabled = false;
- this.ultraCalendarSTRATTIME.Enabled = false;
- return;
- }
- if (this.ultraCheckEditor1.Checked == false)
- {
- this.ultraTextMC_ID.Clear();
- this.ultraCheckAll.Checked = false;
- ccp.ServerName = "UIK.UIK03.UIK030030";
- ccp.MethodName = "DoQuery";
- ccp.ServerParams = new object[] { mc_id, starttiem, endtime, flag };
- ccp.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- this.ultraGrid1.DataSource = dt;
- if (dt.Rows.Count <= 0)
- {
- MessageBox.Show("该设备编号不存在!");
- }
- this.ultraCalendarENDTIME.Enabled = false;
- this.ultraCalendarSTRATTIME.Enabled = false;
- return;
- }
- if (this.ultraTextMC_ID.Text != "" && this.ultraCheckEditor1.Checked == true)
- {
- this.ultraTextMC_ID.Clear();
- this.ultraCheckEditor1.Checked = false;
- this.ultraCheckAll.Checked = false;
- ccp.ServerName = "UIK.UIK03.UIK030030";
- ccp.MethodName = "DoQuery";
- ccp.ServerParams = new object[] { mc_id, starttiem, endtime, flag };
- ccp.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- this.ultraGrid1.DataSource = dt;
- if (dt.Rows.Count <= 0)
- {
- MessageBox.Show("记录不存在,请查证后查询!");
- }
- this.ultraCalendarENDTIME.Enabled = false;
- this.ultraCalendarSTRATTIME.Enabled = false;
- return;
- }
-
-
- }
-
- }
- }
- }
- catch (Exception Ex)
- {
- MessageBox.Show(Ex.ToString());
- }
- }
- private void ultraCheckAll_CheckedChanged(object sender, EventArgs e)
- {
- try
- {
- if (this.ultraCheckAll.Checked)
- {
- this.ultraTextMC_ID.Enabled = false;
- this.ultraCalendarSTRATTIME.Enabled = false;
- this.ultraCalendarENDTIME.Enabled = false;
- }
- if (!this.ultraCheckAll.Checked)
- {
- this.ultraTextMC_ID.Enabled = true;
- this.ultraCalendarSTRATTIME.Enabled = false;
- this.ultraCalendarENDTIME.Enabled = false;
- }
- }
- catch (Exception Ex)
- {
- MessageBox.Show(Ex.ToString());
- }
- }
- private void ultraCheckEditor1_CheckedChanged(object sender, EventArgs e)
- {
- if (this.ultraCheckEditor1.Checked)
- {
- this.ultraCalendarENDTIME.Enabled = true;
- this.ultraCalendarSTRATTIME.Enabled = true;
- }
- if (!this.ultraCheckEditor1.Checked)
- {
- this.ultraCalendarENDTIME.Enabled = false;
- this.ultraCalendarSTRATTIME.Enabled = false;
- this.ultraCalendarSTRATTIME.Text = "";
- this.ultraCalendarENDTIME.Text = "";
- }
- }
- private void UIK030030_Load(object sender, EventArgs e)
- {
- this.ultraCalendarENDTIME.Enabled = false;
- this.ultraCalendarSTRATTIME.Enabled = false;
- }
- }
- }
|