You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.8 KiB
62 lines
1.8 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
using DBFactory;
|
|
namespace ControlSystem
|
|
{
|
|
/// <summary>
|
|
/// Creator:Richard.liu
|
|
/// 设备故障查询
|
|
/// </summary>
|
|
public partial class FrmBrowseAotoTaskLog : Form
|
|
{
|
|
private static FrmBrowseAotoTaskLog _formInstance;
|
|
|
|
public static FrmBrowseAotoTaskLog FormInstance
|
|
{
|
|
get
|
|
|
|
{
|
|
if (_formInstance == null)
|
|
{
|
|
_formInstance = new FrmBrowseAotoTaskLog();
|
|
}
|
|
return _formInstance;
|
|
}
|
|
set { _formInstance = value; }
|
|
}
|
|
DBOperator dbo =CStaticClass.dbo;
|
|
public FrmBrowseAotoTaskLog()
|
|
{
|
|
InitializeComponent();
|
|
this.dateTimePicker1.Value = DateTime.Today;
|
|
this.dateTimePicker2.Value = DateTime.Today;
|
|
_formInstance = this;
|
|
}
|
|
|
|
private void btQuery_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
string sql = "SELECT * FROM T_Manage_Task_BAK WHERE (FBEGTIME >= '"+dateTimePicker1.Text+"') AND (FBEGTIME <= '"+dateTimePicker2.Text+"')";
|
|
DataView dv = dbo.ExceSQL(sql).Tables[0].DefaultView;
|
|
this.dataGridView1.DataSource = dv;
|
|
|
|
}
|
|
|
|
private void btNullQuery_Click(object sender, EventArgs e)
|
|
{
|
|
if (MessageBox.Show("您确认要清空数据库内记录的所有调度自动任务吗?", "操作提示:", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
|
|
{
|
|
return;
|
|
}
|
|
dbo.ExceSQL("delete from T_Manage_Task_BAK");
|
|
}
|
|
|
|
|
|
}
|
|
}
|