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

📄 frmroomtype.cs

📁 采用C#和SQL Server 2000开发 功能比较全面的酒店管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;using System.Collections;using System.ComponentModel;using System.Drawing;using System.Windows.Forms;using System.Data;using System.Data.SqlClient;namespace 酒店管理系统{	public class frmRoomType : 酒店管理系统.frmBase	{
		internal System.Windows.Forms.GroupBox GroupBox1;
		internal System.Windows.Forms.CheckBox ckbPin;
		internal System.Windows.Forms.Label Label8;
		internal System.Windows.Forms.TextBox txbPinPrice;
		internal System.Windows.Forms.Label Label7;
		internal System.Windows.Forms.TextBox txbDays;
		internal System.Windows.Forms.Label Label6;
		internal System.Windows.Forms.TextBox txbPrice;
		internal System.Windows.Forms.Label Label5;
		internal System.Windows.Forms.TextBox txbName;
		internal System.Windows.Forms.Label Label4;
		internal System.Windows.Forms.TextBox txbCode;
		private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
		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 sqlConnection1;
		private 酒店管理系统.DataSet1 dataSet11;		private System.ComponentModel.IContainer components = null;		public frmRoomType()		{			// 该调用是 Windows 窗体设计器所必需的。			InitializeComponent();			// TODO: 在 InitializeComponent 调用后添加任何初始化		}		/// <summary>		/// 清理所有正在使用的资源。		/// </summary>		protected override void Dispose( bool disposing )		{			if( disposing )			{				if (components != null) 				{					components.Dispose();				}			}			base.Dispose( disposing );		}		#region 设计器生成的代码		/// <summary>		/// 设计器支持所需的方法 - 不要使用代码编辑器修改		/// 此方法的内容。		/// </summary>		private void InitializeComponent()		{			this.GroupBox1 = new System.Windows.Forms.GroupBox();
			this.ckbPin = new System.Windows.Forms.CheckBox();
			this.Label8 = new System.Windows.Forms.Label();
			this.txbPinPrice = new System.Windows.Forms.TextBox();
			this.Label7 = new System.Windows.Forms.Label();
			this.txbDays = new System.Windows.Forms.TextBox();
			this.Label6 = new System.Windows.Forms.Label();
			this.txbPrice = new System.Windows.Forms.TextBox();
			this.Label5 = new System.Windows.Forms.Label();
			this.txbName = new System.Windows.Forms.TextBox();
			this.Label4 = new System.Windows.Forms.Label();
			this.txbCode = new System.Windows.Forms.TextBox();
			this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection1 = 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.dataSet11 = new 酒店管理系统.DataSet1();
			((System.ComponentModel.ISupportInitialize)(this.dgdList)).BeginInit();
			this.GroupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
			this.SuspendLayout();
			// 
			// dgdList
			// 
			this.dgdList.Location = new System.Drawing.Point(0, 89);
			this.dgdList.Name = "dgdList";
			this.dgdList.Size = new System.Drawing.Size(502, 82);
			// 
			// GroupBox1
			// 
			this.GroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.GroupBox1.Controls.Add(this.ckbPin);
			this.GroupBox1.Controls.Add(this.Label8);
			this.GroupBox1.Controls.Add(this.txbPinPrice);
			this.GroupBox1.Controls.Add(this.Label7);
			this.GroupBox1.Controls.Add(this.txbDays);
			this.GroupBox1.Controls.Add(this.Label6);
			this.GroupBox1.Controls.Add(this.txbPrice);
			this.GroupBox1.Controls.Add(this.Label5);
			this.GroupBox1.Controls.Add(this.txbName);
			this.GroupBox1.Controls.Add(this.Label4);
			this.GroupBox1.Controls.Add(this.txbCode);
			this.GroupBox1.Location = new System.Drawing.Point(0, 171);
			this.GroupBox1.Name = "GroupBox1";
			this.GroupBox1.Size = new System.Drawing.Size(507, 82);
			this.GroupBox1.TabIndex = 7;
			this.GroupBox1.TabStop = false;
			// 
			// ckbPin
			// 
			this.ckbPin.Checked = true;
			this.ckbPin.CheckState = System.Windows.Forms.CheckState.Checked;
			this.ckbPin.Location = new System.Drawing.Point(267, 44);
			this.ckbPin.Name = "ckbPin";
			this.ckbPin.Size = new System.Drawing.Size(101, 22);
			this.ckbPin.TabIndex = 10;
			this.ckbPin.Text = "是否可拼房";
			// 
			// Label8
			// 
			this.Label8.Location = new System.Drawing.Point(13, 49);
			this.Label8.Name = "Label8";
			this.Label8.Size = new System.Drawing.Size(47, 15);
			this.Label8.TabIndex = 9;
			this.Label8.Text = "拼房价格";
			// 
			// txbPinPrice
			// 
			this.txbPinPrice.Location = new System.Drawing.Point(59, 45);
			this.txbPinPrice.Name = "txbPinPrice";
			this.txbPinPrice.Size = new System.Drawing.Size(61, 20);
			this.txbPinPrice.TabIndex = 8;
			this.txbPinPrice.Text = "";
			// 
			// Label7
			// 
			this.Label7.Location = new System.Drawing.Point(129, 49);
			this.Label7.Name = "Label7";
			this.Label7.Size = new System.Drawing.Size(58, 15);
			this.Label7.TabIndex = 7;
			this.Label7.Text = "可超预定数";
			// 
			// txbDays
			// 
			this.txbDays.Location = new System.Drawing.Point(187, 45);
			this.txbDays.Name = "txbDays";
			this.txbDays.Size = new System.Drawing.Size(60, 20);
			this.txbDays.TabIndex = 6;
			this.txbDays.Text = "";
			// 
			// Label6
			// 
			this.Label6.Location = new System.Drawing.Point(267, 19);
			this.Label6.Name = "Label6";
			this.Label6.Size = new System.Drawing.Size(26, 14);
			this.Label6.TabIndex = 5;
			this.Label6.Text = "价格";
			// 
			// txbPrice
			// 
			this.txbPrice.Location = new System.Drawing.Point(293, 12);
			this.txbPrice.Name = "txbPrice";
			this.txbPrice.Size = new System.Drawing.Size(61, 20);
			this.txbPrice.TabIndex = 4;
			this.txbPrice.Text = "";
			// 
			// Label5
			// 
			this.Label5.Location = new System.Drawing.Point(140, 19);
			this.Label5.Name = "Label5";
			this.Label5.Size = new System.Drawing.Size(47, 14);
			this.Label5.TabIndex = 3;
			this.Label5.Text = "类型名称";
			// 
			// txbName
			// 
			this.txbName.Location = new System.Drawing.Point(187, 12);
			this.txbName.Name = "txbName";
			this.txbName.Size = new System.Drawing.Size(60, 20);
			this.txbName.TabIndex = 2;
			this.txbName.Text = "";
			// 
			// Label4
			// 
			this.Label4.Location = new System.Drawing.Point(13, 19);
			this.Label4.Name = "Label4";
			this.Label4.Size = new System.Drawing.Size(47, 14);
			this.Label4.TabIndex = 1;
			this.Label4.Text = "类型编号";
			// 
			// txbCode
			// 
			this.txbCode.Location = new System.Drawing.Point(59, 12);
			this.txbCode.Name = "txbCode";
			this.txbCode.Size = new System.Drawing.Size(61, 20);
			this.txbCode.TabIndex = 0;
			this.txbCode.Text = "";
			// 
			// sqlDataAdapter1
			// 
			this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
			this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
			this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
			this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																									  new System.Data.Common.DataTableMapping("Table", "客房类型", new System.Data.Common.DataColumnMapping[] {
																																																			  new System.Data.Common.DataColumnMapping("类型编号", "类型编号"),
																																																			  new System.Data.Common.DataColumnMapping("类型名称", "类型名称"),
																																																			  new System.Data.Common.DataColumnMapping("价格", "价格"),
																																																			  new System.Data.Common.DataColumnMapping("拼房价格", "拼房价格"),
																																																			  new System.Data.Common.DataColumnMapping("可超预定数", "可超预定数"),
																																																			  new System.Data.Common.DataColumnMapping("是否可拼房", "是否可拼房")})});
			this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
			// 
			// sqlDeleteCommand1
			// 
			this.sqlDeleteCommand1.CommandText = @"DELETE FROM 客房类型 WHERE (类型编号 = @Original_类型编号) AND (价格 = @Original_价格 OR @Original_价格 IS NULL AND 价格 IS NULL) AND (可超预定数 = @Original_可超预定数 OR @Original_可超预定数 IS NULL AND 可超预定数 IS NULL) AND (拼房价格 = @Original_拼房价格 OR @Original_拼房价格 IS NULL AND 拼房价格 IS NULL) AND (是否可拼房 = @Original_是否可拼房 OR @Original_是否可拼房 IS NULL AND 是否可拼房 IS NULL) AND (类型名称 = @Original_类型名称 OR @Original_类型名称 IS NULL AND 类型名称 IS NULL)";
			this.sqlDeleteCommand1.Connection = this.sqlConnection1;
			this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_类型编号", System.Data.SqlDbType.VarChar, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "类型编号", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_价格", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "价格", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_可超预定数", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(3)), ((System.Byte)(0)), "可超预定数", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_拼房价格", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "拼房价格", System.Data.DataRowVersion.Original, null));

⌨️ 快捷键说明

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