📄 searchform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace KTMIS
{
/// <summary>
/// SearchForm 的摘要说明。
/// </summary>
public class SearchForm : System.Windows.Forms.Form
{
private System.Data.SqlClient.SqlConnection sqlConnection;
private System.Data.SqlClient.SqlCommand sqlCommand;
private System.Data.SqlClient.SqlDataReader sqlDataReader;
private System.Windows.Forms.ComboBox cmbC;
private System.Windows.Forms.ComboBox cmbM;
private System.Windows.Forms.CheckBox cbM;
private System.Windows.Forms.ListBox lbM;
private string queryCondition;
private System.Windows.Forms.ComboBox cmbCollege;
private System.Windows.Forms.NumericUpDown nudSurplus;
private System.Windows.Forms.NumericUpDown nudAlready;
private System.Windows.Forms.NumericUpDown nudStandard;
private System.Windows.Forms.TextBox tbTaskName;
private System.Windows.Forms.DateTimePicker dtpYear;
private System.Windows.Forms.ComboBox cmbLevelNa;
private System.Windows.Forms.ComboBox cmbSortNa;
private System.Windows.Forms.CheckBox cbSort;
private System.Windows.Forms.CheckBox cbLevel;
private System.Windows.Forms.CheckBox cbYear;
private System.Windows.Forms.CheckBox cbStart;
private System.Windows.Forms.CheckBox cbPlan;
private System.Windows.Forms.CheckBox cbEnd;
private System.Windows.Forms.CheckBox cbStandard;
private System.Windows.Forms.CheckBox cbAlready;
private System.Windows.Forms.CheckBox cbSurplus;
private System.Windows.Forms.CheckBox cbTask;
private System.Windows.Forms.ComboBox cmbCollegeNa;
private System.Windows.Forms.ComboBox cmbMemberNa;
private System.Windows.Forms.GroupBox gbMember;
private System.Windows.Forms.CheckBox cbCollegeNa;
private System.Windows.Forms.CheckBox cbMemberNa;
private System.Windows.Forms.GroupBox gbMemberMain;
private System.Windows.Forms.CheckBox cbCollegeMain;
private System.Windows.Forms.CheckBox cbMemberMain;
private System.Windows.Forms.CheckBox cbCollege;
private System.Windows.Forms.Button btnQuery;
private System.Windows.Forms.Button btnBack;
private System.Windows.Forms.RadioButton rbQueryAll;
private System.Windows.Forms.RadioButton rbQueryWhat;
private System.Windows.Forms.GroupBox gbCondition;
private System.Windows.Forms.ComboBox cmbCollegeMain;
private System.Windows.Forms.ComboBox cmbMemberMain;
private System.Windows.Forms.ListBox lbSortCo;
private System.Windows.Forms.ListBox lbLevelCo;
private System.Windows.Forms.ListBox lbCollegeCo;
private System.Windows.Forms.ListBox lbMemberMain;
private System.Windows.Forms.ListBox lbMember;
private System.Windows.Forms.TextBox tbPlan;
private System.Windows.Forms.TextBox tbEnd;
private System.Windows.Forms.TextBox tbStart;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public SearchForm()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
this.sqlCommand = new System.Data.SqlClient.SqlCommand();
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(SearchForm));
this.cmbCollege = new System.Windows.Forms.ComboBox();
this.nudSurplus = new System.Windows.Forms.NumericUpDown();
this.nudAlready = new System.Windows.Forms.NumericUpDown();
this.nudStandard = new System.Windows.Forms.NumericUpDown();
this.tbTaskName = new System.Windows.Forms.TextBox();
this.dtpYear = new System.Windows.Forms.DateTimePicker();
this.cmbLevelNa = new System.Windows.Forms.ComboBox();
this.cmbSortNa = new System.Windows.Forms.ComboBox();
this.cbSort = new System.Windows.Forms.CheckBox();
this.cbLevel = new System.Windows.Forms.CheckBox();
this.cbYear = new System.Windows.Forms.CheckBox();
this.cbStart = new System.Windows.Forms.CheckBox();
this.cbPlan = new System.Windows.Forms.CheckBox();
this.cbEnd = new System.Windows.Forms.CheckBox();
this.cbStandard = new System.Windows.Forms.CheckBox();
this.cbAlready = new System.Windows.Forms.CheckBox();
this.cbSurplus = new System.Windows.Forms.CheckBox();
this.cbTask = new System.Windows.Forms.CheckBox();
this.cmbCollegeNa = new System.Windows.Forms.ComboBox();
this.cmbMemberNa = new System.Windows.Forms.ComboBox();
this.gbMember = new System.Windows.Forms.GroupBox();
this.cbCollegeNa = new System.Windows.Forms.CheckBox();
this.cbMemberNa = new System.Windows.Forms.CheckBox();
this.gbMemberMain = new System.Windows.Forms.GroupBox();
this.cmbMemberMain = new System.Windows.Forms.ComboBox();
this.cmbCollegeMain = new System.Windows.Forms.ComboBox();
this.cbMemberMain = new System.Windows.Forms.CheckBox();
this.cbCollegeMain = new System.Windows.Forms.CheckBox();
this.cbCollege = new System.Windows.Forms.CheckBox();
this.btnQuery = new System.Windows.Forms.Button();
this.btnBack = new System.Windows.Forms.Button();
this.rbQueryAll = new System.Windows.Forms.RadioButton();
this.rbQueryWhat = new System.Windows.Forms.RadioButton();
this.gbCondition = new System.Windows.Forms.GroupBox();
this.tbEnd = new System.Windows.Forms.TextBox();
this.tbPlan = new System.Windows.Forms.TextBox();
this.tbStart = new System.Windows.Forms.TextBox();
this.lbMember = new System.Windows.Forms.ListBox();
this.lbMemberMain = new System.Windows.Forms.ListBox();
this.lbCollegeCo = new System.Windows.Forms.ListBox();
this.lbSortCo = new System.Windows.Forms.ListBox();
this.lbLevelCo = new System.Windows.Forms.ListBox();
((System.ComponentModel.ISupportInitialize)(this.nudSurplus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudAlready)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudStandard)).BeginInit();
this.gbMember.SuspendLayout();
this.gbMemberMain.SuspendLayout();
this.gbCondition.SuspendLayout();
this.SuspendLayout();
//
// cmbCollege
//
this.cmbCollege.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCollege.Enabled = false;
this.cmbCollege.Location = new System.Drawing.Point(512, 24);
this.cmbCollege.Name = "cmbCollege";
this.cmbCollege.Size = new System.Drawing.Size(144, 20);
this.cmbCollege.TabIndex = 3;
this.cmbCollege.Tag = "0";
this.cmbCollege.SelectionChangeCommitted += new System.EventHandler(this.cmbCollege_SelectionChangeCommitted);
//
// nudSurplus
//
this.nudSurplus.DecimalPlaces = 2;
this.nudSurplus.Enabled = false;
this.nudSurplus.Location = new System.Drawing.Point(104, 296);
this.nudSurplus.Maximum = new System.Decimal(new int[] {
100000000,
0,
0,
0});
this.nudSurplus.Name = "nudSurplus";
this.nudSurplus.Size = new System.Drawing.Size(128, 21);
this.nudSurplus.TabIndex = 23;
this.nudSurplus.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.nudSurplus.ThousandsSeparator = true;
//
// nudAlready
//
this.nudAlready.DecimalPlaces = 2;
this.nudAlready.Enabled = false;
this.nudAlready.Location = new System.Drawing.Point(104, 264);
this.nudAlready.Maximum = new System.Decimal(new int[] {
100000000,
0,
0,
0});
this.nudAlready.Name = "nudAlready";
this.nudAlready.Size = new System.Drawing.Size(128, 21);
this.nudAlready.TabIndex = 21;
this.nudAlready.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.nudAlready.ThousandsSeparator = true;
//
// nudStandard
//
this.nudStandard.DecimalPlaces = 2;
this.nudStandard.Enabled = false;
this.nudStandard.Location = new System.Drawing.Point(104, 232);
this.nudStandard.Maximum = new System.Decimal(new int[] {
100000000,
0,
0,
0});
this.nudStandard.Name = "nudStandard";
this.nudStandard.Size = new System.Drawing.Size(128, 21);
this.nudStandard.TabIndex = 19;
this.nudStandard.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.nudStandard.ThousandsSeparator = true;
//
// tbTaskName
//
this.tbTaskName.Enabled = false;
this.tbTaskName.Location = new System.Drawing.Point(248, 56);
this.tbTaskName.Name = "tbTaskName";
this.tbTaskName.Size = new System.Drawing.Size(408, 21);
this.tbTaskName.TabIndex = 1;
this.tbTaskName.Tag = "0";
this.tbTaskName.Text = "";
//
// dtpYear
//
this.dtpYear.CustomFormat = "yyyy";
this.dtpYear.Enabled = false;
this.dtpYear.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpYear.Location = new System.Drawing.Point(104, 88);
this.dtpYear.MaxDate = new System.DateTime(2079, 6, 6, 0, 0, 0, 0);
this.dtpYear.MinDate = new System.DateTime(1900, 1, 1, 0, 0, 0, 0);
this.dtpYear.Name = "dtpYear";
this.dtpYear.Size = new System.Drawing.Size(128, 21);
this.dtpYear.TabIndex = 11;
//
// cmbLevelNa
//
this.cmbLevelNa.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbLevelNa.Enabled = false;
this.cmbLevelNa.Location = new System.Drawing.Point(104, 56);
this.cmbLevelNa.Name = "cmbLevelNa";
this.cmbLevelNa.Size = new System.Drawing.Size(128, 20);
this.cmbLevelNa.TabIndex = 9;
this.cmbLevelNa.Tag = "0";
this.cmbLevelNa.SelectionChangeCommitted += new System.EventHandler(this.cmbLevelNa_SelectionChangeCommitted);
//
// cmbSortNa
//
this.cmbSortNa.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSortNa.Enabled = false;
this.cmbSortNa.Location = new System.Drawing.Point(104, 24);
this.cmbSortNa.Name = "cmbSortNa";
this.cmbSortNa.Size = new System.Drawing.Size(128, 20);
this.cmbSortNa.TabIndex = 7;
this.cmbSortNa.Tag = "0";
this.cmbSortNa.SelectionChangeCommitted += new System.EventHandler(this.cmbSortNa_SelectionChangeCommitted);
//
// cbSort
//
this.cbSort.Location = new System.Drawing.Point(16, 24);
this.cbSort.Name = "cbSort";
this.cbSort.Size = new System.Drawing.Size(88, 24);
this.cbSort.TabIndex = 6;
this.cbSort.Text = "分 类:";
this.cbSort.CheckedChanged += new System.EventHandler(this.cbSort_CheckedChanged);
//
// cbLevel
//
this.cbLevel.Location = new System.Drawing.Point(16, 56);
this.cbLevel.Name = "cbLevel";
this.cbLevel.Size = new System.Drawing.Size(88, 24);
this.cbLevel.TabIndex = 8;
this.cbLevel.Text = "级 别:";
this.cbLevel.CheckedChanged += new System.EventHandler(this.cbLevel_CheckedChanged);
//
// cbYear
//
this.cbYear.Location = new System.Drawing.Point(16, 88);
this.cbYear.Name = "cbYear";
this.cbYear.Size = new System.Drawing.Size(88, 24);
this.cbYear.TabIndex = 10;
this.cbYear.Text = "年 份:";
this.cbYear.CheckedChanged += new System.EventHandler(this.cbYear_CheckedChanged);
//
// cbStart
//
this.cbStart.Location = new System.Drawing.Point(16, 128);
this.cbStart.Name = "cbStart";
this.cbStart.Size = new System.Drawing.Size(88, 24);
this.cbStart.TabIndex = 12;
this.cbStart.Text = "立项日期:";
this.cbStart.CheckedChanged += new System.EventHandler(this.cbStart_CheckedChanged);
//
// cbPlan
//
this.cbPlan.Location = new System.Drawing.Point(16, 160);
this.cbPlan.Name = "cbPlan";
this.cbPlan.Size = new System.Drawing.Size(88, 24);
this.cbPlan.TabIndex = 14;
this.cbPlan.Text = "拟结日期:";
this.cbPlan.CheckedChanged += new System.EventHandler(this.cbPlan_CheckedChanged);
//
// cbEnd
//
this.cbEnd.Location = new System.Drawing.Point(16, 192);
this.cbEnd.Name = "cbEnd";
this.cbEnd.Size = new System.Drawing.Size(88, 24);
this.cbEnd.TabIndex = 16;
this.cbEnd.Text = "结项日期:";
this.cbEnd.CheckedChanged += new System.EventHandler(this.cbEnd_CheckedChanged);
//
// cbStandard
//
this.cbStandard.Location = new System.Drawing.Point(16, 232);
this.cbStandard.Name = "cbStandard";
this.cbStandard.Size = new System.Drawing.Size(88, 24);
this.cbStandard.TabIndex = 18;
this.cbStandard.Text = "经费标准:";
this.cbStandard.CheckedChanged += new System.EventHandler(this.cbStandard_CheckedChanged);
//
// cbAlready
//
this.cbAlready.Location = new System.Drawing.Point(16, 264);
this.cbAlready.Name = "cbAlready";
this.cbAlready.Size = new System.Drawing.Size(88, 24);
this.cbAlready.TabIndex = 20;
this.cbAlready.Text = "已拨经费:";
this.cbAlready.CheckedChanged += new System.EventHandler(this.cbAlready_CheckedChanged);
//
// cbSurplus
//
this.cbSurplus.Location = new System.Drawing.Point(16, 296);
this.cbSurplus.Name = "cbSurplus";
this.cbSurplus.Size = new System.Drawing.Size(88, 24);
this.cbSurplus.TabIndex = 22;
this.cbSurplus.Text = "剩余经费:";
this.cbSurplus.CheckedChanged += new System.EventHandler(this.cbSurplus_CheckedChanged);
//
// cbTask
//
this.cbTask.Location = new System.Drawing.Point(248, 24);
this.cbTask.Name = "cbTask";
this.cbTask.Size = new System.Drawing.Size(88, 24);
this.cbTask.TabIndex = 0;
this.cbTask.Text = "课题名称:";
this.cbTask.CheckedChanged += new System.EventHandler(this.cbTask_CheckedChanged);
//
// cmbCollegeNa
//
this.cmbCollegeNa.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCollegeNa.Enabled = false;
this.cmbCollegeNa.Location = new System.Drawing.Point(80, 40);
this.cmbCollegeNa.Name = "cmbCollegeNa";
this.cmbCollegeNa.Size = new System.Drawing.Size(144, 20);
this.cmbCollegeNa.TabIndex = 1;
this.cmbCollegeNa.Tag = "0";
this.cmbCollegeNa.SelectionChangeCommitted += new System.EventHandler(this.cmbCollegeNa_SelectionChangeCommitted);
//
// cmbMemberNa
//
this.cmbMemberNa.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbMemberNa.Enabled = false;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -