⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmusersearch.cs

📁 本论文叙述了联机考试系统的现状以及C#语言的概况。重点介绍了联机考试系统的实现过程:包括系统分析、 系统调查、 数据流程分析、功能设计、 数据库设计、 系统物理配置方案、 系统实现、 系统测试和调试。
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;


namespace OES
{
	/// <summary>
	/// Summary description for frmExamSchedule.
	/// </summary>
	public class frmUserSearch : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label lblStatus;
		private System.Windows.Forms.Label lblUserName;
		private System.Windows.Forms.Label lblUserType;
		private System.Windows.Forms.TextBox txtUserName;
		private System.Windows.Forms.ComboBox cboUserType;
		private System.Windows.Forms.Label lblHeading;
		private System.Windows.Forms.Button btnSearch;
		private System.Windows.Forms.Button btnPrint;
		private System.Windows.Forms.ComboBox cboStatus;
		private System.Windows.Forms.DataGrid dbgUserDetails;
		private System.Windows.Forms.GroupBox grpSearch;
		private System.Windows.Forms.Button btnHelp;
		private System.Windows.Forms.Button btnClose;
		private System.Windows.Forms.Button btnSave;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;
		public static bool updateflag = false;
		private string[] searchValue;
		private string userid;
		private bool status;
		private int index=0;
		private DataTable dtUser,dtBefore;
		private System.Drawing.Printing.PrintDocument pdocUser;
		private System.Windows.Forms.PrintDialog pdlgUser;
	

		public static bool [] rowUpdated;
		public frmUserSearch()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			searchValue=new string[4];


		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmUserSearch));
			this.lblStatus = new System.Windows.Forms.Label();
			this.lblUserName = new System.Windows.Forms.Label();
			this.lblUserType = new System.Windows.Forms.Label();
			this.lblHeading = new System.Windows.Forms.Label();
			this.btnSearch = new System.Windows.Forms.Button();
			this.btnPrint = new System.Windows.Forms.Button();
			this.txtUserName = new System.Windows.Forms.TextBox();
			this.cboUserType = new System.Windows.Forms.ComboBox();
			this.cboStatus = new System.Windows.Forms.ComboBox();
			this.dbgUserDetails = new System.Windows.Forms.DataGrid();
			this.btnClose = new System.Windows.Forms.Button();
			this.grpSearch = new System.Windows.Forms.GroupBox();
			this.btnHelp = new System.Windows.Forms.Button();
			this.btnSave = new System.Windows.Forms.Button();
			this.pdocUser = new System.Drawing.Printing.PrintDocument();
			this.pdlgUser = new System.Windows.Forms.PrintDialog();
			((System.ComponentModel.ISupportInitialize)(this.dbgUserDetails)).BeginInit();
			this.SuspendLayout();
			// 
			// lblStatus
			// 
			this.lblStatus.BackColor = System.Drawing.Color.Transparent;
			this.lblStatus.Font = new System.Drawing.Font("Century Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblStatus.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.lblStatus.Location = new System.Drawing.Point(538, 146);
			this.lblStatus.Name = "lblStatus";
			this.lblStatus.Size = new System.Drawing.Size(48, 25);
			this.lblStatus.TabIndex = 2;
			this.lblStatus.Text = "状态";
			// 
			// lblUserName
			// 
			this.lblUserName.BackColor = System.Drawing.Color.Transparent;
			this.lblUserName.Font = new System.Drawing.Font("Century Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblUserName.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.lblUserName.Location = new System.Drawing.Point(134, 146);
			this.lblUserName.Name = "lblUserName";
			this.lblUserName.Size = new System.Drawing.Size(96, 25);
			this.lblUserName.TabIndex = 4;
			this.lblUserName.Text = "用户名";
			// 
			// lblUserType
			// 
			this.lblUserType.BackColor = System.Drawing.Color.Transparent;
			this.lblUserType.Font = new System.Drawing.Font("Century Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblUserType.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.lblUserType.Location = new System.Drawing.Point(355, 146);
			this.lblUserType.Name = "lblUserType";
			this.lblUserType.Size = new System.Drawing.Size(87, 25);
			this.lblUserType.TabIndex = 5;
			this.lblUserType.Text = "用户类型";
			// 
			// lblHeading
			// 
			this.lblHeading.AutoSize = true;
			this.lblHeading.BackColor = System.Drawing.Color.Transparent;
			this.lblHeading.Font = new System.Drawing.Font("Century Gothic", 21.75F);
			this.lblHeading.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
			this.lblHeading.Location = new System.Drawing.Point(115, 9);
			this.lblHeading.Name = "lblHeading";
			this.lblHeading.Size = new System.Drawing.Size(191, 39);
			this.lblHeading.TabIndex = 11;
			this.lblHeading.Text = "用  户  搜  索";
			// 
			// btnSearch
			// 
			this.btnSearch.BackColor = System.Drawing.Color.Transparent;
			this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btnSearch.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.btnSearch.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.btnSearch.Location = new System.Drawing.Point(691, 146);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new System.Drawing.Size(77, 26);
			this.btnSearch.TabIndex = 12;
			this.btnSearch.Text = "搜索(&S)";
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// btnPrint
			// 
			this.btnPrint.BackColor = System.Drawing.Color.Transparent;
			this.btnPrint.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btnPrint.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.btnPrint.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.btnPrint.Location = new System.Drawing.Point(288, 422);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.Size = new System.Drawing.Size(96, 26);
			this.btnPrint.TabIndex = 13;
			this.btnPrint.Text = "打印(&P)";
			this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
			// 
			// txtUserName
			// 
			this.txtUserName.BackColor = System.Drawing.SystemColors.Info;
			this.txtUserName.Location = new System.Drawing.Point(230, 146);
			this.txtUserName.Name = "txtUserName";
			this.txtUserName.Size = new System.Drawing.Size(106, 21);
			this.txtUserName.TabIndex = 20;
			this.txtUserName.Text = "";
			// 
			// cboUserType
			// 
			this.cboUserType.BackColor = System.Drawing.SystemColors.Info;
			this.cboUserType.Items.AddRange(new object[] {
															 "Student",
															 "Teacher"});
			this.cboUserType.Location = new System.Drawing.Point(442, 146);
			this.cboUserType.Name = "cboUserType";
			this.cboUserType.Size = new System.Drawing.Size(86, 20);
			this.cboUserType.TabIndex = 21;
			this.cboUserType.Text = "Teacher";
			// 
			// cboStatus
			// 
			this.cboStatus.BackColor = System.Drawing.SystemColors.Info;
			this.cboStatus.Items.AddRange(new object[] {
														   "Active",
														   "Inactive"});
			this.cboStatus.Location = new System.Drawing.Point(595, 146);
			this.cboStatus.Name = "cboStatus";
			this.cboStatus.Size = new System.Drawing.Size(87, 20);
			this.cboStatus.TabIndex = 22;
			this.cboStatus.Text = "Active";
			this.cboStatus.SelectedIndexChanged += new System.EventHandler(this.cboStatus_SelectedIndexChanged);
			// 
			// dbgUserDetails
			// 
			this.dbgUserDetails.BackgroundColor = System.Drawing.Color.LightSteelBlue;
			this.dbgUserDetails.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.dbgUserDetails.DataMember = "";
			this.dbgUserDetails.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dbgUserDetails.Location = new System.Drawing.Point(115, 207);
			this.dbgUserDetails.Name = "dbgUserDetails";
			this.dbgUserDetails.ReadOnly = true;
			this.dbgUserDetails.Size = new System.Drawing.Size(663, 207);
			this.dbgUserDetails.TabIndex = 23;
			this.dbgUserDetails.DoubleClick += new System.EventHandler(this.dbgUserDetails_DoubleClick);
			// 
			// btnClose
			// 
			this.btnClose.BackColor = System.Drawing.Color.Transparent;
			this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btnClose.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.btnClose.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.btnClose.Location = new System.Drawing.Point(566, 422);
			this.btnClose.Name = "btnClose";
			this.btnClose.Size = new System.Drawing.Size(96, 26);
			this.btnClose.TabIndex = 24;
			this.btnClose.Text = "关闭(&O)";
			this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
			// 
			// grpSearch
			// 
			this.grpSearch.BackColor = System.Drawing.Color.Transparent;
			this.grpSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.grpSearch.Font = new System.Drawing.Font("Century Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.grpSearch.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.grpSearch.Location = new System.Drawing.Point(115, 103);
			this.grpSearch.Name = "grpSearch";
			this.grpSearch.Size = new System.Drawing.Size(663, 87);
			this.grpSearch.TabIndex = 26;
			this.grpSearch.TabStop = false;
			this.grpSearch.Text = "搜索用户信息";
			// 
			// btnHelp
			// 
			this.btnHelp.BackColor = System.Drawing.Color.Transparent;
			this.btnHelp.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btnHelp.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.btnHelp.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.btnHelp.Location = new System.Drawing.Point(680, 17);
			this.btnHelp.Name = "btnHelp";
			this.btnHelp.Size = new System.Drawing.Size(72, 26);
			this.btnHelp.TabIndex = 27;
			this.btnHelp.Text = "帮助(&H)";
			this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click);
			// 
			// btnSave
			// 
			this.btnSave.BackColor = System.Drawing.Color.Transparent;
			this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.btnSave.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.btnSave.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.btnSave.Location = new System.Drawing.Point(427, 422);
			this.btnSave.Name = "btnSave";
			this.btnSave.Size = new System.Drawing.Size(96, 26);
			this.btnSave.TabIndex = 28;
			this.btnSave.Text = "保存(&S)";
			this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
			// 
			// pdocUser
			// 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -