📄 cdlgitwmmaintain.cs
字号:
using System;
using System.Data;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.OracleClient;
using GlobleUtility;
namespace Charge
{
/// <summary>
/// CdlgItwmMaintain 的摘要说明。
/// </summary>
public class CdlgItwmMaintain : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton rbtStu;//学生单选钮
private System.Windows.Forms.RadioButton rbtTec;//教工单选钮
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cbbItem;//项目选择框
private System.Windows.Forms.CheckBox ckbSDept;//系复选框
private System.Windows.Forms.TextBox txtSDept;//系文本框
private System.Windows.Forms.CheckBox ckbSClass;//班级复选框
private System.Windows.Forms.TextBox txtSClass;//班级文本框
private System.Windows.Forms.CheckBox ckbTDept;//教工部门复选框
private System.Windows.Forms.TextBox txtTDept;//教工部门文本框
private System.Windows.Forms.CheckBox ckbTSubDept;//教工部门下属子部门复选框
private System.Windows.Forms.Button btnSDept;//系选择按钮
private System.Windows.Forms.Button btnSClass;//班级选择按钮
private System.Windows.Forms.Button btnTDept;//教工部门选择按钮
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.CheckBox ckbNumber;//学号/教工号复选框
private System.Windows.Forms.TextBox txtNumber;//学号/教工号文本框
private System.Windows.Forms.CheckBox ckbName;//姓名复选框
private System.Windows.Forms.TextBox txtName;//姓名文本框
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Button btnSelected;//“进入列表”按钮
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtMoney;//收费金额文本框
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnIntoDB;//“入库”按钮
private System.Windows.Forms.GroupBox gb1;
private System.Windows.Forms.ListView lvSel;//ListView控件,用来显示选出的收费对象列表
private System.Collections.ArrayList ArrItemID = null;//用来取得收费项目ItemID
private System.Windows.Forms.Button btnOutListView;//“退出列表”按钮
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public CdlgItwmMaintain()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
ArrItemID=new ArrayList();
//设置ListView控件显示属性
lvSel.BeginUpdate();//防止闪烁
lvSel.FullRowSelect =true; //整行选择
lvSel.HideSelection = false; //当listview没有焦点时,选定项是否仍然突出显示
lvSel.View=View.Details;
lvSel.GridLines=true;
lvSel.Clear();
string[] Field = {"学号/教工号","姓名","类别","部门ID","专业ID","班级ID"};
for (int i = 0; i <= 5; i++)
{
lvSel.Columns.Add(Field[i], 80, HorizontalAlignment.Center);
}
//设定各列长度
lvSel.Columns[0].Width =80;
lvSel.Columns[1].Width =100;
lvSel.Columns[2].Width =80;
lvSel.Columns[3].Width =80;
lvSel.Columns[4].Width =80;
lvSel.Columns[5].Width =80;
lvSel.EndUpdate();
}
/// <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()
{
this.gb1 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.txtName = new System.Windows.Forms.TextBox();
this.ckbName = new System.Windows.Forms.CheckBox();
this.txtNumber = new System.Windows.Forms.TextBox();
this.ckbNumber = new System.Windows.Forms.CheckBox();
this.btnTDept = new System.Windows.Forms.Button();
this.btnSClass = new System.Windows.Forms.Button();
this.btnSDept = new System.Windows.Forms.Button();
this.ckbTSubDept = new System.Windows.Forms.CheckBox();
this.txtTDept = new System.Windows.Forms.TextBox();
this.txtSClass = new System.Windows.Forms.TextBox();
this.ckbSClass = new System.Windows.Forms.CheckBox();
this.txtSDept = new System.Windows.Forms.TextBox();
this.ckbTDept = new System.Windows.Forms.CheckBox();
this.ckbSDept = new System.Windows.Forms.CheckBox();
this.rbtTec = new System.Windows.Forms.RadioButton();
this.rbtStu = new System.Windows.Forms.RadioButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.cbbItem = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label3 = new System.Windows.Forms.Label();
this.txtMoney = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.lvSel = new System.Windows.Forms.ListView();
this.btnSelected = new System.Windows.Forms.Button();
this.btnIntoDB = new System.Windows.Forms.Button();
this.btnOutListView = new System.Windows.Forms.Button();
this.gb1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox4.SuspendLayout();
this.SuspendLayout();
//
// gb1
//
this.gb1.Controls.Add(this.groupBox3);
this.gb1.Controls.Add(this.btnTDept);
this.gb1.Controls.Add(this.btnSClass);
this.gb1.Controls.Add(this.btnSDept);
this.gb1.Controls.Add(this.ckbTSubDept);
this.gb1.Controls.Add(this.txtTDept);
this.gb1.Controls.Add(this.txtSClass);
this.gb1.Controls.Add(this.ckbSClass);
this.gb1.Controls.Add(this.txtSDept);
this.gb1.Controls.Add(this.ckbTDept);
this.gb1.Controls.Add(this.ckbSDept);
this.gb1.Controls.Add(this.rbtTec);
this.gb1.Controls.Add(this.rbtStu);
this.gb1.Location = new System.Drawing.Point(0, 88);
this.gb1.Name = "gb1";
this.gb1.Size = new System.Drawing.Size(576, 240);
this.gb1.TabIndex = 0;
this.gb1.TabStop = false;
this.gb1.Text = "对象范围选定";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.txtName);
this.groupBox3.Controls.Add(this.ckbName);
this.groupBox3.Controls.Add(this.txtNumber);
this.groupBox3.Controls.Add(this.ckbNumber);
this.groupBox3.Location = new System.Drawing.Point(0, 160);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(576, 80);
this.groupBox3.TabIndex = 14;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "附加条件";
//
// txtName
//
this.txtName.Enabled = false;
this.txtName.Location = new System.Drawing.Point(416, 40);
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(120, 21);
this.txtName.TabIndex = 3;
this.txtName.Text = "";
//
// ckbName
//
this.ckbName.Location = new System.Drawing.Point(304, 40);
this.ckbName.Name = "ckbName";
this.ckbName.Size = new System.Drawing.Size(64, 24);
this.ckbName.TabIndex = 2;
this.ckbName.Text = "姓名";
this.ckbName.CheckedChanged += new System.EventHandler(this.ckbName_CheckedChanged);
//
// txtNumber
//
this.txtNumber.Enabled = false;
this.txtNumber.Location = new System.Drawing.Point(152, 40);
this.txtNumber.Name = "txtNumber";
this.txtNumber.TabIndex = 1;
this.txtNumber.Text = "";
//
// ckbNumber
//
this.ckbNumber.Location = new System.Drawing.Point(32, 40);
this.ckbNumber.Name = "ckbNumber";
this.ckbNumber.TabIndex = 0;
this.ckbNumber.Text = "学号/教工号";
this.ckbNumber.CheckedChanged += new System.EventHandler(this.ckbNumber_CheckedChanged);
//
// btnTDept
//
this.btnTDept.Enabled = false;
this.btnTDept.Location = new System.Drawing.Point(488, 72);
this.btnTDept.Name = "btnTDept";
this.btnTDept.Size = new System.Drawing.Size(72, 23);
this.btnTDept.TabIndex = 13;
this.btnTDept.Text = "部门选择";
this.btnTDept.Click += new System.EventHandler(this.btnTDept_Click);
//
// btnSClass
//
this.btnSClass.Enabled = false;
this.btnSClass.Location = new System.Drawing.Point(184, 120);
this.btnSClass.Name = "btnSClass";
this.btnSClass.Size = new System.Drawing.Size(72, 23);
this.btnSClass.TabIndex = 12;
this.btnSClass.Text = "班级选择";
this.btnSClass.Click += new System.EventHandler(this.btnSClass_Click);
//
// btnSDept
//
this.btnSDept.Enabled = false;
this.btnSDept.Location = new System.Drawing.Point(184, 72);
this.btnSDept.Name = "btnSDept";
this.btnSDept.Size = new System.Drawing.Size(72, 23);
this.btnSDept.TabIndex = 11;
this.btnSDept.Text = "系选择";
this.btnSDept.Click += new System.EventHandler(this.btnSDept_Click);
//
// ckbTSubDept
//
this.ckbTSubDept.Enabled = false;
this.ckbTSubDept.Location = new System.Drawing.Point(304, 120);
this.ckbTSubDept.Name = "ckbTSubDept";
this.ckbTSubDept.Size = new System.Drawing.Size(64, 24);
this.ckbTSubDept.TabIndex = 10;
this.ckbTSubDept.Text = "子部门";
this.ckbTSubDept.CheckedChanged += new System.EventHandler(this.ckbTSubDept_CheckedChanged);
//
// txtTDept
//
this.txtTDept.Enabled = false;
this.txtTDept.Location = new System.Drawing.Point(368, 72);
this.txtTDept.Name = "txtTDept";
this.txtTDept.Size = new System.Drawing.Size(120, 21);
this.txtTDept.TabIndex = 9;
this.txtTDept.Text = "";
this.txtTDept.TextChanged += new System.EventHandler(this.txtTDept_TextChanged);
//
// txtSClass
//
this.txtSClass.Enabled = false;
this.txtSClass.Location = new System.Drawing.Point(88, 120);
this.txtSClass.Name = "txtSClass";
this.txtSClass.Size = new System.Drawing.Size(96, 21);
this.txtSClass.TabIndex = 8;
this.txtSClass.Text = "";
//
// ckbSClass
//
this.ckbSClass.Enabled = false;
this.ckbSClass.Location = new System.Drawing.Point(32, 120);
this.ckbSClass.Name = "ckbSClass";
this.ckbSClass.Size = new System.Drawing.Size(48, 24);
this.ckbSClass.TabIndex = 7;
this.ckbSClass.Text = "班级";
this.ckbSClass.CheckedChanged += new System.EventHandler(this.ckbSClass_CheckedChanged);
//
// txtSDept
//
this.txtSDept.Enabled = false;
this.txtSDept.Location = new System.Drawing.Point(88, 72);
this.txtSDept.Name = "txtSDept";
this.txtSDept.Size = new System.Drawing.Size(96, 21);
this.txtSDept.TabIndex = 6;
this.txtSDept.Text = "";
//
// ckbTDept
//
this.ckbTDept.Enabled = false;
this.ckbTDept.Location = new System.Drawing.Point(304, 72);
this.ckbTDept.Name = "ckbTDept";
this.ckbTDept.Size = new System.Drawing.Size(48, 24);
this.ckbTDept.TabIndex = 5;
this.ckbTDept.Text = "部门";
this.ckbTDept.CheckedChanged += new System.EventHandler(this.ckbTDept_CheckedChanged);
//
// ckbSDept
//
this.ckbSDept.Enabled = false;
this.ckbSDept.Location = new System.Drawing.Point(32, 72);
this.ckbSDept.Name = "ckbSDept";
this.ckbSDept.Size = new System.Drawing.Size(40, 24);
this.ckbSDept.TabIndex = 4;
this.ckbSDept.Text = "系";
this.ckbSDept.CheckedChanged += new System.EventHandler(this.ckbSDept_CheckedChanged);
//
// rbtTec
//
this.rbtTec.Location = new System.Drawing.Point(304, 32);
this.rbtTec.Name = "rbtTec";
this.rbtTec.TabIndex = 3;
this.rbtTec.Text = "教工";
this.rbtTec.CheckedChanged += new System.EventHandler(this.rbtTec_CheckedChanged);
//
// rbtStu
//
this.rbtStu.Location = new System.Drawing.Point(32, 32);
this.rbtStu.Name = "rbtStu";
this.rbtStu.TabIndex = 2;
this.rbtStu.Text = "学生";
this.rbtStu.CheckedChanged += new System.EventHandler(this.rbtStu_CheckedChanged);
//
// groupBox1
//
this.groupBox1.Location = new System.Drawing.Point(0, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabIndex = 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -