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

📄 frmroomquery.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.Odbc;

namespace HotelApp
{
	/// <summary>
	/// frmRoomQuery 的摘要说明。
	/// </summary>
	public class frmRoomQuery : System.Windows.Forms.Form
	{
		protected DBService_2 dbcon3;
		protected DataSet dsQuery;
		protected DataTable dtQuery;

		private System.Windows.Forms.TreeView tvwRoom;
		private System.Windows.Forms.TabControl tabControl1;
		private System.Windows.Forms.TabPage tabPage1;
		private System.Windows.Forms.TabPage tabPage2;
		private System.Windows.Forms.TabPage tabPage3;
		private System.Windows.Forms.DataGrid dataGrid1;
		private System.Windows.Forms.DataGrid dataGrid2;
		private System.Windows.Forms.DataGrid dataGrid3;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label LabelCancel;
		private System.Windows.Forms.Label LabelRoomPrice;
		private System.Windows.Forms.Label LabelRoomNum;

		private DataRow row;
		private System.Windows.Forms.TextBox txtRoomNum;
		private System.Windows.Forms.TextBox txtRoomPrice;
		private System.Windows.Forms.TextBox txtCancel;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Button btnEditHotel;
		private System.Windows.Forms.Button btnEditRoom;
		private System.Windows.Forms.Button btnSaveRoom;
		private System.Windows.Forms.Button btnClose;
		private System.Windows.Forms.Button btnAddRoom;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.Button btnEditService;
		private System.Windows.Forms.Button btnEditAva;
		private System.Windows.Forms.Button btnAddAva;

		private int rid=-1;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmRoomQuery()
		{
			//
			// 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()
		{
			this.tvwRoom = new System.Windows.Forms.TreeView();
			this.tabControl1 = new System.Windows.Forms.TabControl();
			this.tabPage1 = new System.Windows.Forms.TabPage();
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			this.btnEditService = new System.Windows.Forms.Button();
			this.tabPage2 = new System.Windows.Forms.TabPage();
			this.btnEditAva = new System.Windows.Forms.Button();
			this.dataGrid2 = new System.Windows.Forms.DataGrid();
			this.tabPage3 = new System.Windows.Forms.TabPage();
			this.dataGrid3 = new System.Windows.Forms.DataGrid();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.btnCancel = new System.Windows.Forms.Button();
			this.btnSaveRoom = new System.Windows.Forms.Button();
			this.btnEditRoom = new System.Windows.Forms.Button();
			this.label3 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.txtCancel = new System.Windows.Forms.TextBox();
			this.txtRoomPrice = new System.Windows.Forms.TextBox();
			this.txtRoomNum = new System.Windows.Forms.TextBox();
			this.LabelCancel = new System.Windows.Forms.Label();
			this.LabelRoomPrice = new System.Windows.Forms.Label();
			this.LabelRoomNum = new System.Windows.Forms.Label();
			this.btnAddRoom = new System.Windows.Forms.Button();
			this.btnClose = new System.Windows.Forms.Button();
			this.btnEditHotel = new System.Windows.Forms.Button();
			this.btnAddAva = new System.Windows.Forms.Button();
			this.tabControl1.SuspendLayout();
			this.tabPage1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			this.tabPage2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).BeginInit();
			this.tabPage3.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid3)).BeginInit();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// tvwRoom
			// 
			this.tvwRoom.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left)));
			this.tvwRoom.ImageIndex = -1;
			this.tvwRoom.Location = new System.Drawing.Point(18, 15);
			this.tvwRoom.Name = "tvwRoom";
			this.tvwRoom.SelectedImageIndex = -1;
			this.tvwRoom.Size = new System.Drawing.Size(117, 411);
			this.tvwRoom.TabIndex = 1;
			this.tvwRoom.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvwRoom_AfterSelect);
			// 
			// tabControl1
			// 
			this.tabControl1.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.tabControl1.Controls.Add(this.tabPage1);
			this.tabControl1.Controls.Add(this.tabPage2);
			this.tabControl1.Controls.Add(this.tabPage3);
			this.tabControl1.Location = new System.Drawing.Point(150, 114);
			this.tabControl1.Name = "tabControl1";
			this.tabControl1.SelectedIndex = 0;
			this.tabControl1.Size = new System.Drawing.Size(515, 279);
			this.tabControl1.TabIndex = 9;
			// 
			// tabPage1
			// 
			this.tabPage1.Controls.Add(this.dataGrid1);
			this.tabPage1.Controls.Add(this.btnEditService);
			this.tabPage1.Location = new System.Drawing.Point(4, 21);
			this.tabPage1.Name = "tabPage1";
			this.tabPage1.Size = new System.Drawing.Size(507, 254);
			this.tabPage1.TabIndex = 0;
			this.tabPage1.Text = "客房服务项目";
			// 
			// dataGrid1
			// 
			this.dataGrid1.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.dataGrid1.DataMember = "";
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.Location = new System.Drawing.Point(14, 14);
			this.dataGrid1.Name = "dataGrid1";
			this.dataGrid1.ReadOnly = true;
			this.dataGrid1.Size = new System.Drawing.Size(480, 202);
			this.dataGrid1.TabIndex = 0;
			// 
			// btnEditService
			// 
			this.btnEditService.Location = new System.Drawing.Point(339, 222);
			this.btnEditService.Name = "btnEditService";
			this.btnEditService.TabIndex = 26;
			this.btnEditService.Text = "编辑";
			this.btnEditService.Click += new System.EventHandler(this.btnEditService_Click);
			// 
			// tabPage2
			// 
			this.tabPage2.Controls.Add(this.btnAddAva);
			this.tabPage2.Controls.Add(this.btnEditAva);
			this.tabPage2.Controls.Add(this.dataGrid2);
			this.tabPage2.Location = new System.Drawing.Point(4, 21);
			this.tabPage2.Name = "tabPage2";
			this.tabPage2.Size = new System.Drawing.Size(507, 254);
			this.tabPage2.TabIndex = 1;
			this.tabPage2.Text = "可预订客房信息";
			// 
			// btnEditAva
			// 
			this.btnEditAva.Location = new System.Drawing.Point(339, 222);
			this.btnEditAva.Name = "btnEditAva";
			this.btnEditAva.TabIndex = 1;
			this.btnEditAva.Text = "编辑";
			this.btnEditAva.Click += new System.EventHandler(this.btnEditAva_Click);
			// 
			// dataGrid2
			// 
			this.dataGrid2.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.dataGrid2.DataMember = "";
			this.dataGrid2.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid2.Location = new System.Drawing.Point(14, 14);
			this.dataGrid2.Name = "dataGrid2";
			this.dataGrid2.PreferredColumnWidth = 120;
			this.dataGrid2.ReadOnly = true;
			this.dataGrid2.Size = new System.Drawing.Size(480, 204);
			this.dataGrid2.TabIndex = 0;
			// 
			// tabPage3
			// 
			this.tabPage3.Controls.Add(this.dataGrid3);
			this.tabPage3.Location = new System.Drawing.Point(4, 21);
			this.tabPage3.Name = "tabPage3";
			this.tabPage3.Size = new System.Drawing.Size(507, 254);
			this.tabPage3.TabIndex = 2;
			this.tabPage3.Text = "已预订客房信息";
			// 
			// dataGrid3
			// 
			this.dataGrid3.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.dataGrid3.DataMember = "";
			this.dataGrid3.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid3.Location = new System.Drawing.Point(14, 14);
			this.dataGrid3.Name = "dataGrid3";
			this.dataGrid3.PreferredColumnWidth = 150;
			this.dataGrid3.ReadOnly = true;
			this.dataGrid3.Size = new System.Drawing.Size(480, 204);
			this.dataGrid3.TabIndex = 0;
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.btnCancel);
			this.groupBox1.Controls.Add(this.btnSaveRoom);
			this.groupBox1.Controls.Add(this.btnEditRoom);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.txtCancel);
			this.groupBox1.Controls.Add(this.txtRoomPrice);
			this.groupBox1.Controls.Add(this.txtRoomNum);
			this.groupBox1.Controls.Add(this.LabelCancel);
			this.groupBox1.Controls.Add(this.LabelRoomPrice);
			this.groupBox1.Controls.Add(this.LabelRoomNum);
			this.groupBox1.Location = new System.Drawing.Point(150, 9);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(513, 93);
			this.groupBox1.TabIndex = 10;
			this.groupBox1.TabStop = false;
			// 
			// btnCancel
			// 
			this.btnCancel.Location = new System.Drawing.Point(426, 60);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.TabIndex = 23;
			this.btnCancel.Text = "取消";
			this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
			// 
			// btnSaveRoom
			// 
			this.btnSaveRoom.Location = new System.Drawing.Point(426, 24);
			this.btnSaveRoom.Name = "btnSaveRoom";
			this.btnSaveRoom.TabIndex = 22;
			this.btnSaveRoom.Text = "保存";
			this.btnSaveRoom.Click += new System.EventHandler(this.btnSaveRoom_Click);
			// 
			// btnEditRoom
			// 
			this.btnEditRoom.Location = new System.Drawing.Point(426, 24);
			this.btnEditRoom.Name = "btnEditRoom";
			this.btnEditRoom.TabIndex = 21;
			this.btnEditRoom.Text = "修改";
			this.btnEditRoom.Click += new System.EventHandler(this.btnEditRoom_Click);
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(174, 69);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(15, 12);
			this.label3.TabIndex = 20;
			this.label3.Text = "天";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(271, 28);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(54, 12);
			this.label2.TabIndex = 19;
			this.label2.Text = "元/天/间";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(120, 27);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(15, 12);
			this.label1.TabIndex = 18;
			this.label1.Text = "间";
			// 
			// txtCancel
			// 
			this.txtCancel.Location = new System.Drawing.Point(132, 63);
			this.txtCancel.Name = "txtCancel";
			this.txtCancel.ReadOnly = true;
			this.txtCancel.Size = new System.Drawing.Size(39, 21);
			this.txtCancel.TabIndex = 17;
			this.txtCancel.Text = "";
			// 
			// txtRoomPrice
			// 
			this.txtRoomPrice.Location = new System.Drawing.Point(230, 23);
			this.txtRoomPrice.Name = "txtRoomPrice";
			this.txtRoomPrice.ReadOnly = true;
			this.txtRoomPrice.Size = new System.Drawing.Size(39, 21);
			this.txtRoomPrice.TabIndex = 16;
			this.txtRoomPrice.Text = "";
			// 
			// txtRoomNum
			// 
			this.txtRoomNum.Location = new System.Drawing.Point(78, 23);
			this.txtRoomNum.Name = "txtRoomNum";
			this.txtRoomNum.ReadOnly = true;

⌨️ 快捷键说明

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