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

📄 fjcx.cs

📁 c#语音酒店管理的毕业设计 适合于初级水平的学习
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace 中小型酒店管理信息系统
{
	/// <summary>
	/// fjcx 的摘要说明。
	/// </summary>
	public class fjcx : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.ComboBox comboBox1;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.RichTextBox richTextBox1;
		private System.Windows.Forms.RichTextBox richTextBox2;
		private System.Windows.Forms.RichTextBox richTextBox3;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.TextBox textBox3;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label8;
		private DataSet ds = new DataSet();
		private LinkDataBase link = new LinkDataBase();
		private DataSet ds2 = new DataSet();
		private LinkDataBase link2 = new LinkDataBase();
		private System.Windows.Forms.Label label9;	
		
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public fjcx()
		{
			//
			// 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.label1 = new System.Windows.Forms.Label();
			this.comboBox1 = new System.Windows.Forms.ComboBox();
			this.button1 = new System.Windows.Forms.Button();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.label5 = new System.Windows.Forms.Label();
			this.richTextBox1 = new System.Windows.Forms.RichTextBox();
			this.richTextBox2 = new System.Windows.Forms.RichTextBox();
			this.richTextBox3 = new System.Windows.Forms.RichTextBox();
			this.label6 = new System.Windows.Forms.Label();
			this.textBox3 = new System.Windows.Forms.TextBox();
			this.label7 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.label9 = new System.Windows.Forms.Label();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(88, 32);
			this.label1.Name = "label1";
			this.label1.TabIndex = 0;
			this.label1.Text = "选择房间编号";
			// 
			// comboBox1
			// 
			this.comboBox1.Location = new System.Drawing.Point(184, 32);
			this.comboBox1.Name = "comboBox1";
			this.comboBox1.Size = new System.Drawing.Size(121, 20);
			this.comboBox1.TabIndex = 1;
			this.comboBox1.Text = "comboBox1";
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(352, 32);
			this.button1.Name = "button1";
			this.button1.TabIndex = 2;
			this.button1.Text = "确定";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// label2
			// 
			this.label2.ForeColor = System.Drawing.Color.Brown;
			this.label2.Location = new System.Drawing.Point(184, 80);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(56, 16);
			this.label2.TabIndex = 3;
			this.label2.Text = "label2";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(32, 120);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(56, 16);
			this.label3.TabIndex = 4;
			this.label3.Text = "类型编号";
			// 
			// textBox1
			// 
			this.textBox1.Enabled = false;
			this.textBox1.Location = new System.Drawing.Point(96, 112);
			this.textBox1.Name = "textBox1";
			this.textBox1.TabIndex = 5;
			this.textBox1.Text = "textBox1";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(280, 112);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(32, 16);
			this.label4.TabIndex = 6;
			this.label4.Text = "房态";
			// 
			// textBox2
			// 
			this.textBox2.Enabled = false;
			this.textBox2.Location = new System.Drawing.Point(336, 112);
			this.textBox2.Name = "textBox2";
			this.textBox2.TabIndex = 7;
			this.textBox2.Text = "textBox2";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(32, 152);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(40, 16);
			this.label5.TabIndex = 8;
			this.label5.Text = "配置";
			// 
			// richTextBox1
			// 
			this.richTextBox1.Enabled = false;
			this.richTextBox1.Location = new System.Drawing.Point(88, 152);
			this.richTextBox1.Name = "richTextBox1";
			this.richTextBox1.Size = new System.Drawing.Size(376, 48);
			this.richTextBox1.TabIndex = 9;
			this.richTextBox1.Text = "richTextBox1";
			// 
			// richTextBox2
			// 
			this.richTextBox2.Enabled = false;
			this.richTextBox2.Location = new System.Drawing.Point(88, 224);
			this.richTextBox2.Name = "richTextBox2";
			this.richTextBox2.Size = new System.Drawing.Size(376, 48);
			this.richTextBox2.TabIndex = 10;
			this.richTextBox2.Text = "richTextBox2";
			// 
			// richTextBox3
			// 
			this.richTextBox3.Enabled = false;
			this.richTextBox3.Location = new System.Drawing.Point(88, 296);
			this.richTextBox3.Name = "richTextBox3";
			this.richTextBox3.Size = new System.Drawing.Size(376, 48);
			this.richTextBox3.TabIndex = 11;
			this.richTextBox3.Text = "richTextBox3";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(264, 80);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(56, 16);
			this.label6.TabIndex = 12;
			this.label6.Text = "营业时间";
			// 
			// textBox3
			// 
			this.textBox3.Enabled = false;
			this.textBox3.Location = new System.Drawing.Point(336, 80);
			this.textBox3.Name = "textBox3";
			this.textBox3.TabIndex = 13;
			this.textBox3.Text = "textBox3";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(16, 224);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(56, 23);
			this.label7.TabIndex = 14;
			this.label7.Text = "使用设置";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(32, 296);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(32, 16);
			this.label8.TabIndex = 15;
			this.label8.Text = "备注";
			// 
			// label9
			// 
			this.label9.Location = new System.Drawing.Point(24, 80);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(152, 16);
			this.label9.TabIndex = 16;
			this.label9.Text = "label9";
			// 
			// fjcx
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(492, 373);
			this.Controls.Add(this.label9);
			this.Controls.Add(this.label8);
			this.Controls.Add(this.label7);
			this.Controls.Add(this.textBox3);
			this.Controls.Add(this.label6);
			this.Controls.Add(this.richTextBox3);
			this.Controls.Add(this.richTextBox2);
			this.Controls.Add(this.richTextBox1);
			this.Controls.Add(this.label5);
			this.Controls.Add(this.textBox2);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.textBox1);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.button1);
			this.Controls.Add(this.comboBox1);
			this.Controls.Add(this.label1);
			this.Name = "fjcx";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "【房间查询】";
			this.Load += new System.EventHandler(this.fjcx_Load);
			this.ResumeLayout(false);

		}
		#endregion

		private void button1_Click(object sender, System.EventArgs e)
		{
			string sendTableName = "jud_kfxx";
			string kong=comboBox1.Text;
			string sendStrSQL ="select fjh,lxbh,ft,pz,sypz,yysj,bz from jud_kfxx where fjh='"+kong+"'";
			this.ds2 = this.link2.SelectDataBase(sendStrSQL,sendTableName);
            label9.Text="您选择的房间编号是-----";
            label2.DataBindings.Add("Text",ds2,"jud_kfxx.fjh");
			textBox1.DataBindings.Add("Text",ds2,"jud_kfxx.lxbh");
			textBox2.DataBindings.Add("Text",ds2,"jud_kfxx.ft");
			textBox3.DataBindings.Add("Text",ds2,"jud_kfxx.yysj");
			richTextBox1.DataBindings.Add("Text",ds2,"jud_kfxx.pz");
            richTextBox2.DataBindings.Add("Text",ds2,"jud_kfxx.sypz");
		    richTextBox3.DataBindings.Add("Text",ds2,"jud_kfxx.bz");
		}
		private void scfjh() //生成房间号
		{
			string sendTableName = "jud_kfxx";
			
			string sendStrSQL ="select fjh from jud_kfxx ";
			this.ds = this.link.SelectDataBase(sendStrSQL,sendTableName);
			comboBox1.DataSource = ds.Tables[sendTableName];
			comboBox1.DisplayMember = "fjh";
		}
		private void fjcx_Load(object sender, System.EventArgs e)
		{
          scfjh();
		  label2.Text= label9.Text=textBox1.Text=textBox2.Text=textBox3.Text=richTextBox1.Text=richTextBox2.Text=richTextBox3.Text="";
		}
	}
}

⌨️ 快捷键说明

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