RoomTypeForm.cs ( File view )

  • By 洒脱 2014-10-28
  • View(s):73
  • Download(s):1
  • Point(s): 1
			using System;                             //roomtypeform对数据库的操作,借助于ROOMtypemanage类的对象的数据成员及函数成员
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;


namespace HotelManage
{

	/// <summary>
	/// Form2 的摘要说明。
	/// </summary>
	public class RoomTypeForm : System.Windows.Forms.Form
	{

		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;		
		private System.Windows.Forms.Panel panel1;
		private string selectStr;
		private SqlConnection sqlConnection1;
		private SqlCommand sqlCommand1=null;
		private SqlDataReader sqlDataReader1=null;
		private bool add;
			private DataSet ds= null;
		private System.Windows.Forms.Button btnNew;
		private System.Windows.Forms.Button btnSave;
		private System.Windows.Forms.TextBox textPrice;
		private System.Windows.Forms.TextBox textBedNum;
		private System.Windows.Forms.TextBox textArea;
		private System.Windows.Forms.TextBox textTypeName;
		private System.Windows.Forms.CheckBox checkAirCondition;
		private System.Windows.Forms.CheckBox checkTelephone;
		private System.Windows.Forms.CheckBox checkToilet;
		private System.Windows.Forms.CheckBox checkTV;
		HotelManage.RoomTypeManage roomtypeManage;
		private System.Windows.Forms.DataGrid dataGrid1;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;

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

		public RoomTypeForm()
		{

			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			this.sqlConnection1=new SqlConnection(HotelManage.util.Connection.ConnString);
			this.sqlCommand1=new SqlCommand();
			this.sqlCommand1.Connection=this.sqlConnection1;
			this.add=false;
			roomtypeManage=new HotelManage.RoomTypeManage();

			//
			// 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.checkAirCondition = new System.Windows.Forms.CheckBox();
			this.checkTelephone = new System.Windows.Forms.CheckBox();
			this.label5 = new System.Windows.Forms.Label();
			this.textPrice = new System.Windows.Forms.TextBox();
			this.checkToilet = new System.Windows.Forms.CheckBox();
			this.checkTV = new System.Windows.Forms.CheckBox();
			this.textBedNum = new System.Windows.Forms.TextBox();
			this.textArea = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.textTypeName = new System.Windows.Forms.TextBox();
			this.panel1 = new System.Windows.Forms.Panel();
			this.button2 = new System.Windows.Forms.Button();
			this.btnNew = new System.Windows.Forms.Button();
			this.btnSave = new System.Windows.Forms.Button();
			this.button1 = new System.Windows.Forms.Button();
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			this.panel1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			this.SuspendLayout();
			// 
			// checkAirCondition
			// 
			this.checkAirCondition.Location = new System.Drawing.Point(360, 8);
			this.checkAirCondition.Name = "checkAirCondition";
			this.checkAirCondition.Size = new System.Drawing.Size(64, 24);
			this.checkAirCondition.TabIndex = 1;
			this.checkAirCondition.Text = "空调";
			// 
			// checkTelephone
			// 
			this.checkTelephone.Location = new System.Drawing.Point(280, 48);
			this.checkTelephone.Name = "checkTelephone";
			this.checkTelephone.Size = new System.Drawing.Size(64, 24);
			this.checkTelephone.TabIndex = 15;
			this.checkTelephone.Text = "电话";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(120, 40);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(32, 23);
			this.label5.TabIndex = 14;
			this.label5.Text = "价钱";
			// 
			// textPrice
			// 
			this.textPrice.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.textPrice.Location = new System.Drawing.Point(168, 40);
			this.textPrice.Name = "textPrice";
			this.textPrice.Size = new System.Drawing.Size(72, 21);
			this.textPrice.TabIndex = 13;
			this.textPrice.Text = "";
			// 
			// checkToilet
			// 
			this.checkToilet.Location = new System.Drawing.Point(360, 48);
			this.checkToilet.Name = "checkToilet";
			this.checkToilet.Size = new System.Drawing.Size(64, 24);
			this.checkToilet.TabIndex = 12;
			this.checkToilet.Text = "卫生间";
			// 
			// checkTV
			// 
			this.checkTV.Location = new System.Drawing.Point(280, 8);
			this.checkTV.Name = "checkTV";
			this.checkTV.Size = new System.Drawing.Size(64, 24);
			this.checkTV.TabIndex = 11;
			this.checkTV.Text = "电视";
			// 
			// textBedNum
			// 
			this.textBedNum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.textBedNum.Location = new System.Drawing.Point(40, 40);
			this.textBedNum.Name = "textBedNum";
			this.textBedNum.Size = new System.Drawing.Size(72, 21);
			this.textBedNum.TabIndex = 10;
			this.textBedNum.Text = "";
			// 
			// textArea
			// 
			this.textArea.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.textArea.Location = new System.Drawing.Point(168, 8);
			this.textArea.Name = "textArea";
			this.textArea.Size = new System.Drawing.Size(72, 21);
			this.textArea.TabIndex = 9;
			this.textArea.Text = "";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(8, 40);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(32, 23);
			this.label4.TabIndex = 6;
			this.label4.Text = "床位";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(120, 16);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(32, 23);
			this.label3.TabIndex = 5;
			this.label3.Text = "面积";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(8, 8);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(32, 23);
			this.label2.TabIndex = 4;
			this.label2.Text = "名称";
			// 
			// textTypeName
			// 
			this.textTypeName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.textTypeName.Location = new System.Drawing.Point(40, 8);
			this.textTypeName.Name = "textTypeName";
			this.textTypeName.Size = new System.Drawing.Size(72, 21);
			this.textTypeName.TabIndex = 2;
			this.textTypeName.Text = "";
			// 
			// panel1
			// 
			this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.panel1.Controls.Add(this.button2);
			this.panel1.Controls.Add(this.label4);
			this.panel1.Controls.Add(this.label3);
			this.panel1.Controls.Add(this.checkTelephone);
			this.panel1.Controls.Add(this.label2);
			this.panel1.Controls.Add(this.label5);
			this.panel1.Controls.Add(this.textPrice);
			this.panel1.Controls.Add(this.textTypeName);
			this.panel1.Controls.Add(this.checkToilet);
			this.panel1.Controls.Add(this.checkTV);
			this.panel1.Controls.Add(this.textBedNum);
			this.panel1.Controls.Add(this.textArea);
			this.panel1.Controls.Add(this.checkAirCondition);
			this.panel1.Controls.Add(this.btnNew);
			this.panel1.Controls.Add(this.btnSave);
			this.panel1.Controls.Add(this.button1);
			this.panel1.ForeColor = System.Drawing.SystemColors.Desktop;
			this.panel1.Location = new System.Drawing.Point(16, 16);
			this.panel1.Name = "panel1";
			this.panel1.Size = new System.Drawing.Size(528, 104);
			this.panel1.TabIndex = 16;
			// 
			// button2
			// 
			this.button2.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button2.Location = new System.Drawing.Point(168, 72);
			this.button2.Name = "button2";
			this.button2.TabIndex = 20;
			this.button2.Text = "删除";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// btnNew
			// 
			this.btnNew.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnNew.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnNew.Location = new System.Drawing.Point(432, 8);
			this.btnNew.Name = "btnNew";
			this.btnNew.Size = new System.Drawing.Size(56, 24);
			this.btnNew.TabIndex = 18;
			this.btnNew.Text = "新建";
			this.btnNew.Click += new System.EventHandler(this.btnNew_Click);
			// 
			// btnSave
			// 
			this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnSave.Location = new System.Drawing.Point(432, 40);
			this.btnSave.Name = "btnSave";
			this.btnSave.Size = new System.Drawing.Size(56, 24);
			this.btnSave.TabIndex = 17;
			this.btnSave.Text = "保存";
			this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
			// 
			// button1
			// 
			this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.button1.Location = new System.Drawing.Point(40, 72);
			this.button1.Name = "button1";
			this.button1.TabIndex = 19;
			this.button1.Text = "修改";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// dataGrid1
			// 
			this.dataGrid1.BackgroundColor = System.Drawing.Color.PowderBlue;
			this.dataGrid1.CaptionVisible = false;
			this.dataGrid1.DataMember = "";
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataG
...
...
(Not finished, please download and read the complete file)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
HotelManage.sql13.44 kB13-04-06 23:08
Help.chm11.05 kB01-07-07 20:19
Help.html944.00 B01-07-07 00:02
0005.gif1.33 kB12-04-04 23:13
App.ico1.05 kB26-06-07 07:41
AssemblyInfo.cs1.82 kB05-03-04 19:46
Help.chm11.05 kB01-07-07 20:35
HotelManage.exe260.00 kB04-07-07 14:56
HotelManage.pdb141.50 kB04-07-07 14:56
CheckInForm.cs7.34 kB03-07-07 18:45
CheckInForm.resx11.77 kB30-06-07 22:19
CheckInManage.cs2.18 kB03-07-07 15:42
HotelManage.sql13.44 kB13-04-06 23:08
GuesterFindForm.cs11.26 kB02-07-07 23:16
GuesterFindForm.resx13.39 kB30-06-07 22:20
App.ico1.05 kB26-06-07 07:41
AssemblyInfo.cs1.82 kB05-03-04 19:46
HotelManage.exe144.00 kB06-05-06 19:30
HotelManage.pdb91.50 kB06-05-06 19:30
CheckInForm.cs7.21 kB13-04-06 20:40
CheckInForm.resx11.77 kB13-04-06 20:40
CheckInManage.cs2.07 kB03-04-06 09:01
GuesterFindForm.cs10.93 kB06-05-06 19:35
GuesterFindForm.resx13.39 kB06-05-06 19:35
HotelManage.csproj8.31 kB13-04-06 22:44
HotelManage.csproj.user1.76 kB06-05-06 19:35
HotelManage.sln919.00 B05-03-04 19:46
HotelManage.suo13.00 kB03-04-06 07:49
MainForm.cs13.75 kB06-05-06 19:35
MainForm.resx23.08 kB15-04-06 00:33
HotelManage.CheckInForm.resources8.33 kB14-04-06 11:32
HotelManage.exe144.00 kB06-05-06 19:30
HotelManage.GuesterFindForm.resources9.70 kB15-04-06 18:38
HotelManage.MainForm.resources18.43 kB15-04-06 00:34
HotelManage.OrderForm.resources12.52 kB15-04-06 16:23
HotelManage.pdb91.50 kB06-05-06 19:30
HotelManage.projdata42.88 kB06-05-06 19:35
HotelManage.RoomFindForm.resources13.63 kB15-04-06 18:38
HotelManage.RoomManageForm.resources12.47 kB15-04-06 18:38
HotelManage.RoomTypeForm.resources11.97 kB15-04-06 18:38
OrderForm.cs11.92 kB15-04-06 16:23
OrderForm.resx16.20 kB15-04-06 16:15
OrderManage.cs3.18 kB06-04-06 21:29
RoomFindForm.cs16.38 kB06-05-06 19:35
RoomFindForm.resx17.34 kB06-05-06 19:35
RoomManage.cs2.50 kB03-04-06 09:01
RoomManageForm.cs15.47 kB06-05-06 19:35
RoomManageForm.resx16.18 kB06-05-06 19:35
RoomTypeForm.cs12.98 kB06-05-06 19:35
RoomTypeForm.resx15.64 kB06-05-06 19:35
RoomTypeManage.cs2.33 kB06-05-06 19:35
UserManageForm.resx14.58 kB13-04-06 22:42
Connection.cs324.00 B03-04-06 08:15
HotelManage.csproj11.91 kB01-07-07 21:56
HotelManage.csproj.user1.76 kB04-07-07 15:27
HotelManage.sln919.00 B05-03-04 19:46
HotelManage.suo19.00 kB06-05-06 19:35
cacular.BMP2.05 kB26-05-98 05:08
close.BMP358.00 B26-05-98 05:08
describ.BMP382.00 B25-04-98 03:58
drop.BMP1.29 kB25-04-98 03:58
end.BMP358.00 B26-05-98 05:08
expense.BMP382.00 B25-04-98 03:58
last.BMP358.00 B26-05-98 05:08
leave.BMP382.00 B25-04-98 03:58
modify.BMP2.05 kB26-05-98 05:08
NEW.BMP1.29 kB25-04-98 03:58
next.BMP358.00 B26-05-98 05:08
PREVIEW.BMP1.29 kB25-04-98 03:58
PRINT.BMP1.29 kB25-04-98 03:58
quit.BMP382.00 B25-04-98 03:58
reach.BMP382.00 B25-04-98 03:58
research.BMP238.00 B26-05-98 05:08
reserve.BMP382.00 B25-04-98 03:58
SAVE.BMP1.29 kB25-04-98 03:58
start.BMP358.00 B26-05-98 05:08
status.BMP382.00 B25-04-98 03:58
type.BMP382.00 B25-04-98 03:58
update.BMP382.00 B25-04-98 03:58
WZUNDO.BMP358.00 B26-05-98 05:08
Login.jpg38.82 kB21-06-07 10:24
LoginForm.cs6.35 kB03-07-07 15:48
LoginForm.resx68.92 kB01-07-07 09:36
MainForm.cs14.86 kB03-07-07 18:56
MainForm.jpg60.43 kB01-07-07 09:54
MainForm.resx113.85 kB01-07-07 20:32
HotelManage.CheckInForm.resources8.33 kB30-06-07 22:26
HotelManage.exe260.00 kB04-07-07 14:56
HotelManage.GuesterFindForm.resources9.70 kB30-06-07 22:26
HotelManage.LoginForm.resources45.99 kB01-07-07 09:36
HotelManage.MainForm.resources78.94 kB01-07-07 20:32
HotelManage.OrderForm.resources13.53 kB02-07-07 22:33
HotelManage.pdb141.50 kB04-07-07 14:56
HotelManage.projdata50.01 kB04-07-07 15:27
HotelManage.RoomFindForm.resources13.63 kB03-07-07 09:25
HotelManage.RoomManageForm.resources13.50 kB03-07-07 09:25
HotelManage.RoomTypeForm.resources12.99 kB02-07-07 22:30
OrderForm.cs13.38 kB03-07-07 18:39
OrderForm.resx17.29 kB02-07-07 22:33
OrderManage.cs3.25 kB02-07-07 23:04
RoomFindForm.cs17.94 kB03-07-07 18:50
RoomFindForm.resx17.34 kB03-07-07 09:24
RoomManage.cs2.56 kB02-07-07 21:33
RoomManageForm.cs18.81 kB03-07-07 09:24
RoomManageForm.resx17.28 kB03-07-07 09:24
RoomTypeForm.cs16.45 kB03-07-07 15:48
RoomTypeForm.resx16.73 kB02-07-07 15:48
RoomTypeManage.cs2.56 kB02-07-07 15:47
UserManageForm.resx14.58 kB13-04-06 22:42
Connection.cs320.00 B28-05-06 22:22
HotelManage.sln919.00 B30-06-07 23:40
HotelManage.suo13.00 kB04-07-07 15:27
cacular.BMP2.05 kB26-05-98 05:08
close.BMP358.00 B26-05-98 05:08
describ.BMP382.00 B25-04-98 03:58
drop.BMP1.29 kB25-04-98 03:58
end.BMP358.00 B26-05-98 05:08
expense.BMP382.00 B25-04-98 03:58
last.BMP358.00 B26-05-98 05:08
leave.BMP382.00 B25-04-98 03:58
modify.BMP2.05 kB26-05-98 05:08
NEW.BMP1.29 kB25-04-98 03:58
next.BMP358.00 B26-05-98 05:08
PREVIEW.BMP1.29 kB25-04-98 03:58
PRINT.BMP1.29 kB25-04-98 03:58
quit.BMP382.00 B25-04-98 03:58
reach.BMP382.00 B25-04-98 03:58
research.BMP238.00 B26-05-98 05:08
reserve.BMP382.00 B25-04-98 03:58
SAVE.BMP1.29 kB25-04-98 03:58
start.BMP358.00 B26-05-98 05:08
status.BMP382.00 B25-04-98 03:58
Thumbs.db14.00 kB15-09-09 22:07
type.BMP382.00 B25-04-98 03:58
update.BMP382.00 B25-04-98 03:58
WZUNDO.BMP358.00 B26-05-98 05:08
readme.txt199.00 B26-06-07 07:37
HotelManage.sql13.44 kB13-04-06 23:08
<temp>0.00 B25-07-09 17:00
<TempPE>0.00 B25-07-09 17:00
<Debug>0.00 B25-07-09 17:00
<Debug>0.00 B25-07-09 17:00
<temp>0.00 B25-07-09 17:00
<TempPE>0.00 B25-07-09 17:00
<Debug>0.00 B25-07-09 17:00
<bin>0.00 B25-07-09 17:00
<obj>0.00 B25-07-09 17:00
<util>0.00 B25-07-09 17:00
<Debug>0.00 B25-07-09 17:00
<bin>0.00 B25-07-09 17:00
<DataBase>0.00 B25-07-09 17:00
<HotelManage>0.00 B25-07-09 17:00
<Ico>0.00 B25-07-09 17:00
<obj>0.00 B25-07-09 17:00
<util>0.00 B25-07-09 17:00
<DataBase>0.00 B25-07-09 17:00
<HotelManage>0.00 B25-07-09 17:00
<Ico>0.00 B15-09-09 22:07
<HotelManage>0.00 B25-07-09 17:00
<系统代码>0.00 B25-07-09 17:00
...
Sponsored links

RoomTypeForm.cs (740.91 kB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D