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

📄 roomsearch.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.SqlClient;

namespace HotelManage
{
	/// <summary>
	/// RoomSearch 的摘要说明。
	/// </summary>
	public class RoomSearch : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.TextBox textRoomID;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.Button btnExit;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Button btnSearch;
		private System.Windows.Forms.TextBox textRemark;
		private System.Windows.Forms.ListView listView1;
		private System.Windows.Forms.ColumnHeader columnHeader1;
		private System.Windows.Forms.ColumnHeader columnHeader2;
		private System.Windows.Forms.ColumnHeader columnHeader3;
		private System.Windows.Forms.ColumnHeader columnHeader4;
		private System.Windows.Forms.ColumnHeader columnHeader5;
		private System.Windows.Forms.ColumnHeader columnHeader6;

		private string selectStr;
		private SqlCommand sqlCommand1=null;
		private SqlDataReader sqlDataReader1=null;
		private SqlConnection sqlConnection1;
		private System.Windows.Forms.ComboBox comboRoomType;
		private System.Windows.Forms.ComboBox comboRoomPosition;
		private System.Windows.Forms.ComboBox comboPeopleNum;
		private System.Windows.Forms.ComboBox comboFactPeopleNum;
		private System.Windows.Forms.Button btnBookIn;
		private System.Windows.Forms.Button btnEmptyRoom;
		private System.Windows.Forms.Button btnNotFull;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public RoomSearch()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			this.sqlConnection1=new SqlConnection(HotelManage.Connection.ConnString);
			this.sqlCommand1=new SqlCommand();
			this.sqlCommand1.Connection=this.sqlConnection1;


			//
			// 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.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(RoomSearch));
			this.label5 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.textRoomID = new System.Windows.Forms.TextBox();
			this.btnNotFull = new System.Windows.Forms.Button();
			this.btnEmptyRoom = new System.Windows.Forms.Button();
			this.btnBookIn = new System.Windows.Forms.Button();
			this.btnSearch = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.btnExit = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.comboFactPeopleNum = new System.Windows.Forms.ComboBox();
			this.comboPeopleNum = new System.Windows.Forms.ComboBox();
			this.comboRoomPosition = new System.Windows.Forms.ComboBox();
			this.comboRoomType = new System.Windows.Forms.ComboBox();
			this.textRemark = new System.Windows.Forms.TextBox();
			this.listView1 = new System.Windows.Forms.ListView();
			this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// label5
			// 
			this.label5.BackColor = System.Drawing.Color.White;
			this.label5.Location = new System.Drawing.Point(16, 88);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(56, 25);
			this.label5.TabIndex = 11;
			this.label5.Text = "其他条件";
			this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label4
			// 
			this.label4.BackColor = System.Drawing.Color.White;
			this.label4.Location = new System.Drawing.Point(144, 56);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(56, 25);
			this.label4.TabIndex = 10;
			this.label4.Text = "实际人数";
			this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label3
			// 
			this.label3.BackColor = System.Drawing.Color.White;
			this.label3.Location = new System.Drawing.Point(16, 56);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(60, 25);
			this.label3.TabIndex = 9;
			this.label3.Text = "额定人数";
			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label6
			// 
			this.label6.BackColor = System.Drawing.Color.White;
			this.label6.Location = new System.Drawing.Point(296, 24);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(60, 25);
			this.label6.TabIndex = 6;
			this.label6.Text = "房间楼层";
			this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label2
			// 
			this.label2.BackColor = System.Drawing.Color.White;
			this.label2.Location = new System.Drawing.Point(144, 24);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(56, 25);
			this.label2.TabIndex = 2;
			this.label2.Text = "房间类型";
			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label1
			// 
			this.label1.BackColor = System.Drawing.Color.White;
			this.label1.Location = new System.Drawing.Point(16, 24);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(48, 25);
			this.label1.TabIndex = 1;
			this.label1.Text = "房间号";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// textRoomID
			// 
			this.textRoomID.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.textRoomID.Location = new System.Drawing.Point(72, 24);
			this.textRoomID.Multiline = true;
			this.textRoomID.Name = "textRoomID";
			this.textRoomID.Size = new System.Drawing.Size(68, 20);
			this.textRoomID.TabIndex = 0;
			this.textRoomID.Text = "";
			// 
			// btnNotFull
			// 
			this.btnNotFull.BackColor = System.Drawing.Color.LightGray;
			this.btnNotFull.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnNotFull.ForeColor = System.Drawing.SystemColors.Desktop;
			this.btnNotFull.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnNotFull.Location = new System.Drawing.Point(176, 120);
			this.btnNotFull.Name = "btnNotFull";
			this.btnNotFull.Size = new System.Drawing.Size(56, 24);
			this.btnNotFull.TabIndex = 23;
			this.btnNotFull.Text = "未满";
			this.btnNotFull.Click += new System.EventHandler(this.btnNotFull_Click);
			// 
			// btnEmptyRoom
			// 
			this.btnEmptyRoom.BackColor = System.Drawing.Color.LightGray;
			this.btnEmptyRoom.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnEmptyRoom.ForeColor = System.Drawing.SystemColors.Desktop;
			this.btnEmptyRoom.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnEmptyRoom.Location = new System.Drawing.Point(104, 120);
			this.btnEmptyRoom.Name = "btnEmptyRoom";
			this.btnEmptyRoom.Size = new System.Drawing.Size(56, 24);
			this.btnEmptyRoom.TabIndex = 22;
			this.btnEmptyRoom.Text = "空房";
			this.btnEmptyRoom.Click += new System.EventHandler(this.btnEmptyRoom_Click);
			// 
			// btnBookIn
			// 
			this.btnBookIn.BackColor = System.Drawing.Color.LightGray;
			this.btnBookIn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnBookIn.ForeColor = System.Drawing.SystemColors.Desktop;
			this.btnBookIn.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnBookIn.Location = new System.Drawing.Point(328, 120);
			this.btnBookIn.Name = "btnBookIn";
			this.btnBookIn.Size = new System.Drawing.Size(56, 24);
			this.btnBookIn.TabIndex = 21;
			this.btnBookIn.Text = "入住";
			this.btnBookIn.Click += new System.EventHandler(this.btnBookIn_Click);
			// 
			// btnSearch
			// 
			this.btnSearch.BackColor = System.Drawing.Color.LightGray;
			this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnSearch.ForeColor = System.Drawing.SystemColors.Desktop;
			this.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnSearch.Location = new System.Drawing.Point(32, 120);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new System.Drawing.Size(56, 24);
			this.btnSearch.TabIndex = 20;
			this.btnSearch.Text = "查找";
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// btnCancel
			// 
			this.btnCancel.BackColor = System.Drawing.Color.LightGray;
			this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnCancel.Location = new System.Drawing.Point(256, 121);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.Size = new System.Drawing.Size(56, 23);
			this.btnCancel.TabIndex = 16;
			this.btnCancel.Text = "取消";
			this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
			// 
			// btnExit
			// 
			this.btnExit.BackColor = System.Drawing.Color.LightGray;
			this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnExit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnExit.Location = new System.Drawing.Point(192, 408);
			this.btnExit.Name = "btnExit";
			this.btnExit.Size = new System.Drawing.Size(56, 23);
			this.btnExit.TabIndex = 15;
			this.btnExit.Text = "退出";
			this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
			// 
			// groupBox1
			// 
			this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
			this.groupBox1.Controls.Add(this.comboFactPeopleNum);
			this.groupBox1.Controls.Add(this.comboPeopleNum);
			this.groupBox1.Controls.Add(this.comboRoomPosition);
			this.groupBox1.Controls.Add(this.comboRoomType);
			this.groupBox1.Controls.Add(this.textRemark);
			this.groupBox1.Controls.Add(this.label5);
			this.groupBox1.Controls.Add(this.label4);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.textRoomID);
			this.groupBox1.Controls.Add(this.btnSearch);
			this.groupBox1.Controls.Add(this.btnEmptyRoom);
			this.groupBox1.Controls.Add(this.btnNotFull);
			this.groupBox1.Controls.Add(this.btnCancel);
			this.groupBox1.Controls.Add(this.btnBookIn);
			this.groupBox1.ForeColor = System.Drawing.SystemColors.Desktop;
			this.groupBox1.Location = new System.Drawing.Point(8, 0);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(432, 152);
			this.groupBox1.TabIndex = 20;
			this.groupBox1.TabStop = false;

⌨️ 快捷键说明

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