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

📄 clientsearch.cs

📁 《C#数据库项目案例导航》一书的配套光盘
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using HotelManage.DataLevl;
using System.Data;
using System.Data.SqlClient;
using HotelManage.BussinessLevel;

namespace HotelManage.UILevel
{
	/// <summary>
	/// Client 的摘要说明。
	/// </summary>
	public class ClientSearch : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Panel panel2;
		private System.Windows.Forms.Button btnEmptyRoom;
		private System.Windows.Forms.Button btnSearch;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.Button btnExit;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.ListView listView1;
		private System.Windows.Forms.ColumnHeader columnHeader1;
		private System.Windows.Forms.ColumnHeader columnHeader2;
		private System.Windows.Forms.ColumnHeader columnHeader3;
		private System.Windows.Forms.ColumnHeader columnHeader4;
		private System.Windows.Forms.ColumnHeader columnHeader5;
		private System.Windows.Forms.ColumnHeader columnHeader6;
		private System.Windows.Forms.ColumnHeader columnHeader7;
		private System.Windows.Forms.ColumnHeader columnHeader8;
		private System.Windows.Forms.TextBox textClientID;
		private string selectStr;
		private SqlCommand sqlCommand1=null;
		private SqlDataReader sqlDataReader1=null;
		private SqlConnection sqlConnection1;
		private System.Windows.Forms.Button btnCheck;
		HotelManage.BussinessLevel.ClientCheckManage clientCheck=new HotelManage.BussinessLevel.ClientCheckManage();
		private System.Windows.Forms.Button btnInRoom;

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

		public ClientSearch()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			this.sqlConnection1=new SqlConnection(HotelManage.DataLevl.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()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ClientSearch));
			this.panel2 = new System.Windows.Forms.Panel();
			this.btnCheck = new System.Windows.Forms.Button();
			this.btnExit = new System.Windows.Forms.Button();
			this.btnEmptyRoom = new System.Windows.Forms.Button();
			this.btnSearch = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.label1 = new System.Windows.Forms.Label();
			this.textClientID = new System.Windows.Forms.TextBox();
			this.listView1 = new System.Windows.Forms.ListView();
			this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader7 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader8 = new System.Windows.Forms.ColumnHeader();
			this.btnInRoom = new System.Windows.Forms.Button();
			this.panel2.SuspendLayout();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// panel2
			// 
			this.panel2.BackColor = System.Drawing.SystemColors.Window;
			this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.panel2.Controls.Add(this.btnInRoom);
			this.panel2.Controls.Add(this.btnCheck);
			this.panel2.Controls.Add(this.btnExit);
			this.panel2.Controls.Add(this.btnEmptyRoom);
			this.panel2.Controls.Add(this.btnSearch);
			this.panel2.Controls.Add(this.btnCancel);
			this.panel2.Dock = System.Windows.Forms.DockStyle.Right;
			this.panel2.ForeColor = System.Drawing.SystemColors.Desktop;
			this.panel2.Location = new System.Drawing.Point(554, 0);
			this.panel2.Name = "panel2";
			this.panel2.Size = new System.Drawing.Size(88, 473);
			this.panel2.TabIndex = 22;
			// 
			// btnCheck
			// 
			this.btnCheck.BackColor = System.Drawing.SystemColors.Window;
			this.btnCheck.Enabled = false;
			this.btnCheck.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnCheck.ForeColor = System.Drawing.SystemColors.Desktop;
			this.btnCheck.Image = ((System.Drawing.Image)(resources.GetObject("btnCheck.Image")));
			this.btnCheck.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnCheck.Location = new System.Drawing.Point(16, 184);
			this.btnCheck.Name = "btnCheck";
			this.btnCheck.Size = new System.Drawing.Size(56, 24);
			this.btnCheck.TabIndex = 21;
			this.btnCheck.Text = "结帐";
			this.btnCheck.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.btnCheck.Click += new System.EventHandler(this.btnCheck_Click);
			// 
			// btnExit
			// 
			this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnExit.Image = ((System.Drawing.Image)(resources.GetObject("btnExit.Image")));
			this.btnExit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnExit.Location = new System.Drawing.Point(16, 304);
			this.btnExit.Name = "btnExit";
			this.btnExit.Size = new System.Drawing.Size(56, 23);
			this.btnExit.TabIndex = 15;
			this.btnExit.Text = "退出";
			this.btnExit.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
			// 
			// btnEmptyRoom
			// 
			this.btnEmptyRoom.BackColor = System.Drawing.SystemColors.Window;
			this.btnEmptyRoom.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnEmptyRoom.ForeColor = System.Drawing.SystemColors.Desktop;
			this.btnEmptyRoom.Image = ((System.Drawing.Image)(resources.GetObject("btnEmptyRoom.Image")));
			this.btnEmptyRoom.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnEmptyRoom.Location = new System.Drawing.Point(16, 72);
			this.btnEmptyRoom.Name = "btnEmptyRoom";
			this.btnEmptyRoom.Size = new System.Drawing.Size(56, 24);
			this.btnEmptyRoom.TabIndex = 22;
			this.btnEmptyRoom.Text = "全部";
			this.btnEmptyRoom.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.btnEmptyRoom.Click += new System.EventHandler(this.btnEmptyRoom_Click);
			// 
			// btnSearch
			// 
			this.btnSearch.BackColor = System.Drawing.SystemColors.Window;
			this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnSearch.ForeColor = System.Drawing.SystemColors.Desktop;
			this.btnSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnSearch.Image")));
			this.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnSearch.Location = new System.Drawing.Point(16, 40);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new System.Drawing.Size(56, 24);
			this.btnSearch.TabIndex = 20;
			this.btnSearch.Text = "查找";
			this.btnSearch.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// btnCancel
			// 
			this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnCancel.Image = ((System.Drawing.Image)(resources.GetObject("btnCancel.Image")));
			this.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnCancel.Location = new System.Drawing.Point(16, 8);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.Size = new System.Drawing.Size(56, 23);
			this.btnCancel.TabIndex = 16;
			this.btnCancel.Text = "取消";
			this.btnCancel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.textClientID);
			this.groupBox1.ForeColor = System.Drawing.SystemColors.Desktop;
			this.groupBox1.Location = new System.Drawing.Point(24, 32);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(232, 56);
			this.groupBox1.TabIndex = 23;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "输入查询条件";
			// 
			// label1
			// 
			this.label1.BackColor = System.Drawing.Color.White;
			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;
			// 
			// textClientID
			// 

⌨️ 快捷键说明

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