📄 roomfindform.cs
字号:
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 RoomFindForm : 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 btnExit;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnSearch;
private System.Windows.Forms.TextBox textRemark;
private string selectStr;
private DataSet ds=null;
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 btnEmptyRoom;
private System.Windows.Forms.Button btnNotFull;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.Button button1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public RoomFindForm()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.sqlConnection1=new SqlConnection(HotelManage.util.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()
{
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.btnEmptyRoom = new System.Windows.Forms.Button();
this.btnSearch = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
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.btnNotFull = new System.Windows.Forms.Button();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.SuspendLayout();
//
// label5
//
this.label5.BackColor = System.Drawing.Color.Transparent;
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.Transparent;
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.Transparent;
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.Transparent;
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.Transparent;
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.Transparent;
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 = "";
//
// btnEmptyRoom
//
this.btnEmptyRoom.BackColor = System.Drawing.Color.Transparent;
this.btnEmptyRoom.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnEmptyRoom.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnEmptyRoom.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnEmptyRoom.Location = new System.Drawing.Point(304, 88);
this.btnEmptyRoom.Name = "btnEmptyRoom";
this.btnEmptyRoom.Size = new System.Drawing.Size(120, 24);
this.btnEmptyRoom.TabIndex = 22;
this.btnEmptyRoom.Text = "空房";
this.btnEmptyRoom.Click += new System.EventHandler(this.btnEmptyRoom_Click);
//
// btnSearch
//
this.btnSearch.BackColor = System.Drawing.Color.Transparent;
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnSearch.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnSearch.Location = new System.Drawing.Point(304, 56);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(120, 24);
this.btnSearch.TabIndex = 20;
this.btnSearch.Text = "查找";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// btnExit
//
this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnExit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnExit.Location = new System.Drawing.Point(440, 88);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(120, 23);
this.btnExit.TabIndex = 15;
this.btnExit.Text = "退出";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button1);
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.btnExit);
this.groupBox1.Controls.Add(this.btnSearch);
this.groupBox1.Controls.Add(this.btnEmptyRoom);
this.groupBox1.Controls.Add(this.btnNotFull);
this.groupBox1.ForeColor = System.Drawing.SystemColors.ControlText;
this.groupBox1.Location = new System.Drawing.Point(8, 16);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -