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

📄 frmroomstate.cs

📁 简单的酒店客房管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Configuration;
using System.Reflection;

namespace 酒店管理系统
{
	/// <summary>
	/// frmRoomState 的摘要说明。
	/// </summary>
	public class frmRoomState : System.Windows.Forms.Form
	{
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		// added member
		internal System.Windows.Forms.GroupBox GroupBox2;
		internal System.Windows.Forms.Label lblRoom;
		internal System.Windows.Forms.Label Label2;
		internal System.Windows.Forms.DataGrid dgdList;
		internal System.Windows.Forms.GroupBox GroupBox1;
		internal System.Windows.Forms.Label Label1;
		internal System.Windows.Forms.Button btnSet;
		internal System.Windows.Forms.Button btnUpate;
		internal System.Windows.Forms.GroupBox GroupBox3;
		internal System.Windows.Forms.PictureBox PictureBox6;
		internal System.Windows.Forms.PictureBox PictureBox5;
		internal System.Windows.Forms.PictureBox PictureBox4;
		internal System.Windows.Forms.PictureBox PictureBox3;
		internal System.Windows.Forms.PictureBox PictureBox2;
		internal System.Windows.Forms.RadioButton rbnLeave;
		internal System.Windows.Forms.RadioButton rbnArrive;
		internal System.Windows.Forms.RadioButton rbnRepair;
		internal System.Windows.Forms.RadioButton rbnSelf;
		internal System.Windows.Forms.RadioButton rbnFull;
		internal System.Windows.Forms.RadioButton rbnEmpty;
		internal System.Windows.Forms.PictureBox PictureBox1;
		
		// added member
		private DataTable dtData;
		private DataTable dtRoom;
		private ArrayList bitMaps;
		private int iMaxRoomNumber;
		private DateTime gridMouseDownTime = new DateTime();
		public string strRoomCode = "";
		public bool bClose = false;
		public string strFilter = "";

		public frmRoomState()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

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

		/// <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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmRoomState));
            this.GroupBox2 = new System.Windows.Forms.GroupBox();
            this.lblRoom = new System.Windows.Forms.Label();
            this.Label2 = new System.Windows.Forms.Label();
            this.dgdList = new System.Windows.Forms.DataGrid();
            this.GroupBox1 = new System.Windows.Forms.GroupBox();
            this.Label1 = new System.Windows.Forms.Label();
            this.btnSet = new System.Windows.Forms.Button();
            this.btnUpate = new System.Windows.Forms.Button();
            this.GroupBox3 = new System.Windows.Forms.GroupBox();
            this.PictureBox6 = new System.Windows.Forms.PictureBox();
            this.PictureBox5 = new System.Windows.Forms.PictureBox();
            this.PictureBox4 = new System.Windows.Forms.PictureBox();
            this.PictureBox3 = new System.Windows.Forms.PictureBox();
            this.PictureBox2 = new System.Windows.Forms.PictureBox();
            this.rbnLeave = new System.Windows.Forms.RadioButton();
            this.rbnArrive = new System.Windows.Forms.RadioButton();
            this.rbnRepair = new System.Windows.Forms.RadioButton();
            this.rbnSelf = new System.Windows.Forms.RadioButton();
            this.rbnFull = new System.Windows.Forms.RadioButton();
            this.rbnEmpty = new System.Windows.Forms.RadioButton();
            this.PictureBox1 = new System.Windows.Forms.PictureBox();
            this.GroupBox2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dgdList)).BeginInit();
            this.GroupBox1.SuspendLayout();
            this.GroupBox3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox6)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox5)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();
            this.SuspendLayout();
            // 
            // GroupBox2
            // 
            this.GroupBox2.Controls.Add(this.lblRoom);
            this.GroupBox2.Controls.Add(this.Label2);
            this.GroupBox2.Controls.Add(this.dgdList);
            this.GroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.GroupBox2.Location = new System.Drawing.Point(200, 0);
            this.GroupBox2.Name = "GroupBox2";
            this.GroupBox2.Size = new System.Drawing.Size(376, 405);
            this.GroupBox2.TabIndex = 3;
            this.GroupBox2.TabStop = false;
            this.GroupBox2.Text = "房态显示";
            // 
            // lblRoom
            // 
            this.lblRoom.Location = new System.Drawing.Point(88, 32);
            this.lblRoom.Name = "lblRoom";
            this.lblRoom.Size = new System.Drawing.Size(128, 16);
            this.lblRoom.TabIndex = 2;
            // 
            // Label2
            // 
            this.Label2.Location = new System.Drawing.Point(24, 32);
            this.Label2.Name = "Label2";
            this.Label2.Size = new System.Drawing.Size(56, 16);
            this.Label2.TabIndex = 1;
            this.Label2.Text = "当前房间";
            // 
            // dgdList
            // 
            this.dgdList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.dgdList.CaptionVisible = false;
            this.dgdList.DataMember = "";
            this.dgdList.HeaderForeColor = System.Drawing.SystemColors.ControlText;
            this.dgdList.Location = new System.Drawing.Point(3, 72);
            this.dgdList.Name = "dgdList";
            this.dgdList.Size = new System.Drawing.Size(370, 328);
            this.dgdList.TabIndex = 0;
            this.dgdList.DoubleClick += new System.EventHandler(this.dgdList_DoubleClick);
            this.dgdList.CurrentCellChanged += new System.EventHandler(this.dgdList_CurrentCellChanged);
            this.dgdList.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dgdList_MouseDown);
            // 
            // GroupBox1
            // 
            this.GroupBox1.Controls.Add(this.Label1);
            this.GroupBox1.Controls.Add(this.btnSet);
            this.GroupBox1.Controls.Add(this.btnUpate);
            this.GroupBox1.Controls.Add(this.GroupBox3);
            this.GroupBox1.Dock = System.Windows.Forms.DockStyle.Left;
            this.GroupBox1.Location = new System.Drawing.Point(0, 0);
            this.GroupBox1.Name = "GroupBox1";
            this.GroupBox1.Size = new System.Drawing.Size(200, 405);
            this.GroupBox1.TabIndex = 2;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "控制区";
            // 
            // Label1
            // 
            this.Label1.Location = new System.Drawing.Point(24, 312);
            this.Label1.Name = "Label1";
            this.Label1.Size = new System.Drawing.Size(160, 80);
            this.Label1.TabIndex = 2;
            this.Label1.Text = "提示:房态一般由程序自动修改,人工一般不可以修改,除非是发现错误或者是将房态设置为自用房等操作,实际系统中学要对用户的权限进行验证。";
            this.Label1.Click += new System.EventHandler(this.Label1_Click);
            // 
            // btnSet
            // 
            this.btnSet.Location = new System.Drawing.Point(24, 280);
            this.btnSet.Name = "btnSet";
            this.btnSet.Size = new System.Drawing.Size(75, 23);
            this.btnSet.TabIndex = 1;
            this.btnSet.Text = "设置房态";
            this.btnSet.Click += new System.EventHandler(this.btnSet_Click);
            // 
            // btnUpate
            // 
            this.btnUpate.Location = new System.Drawing.Point(24, 24);
            this.btnUpate.Name = "btnUpate";
            this.btnUpate.Size = new System.Drawing.Size(75, 23);
            this.btnUpate.TabIndex = 0;
            this.btnUpate.Text = "更新房态图";
            this.btnUpate.Click += new System.EventHandler(this.btnUpate_Click);
            // 
            // GroupBox3
            // 
            this.GroupBox3.Controls.Add(this.PictureBox6);
            this.GroupBox3.Controls.Add(this.PictureBox5);
            this.GroupBox3.Controls.Add(this.PictureBox4);
            this.GroupBox3.Controls.Add(this.PictureBox3);
            this.GroupBox3.Controls.Add(this.PictureBox2);
            this.GroupBox3.Controls.Add(this.rbnLeave);
            this.GroupBox3.Controls.Add(this.rbnArrive);
            this.GroupBox3.Controls.Add(this.rbnRepair);
            this.GroupBox3.Controls.Add(this.rbnSelf);
            this.GroupBox3.Controls.Add(this.rbnFull);
            this.GroupBox3.Controls.Add(this.rbnEmpty);
            this.GroupBox3.Controls.Add(this.PictureBox1);
            this.GroupBox3.Location = new System.Drawing.Point(16, 56);
            this.GroupBox3.Name = "GroupBox3";
            this.GroupBox3.Size = new System.Drawing.Size(168, 216);
            this.GroupBox3.TabIndex = 0;
            this.GroupBox3.TabStop = false;
            this.GroupBox3.Text = "房态选择";
            // 
            // PictureBox6
            // 
            this.PictureBox6.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox6.Image")));
            this.PictureBox6.Location = new System.Drawing.Point(88, 176);
            this.PictureBox6.Name = "PictureBox6";
            this.PictureBox6.Size = new System.Drawing.Size(32, 32);
            this.PictureBox6.TabIndex = 10;
            this.PictureBox6.TabStop = false;
            // 
            // PictureBox5
            // 
            this.PictureBox5.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox5.Image")));
            this.PictureBox5.Location = new System.Drawing.Point(88, 144);
            this.PictureBox5.Name = "PictureBox5";
            this.PictureBox5.Size = new System.Drawing.Size(32, 32);
            this.PictureBox5.TabIndex = 9;
            this.PictureBox5.TabStop = false;
            // 
            // PictureBox4
            // 
            this.PictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox4.Image")));
            this.PictureBox4.Location = new System.Drawing.Point(88, 112);
            this.PictureBox4.Name = "PictureBox4";
            this.PictureBox4.Size = new System.Drawing.Size(32, 32);
            this.PictureBox4.TabIndex = 8;
            this.PictureBox4.TabStop = false;
            // 
            // PictureBox3
            // 
            this.PictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox3.Image")));
            this.PictureBox3.Location = new System.Drawing.Point(88, 82);
            this.PictureBox3.Name = "PictureBox3";
            this.PictureBox3.Size = new System.Drawing.Size(32, 32);
            this.PictureBox3.TabIndex = 7;
            this.PictureBox3.TabStop = false;
            // 
            // PictureBox2
            // 
            this.PictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox2.Image")));
            this.PictureBox2.Location = new System.Drawing.Point(88, 49);
            this.PictureBox2.Name = "PictureBox2";
            this.PictureBox2.Size = new System.Drawing.Size(32, 32);
            this.PictureBox2.TabIndex = 6;
            this.PictureBox2.TabStop = false;
            // 
            // rbnLeave
            // 
            this.rbnLeave.Location = new System.Drawing.Point(32, 184);
            this.rbnLeave.Name = "rbnLeave";
            this.rbnLeave.Size = new System.Drawing.Size(48, 24);
            this.rbnLeave.TabIndex = 5;
            this.rbnLeave.Text = "将离 ";
            // 
            // rbnArrive
            // 
            this.rbnArrive.Location = new System.Drawing.Point(32, 152);
            this.rbnArrive.Name = "rbnArrive";
            this.rbnArrive.Size = new System.Drawing.Size(48, 24);
            this.rbnArrive.TabIndex = 4;
            this.rbnArrive.Text = "将到";
            // 
            // rbnRepair
            // 
            this.rbnRepair.Location = new System.Drawing.Point(32, 120);
            this.rbnRepair.Name = "rbnRepair";
            this.rbnRepair.Size = new System.Drawing.Size(48, 24);
            this.rbnRepair.TabIndex = 3;
            this.rbnRepair.Text = "维修";
            // 
            // rbnSelf
            // 
            this.rbnSelf.Location = new System.Drawing.Point(32, 88);
            this.rbnSelf.Name = "rbnSelf";
            this.rbnSelf.Size = new System.Drawing.Size(48, 24);
            this.rbnSelf.TabIndex = 2;
            this.rbnSelf.Text = "自用";
            // 
            // rbnFull
            // 
            this.rbnFull.Location = new System.Drawing.Point(32, 56);
            this.rbnFull.Name = "rbnFull";
            this.rbnFull.Size = new System.Drawing.Size(48, 24);
            this.rbnFull.TabIndex = 1;
            this.rbnFull.Text = "住房";
            // 
            // rbnEmpty
            // 
            this.rbnEmpty.Location = new System.Drawing.Point(32, 24);
            this.rbnEmpty.Name = "rbnEmpty";
            this.rbnEmpty.Size = new System.Drawing.Size(48, 24);
            this.rbnEmpty.TabIndex = 0;
            this.rbnEmpty.Text = "空房";
            // 
            // PictureBox1
            // 
            this.PictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox1.Image")));
            this.PictureBox1.Location = new System.Drawing.Point(88, 16);
            this.PictureBox1.Name = "PictureBox1";
            this.PictureBox1.Size = new System.Drawing.Size(32, 32);
            this.PictureBox1.TabIndex = 0;
            this.PictureBox1.TabStop = false;
            // 
            // frmRoomState
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
            this.ClientSize = new System.Drawing.Size(576, 405);
            this.Controls.Add(this.GroupBox2);
            this.Controls.Add(this.GroupBox1);
            this.Name = "frmRoomState";
            this.Text = "frmRoomState";
            this.Load += new System.EventHandler(this.frmRoomState_Load);
            this.GroupBox2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.dgdList)).EndInit();
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox3.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox6)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox5)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();
            this.ResumeLayout(false);

		}
		#endregion

		private void frmRoomState_Load(object sender, System.EventArgs e)
		{
			InitMaps();
			InitDataTable();

⌨️ 快捷键说明

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