searchuserpeodomframe.cs

来自「独立完成考勤管理软件加打卡系统(C#) 是打卡加管理系统软件 」· CS 代码 · 共 689 行 · 第 1/3 页

CS
689
字号
#region 命名空间...
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using WindowsApplication.DataConnection;
using WindowsApplication.dealTime;
using WindowsApplication.ButtonVarible;
using WindowsApplication.MouseStyle;
#endregion
namespace WindowsApplication.SearchUserPeodom
{
	public class searchUserPeodomFrame : System.Windows.Forms.Form
	{
		#region Control...
		private System.Windows.Forms.Label TitleLabel;
		private System.Windows.Forms.DataGrid dataGrid;
		private System.Windows.Forms.Button btnAdd;
		private System.Windows.Forms.Button btnModify;
		private System.Windows.Forms.ImageList image;
		private System.Windows.Forms.Button btnDelete;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label currentUser;
		private System.Windows.Forms.Label currentPeodom;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.TextBox textPeodomID;
		private System.Windows.Forms.TextBox textPeodomName;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label TimeLabel;
		private System.Windows.Forms.TextBox textPeodomStatus;
		private System.Windows.Forms.Label dateLabel;
		private System.Windows.Forms.CurrencyManager cmOrder=null;
		private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
		private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
		private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
		private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
		private System.Data.SqlClient.SqlConnection sqlConnection;
		private WindowsApplication.SearchUserPeodom.System_PopedomSet system_PopedomSet;
		private System.Windows.Forms.Timer currentTime;
		//private WindowsApplication.SearchUserPeodom.System_PepedomSet system_PepedomSet;
		private System.ComponentModel.IContainer components;
		#endregion
		#region Function ...
		public searchUserPeodomFrame()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}
		#endregion
		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(searchUserPeodomFrame));
			this.TitleLabel = new System.Windows.Forms.Label();
			this.dataGrid = new System.Windows.Forms.DataGrid();
			this.btnAdd = new System.Windows.Forms.Button();
			this.image = new System.Windows.Forms.ImageList(this.components);
			this.btnModify = new System.Windows.Forms.Button();
			this.btnDelete = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.currentUser = new System.Windows.Forms.Label();
			this.currentPeodom = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.textPeodomID = new System.Windows.Forms.TextBox();
			this.textPeodomName = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.textPeodomStatus = new System.Windows.Forms.TextBox();
			this.label5 = new System.Windows.Forms.Label();
			this.TimeLabel = new System.Windows.Forms.Label();
			this.dateLabel = new System.Windows.Forms.Label();
			this.sqlDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection = new System.Data.SqlClient.SqlConnection();
			this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
			this.system_PopedomSet = new WindowsApplication.SearchUserPeodom.System_PopedomSet();
			this.currentTime = new System.Windows.Forms.Timer(this.components);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.system_PopedomSet)).BeginInit();
			this.SuspendLayout();
			// 
			// TitleLabel
			// 
			this.TitleLabel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
			this.TitleLabel.Cursor = System.Windows.Forms.Cursors.Hand;
			this.TitleLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.TitleLabel.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.TitleLabel.ForeColor = System.Drawing.Color.White;
			this.TitleLabel.Location = new System.Drawing.Point(0, 0);
			this.TitleLabel.Name = "TitleLabel";
			this.TitleLabel.Size = new System.Drawing.Size(416, 32);
			this.TitleLabel.TabIndex = 0;
			this.TitleLabel.Text = "查看用户权限列表";
			this.TitleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// dataGrid
			// 
			this.dataGrid.AlternatingBackColor = System.Drawing.Color.White;
			this.dataGrid.BackColor = System.Drawing.Color.White;
			this.dataGrid.BackgroundColor = System.Drawing.Color.Ivory;
			this.dataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
			this.dataGrid.CaptionBackColor = System.Drawing.Color.DarkSlateBlue;
			this.dataGrid.CaptionForeColor = System.Drawing.Color.Lavender;
			this.dataGrid.CaptionVisible = false;
			this.dataGrid.DataMember = "";
			this.dataGrid.FlatMode = true;
			this.dataGrid.Font = new System.Drawing.Font("Tahoma", 8F);
			this.dataGrid.ForeColor = System.Drawing.Color.Black;
			this.dataGrid.GridLineColor = System.Drawing.Color.Wheat;
			this.dataGrid.HeaderBackColor = System.Drawing.Color.CadetBlue;
			this.dataGrid.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.dataGrid.HeaderForeColor = System.Drawing.Color.Black;
			this.dataGrid.LinkColor = System.Drawing.Color.DarkSlateBlue;
			this.dataGrid.Location = new System.Drawing.Point(0, 96);
			this.dataGrid.Name = "dataGrid";
			this.dataGrid.ParentRowsBackColor = System.Drawing.Color.Ivory;
			this.dataGrid.ParentRowsForeColor = System.Drawing.Color.Black;
			this.dataGrid.ReadOnly = true;
			this.dataGrid.SelectionBackColor = System.Drawing.Color.Wheat;
			this.dataGrid.SelectionForeColor = System.Drawing.Color.DarkSlateBlue;
			this.dataGrid.Size = new System.Drawing.Size(128, 280);
			this.dataGrid.TabIndex = 1;
			this.dataGrid.CurrentCellChanged += new System.EventHandler(this.dataGrid_CurrentCellChanged);
			// 
			// btnAdd
			// 
			this.btnAdd.BackColor = System.Drawing.Color.Teal;
			this.btnAdd.Enabled = false;
			this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnAdd.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnAdd.ForeColor = System.Drawing.Color.White;
			this.btnAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnAdd.ImageIndex = 3;
			this.btnAdd.ImageList = this.image;
			this.btnAdd.Location = new System.Drawing.Point(16, 48);
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.Size = new System.Drawing.Size(80, 24);
			this.btnAdd.TabIndex = 2;
			this.btnAdd.Text = "添加(&A)";
			this.btnAdd.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
			this.btnAdd.MouseEnter += new System.EventHandler(this.btnCancel_MouseEnter);
			this.btnAdd.MouseLeave += new System.EventHandler(this.btnCancel_MouseLeave);
			// 
			// image
			// 
			this.image.ImageSize = new System.Drawing.Size(16, 16);
			this.image.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("image.ImageStream")));
			this.image.TransparentColor = System.Drawing.Color.Transparent;
			// 
			// btnModify
			// 
			this.btnModify.BackColor = System.Drawing.Color.Teal;
			this.btnModify.Enabled = false;
			this.btnModify.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnModify.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnModify.ForeColor = System.Drawing.Color.White;
			this.btnModify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnModify.ImageIndex = 2;
			this.btnModify.ImageList = this.image;
			this.btnModify.Location = new System.Drawing.Point(112, 48);
			this.btnModify.Name = "btnModify";
			this.btnModify.Size = new System.Drawing.Size(80, 24);
			this.btnModify.TabIndex = 3;
			this.btnModify.Text = "修改(&M)";
			this.btnModify.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.btnModify.Click += new System.EventHandler(this.btnModify_Click);
			this.btnModify.MouseEnter += new System.EventHandler(this.btnCancel_MouseEnter);
			this.btnModify.MouseLeave += new System.EventHandler(this.btnCancel_MouseLeave);
			// 
			// btnDelete
			// 
			this.btnDelete.BackColor = System.Drawing.Color.Teal;
			this.btnDelete.Enabled = false;
			this.btnDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnDelete.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnDelete.ForeColor = System.Drawing.Color.White;
			this.btnDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnDelete.ImageIndex = 4;
			this.btnDelete.ImageList = this.image;
			this.btnDelete.Location = new System.Drawing.Point(208, 48);
			this.btnDelete.Name = "btnDelete";
			this.btnDelete.Size = new System.Drawing.Size(80, 24);
			this.btnDelete.TabIndex = 4;
			this.btnDelete.Text = "删除(&D)";
			this.btnDelete.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
			this.btnDelete.MouseEnter += new System.EventHandler(this.btnCancel_MouseEnter);
			this.btnDelete.MouseLeave += new System.EventHandler(this.btnCancel_MouseLeave);
			// 
			// btnCancel
			// 
			this.btnCancel.BackColor = System.Drawing.Color.Teal;
			this.btnCancel.Enabled = false;

⌨️ 快捷键说明

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