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

📄 hotelarrival.h

📁 我新买的书 光盘里有一个很好的教务管理系统的VC.net的按例
💻 H
📖 第 1 页 / 共 4 页
字号:
#pragma once
#include "LinkDataBase.h"
#include "DataGridNoActiveCellColumn.h"
#include "RoomStatus.h"
#include "SelectReserve.h"

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;


namespace My
{
	/// <summary> 
	/// HotelArrival 摘要
	///
	/// 警告: 如果您更改该类的名称,则将需要更改 
	///          与该类所依赖的所有 .resx 文件关联的托管资源编译器工具的 
	///          “资源文件名”属性。  否则,
	///          设计器将不能与此窗体关联的
	///          本地化资源正确交互。
	/// </summary>
	public __gc class HotelArrival : public System::Windows::Forms::Form
	{
		//--------------------成员声明------------------------
	private:
		LinkDataBase* MyDataBase;	//数据库连接类
		SqlDataAdapter* ArrivalAdapter;
		DataSet* ds;
		String* strTableName;
		String* strSQL;
		CurrencyManager* cmArrival;
		//-------------------成员声明结束-----------------------
	public: 
		HotelArrival(void)
		{
			InitializeComponent();
			//初始化
			this->MyDataBase = new LinkDataBase();
			this->ds = new DataSet();
			this->ArrivalAdapter = new SqlDataAdapter();

			//查询入住单
			this->strSQL = S"Select * from 入住单";
			this->strTableName = S"入住单";
			this->MyDataBase->SelectDataBase(this->ArrivalAdapter,this->ds,this->strSQL,this->strTableName);

			this->cmArrival = __try_cast<CurrencyManager*>(this->BindingContext->Item[this->ds->Tables->Item[S"入住单"]]);
			//设置DataGrid
			this->dgrdOder->DataSource = this->ds->Tables->Item[S"入住单"];
			this->DataGridStateControl();
			

			//填充[客房类型]的选项			
			String* tempSQL = S"Select * from 客房类型";
			this->MyDataBase->SelectDataBase(this->ds,tempSQL,S"客房类型");
			
			this->cmbRoomType->DataSource = this->ds->Tables->Item[S"客房类型"];
			this->cmbRoomType->DisplayMember = S"类型名称";
			this->cmbRoomType->ValueMember = S"类型编号";

			//设置控件的数据邦定
			this->SetDataBindings();
			//设置控件ReadOnly属性
			this->SetModify(false);
		}
        
	protected: 
		void Dispose(Boolean disposing)
		{
			if (disposing && components)
			{
				components->Dispose();
			}
			__super::Dispose(disposing);
		}
	private: System::Windows::Forms::ToolBar *  toolBar1;
	private: System::Windows::Forms::ToolBarButton *  tBtnFirstRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnNextRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnPreviousRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnLastRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnNewRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnModifyRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnDeleteRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnPostModified;
	private: System::Windows::Forms::ToolBarButton *  tBtnCancleModified;
	private: System::Windows::Forms::ToolBarButton *  tBtnQuit;
	private: System::Windows::Forms::GroupBox *  groupBox1;
	private: System::Windows::Forms::Button *  btnSearch;
	private: System::Windows::Forms::Label *  label1;
	private: System::Windows::Forms::Label *  label2;
	private: System::Windows::Forms::Label *  label4;
	private: System::Windows::Forms::GroupBox *  groupBox2;
	private: System::Windows::Forms::Label *  label5;
	private: System::Windows::Forms::Label *  label6;
	private: System::Windows::Forms::Label *  label7;
	private: System::Windows::Forms::Label *  label3;
	private: System::Windows::Forms::Label *  label8;
	private: System::Windows::Forms::Label *  label9;
	private: System::Windows::Forms::Label *  label10;
			 private: System::Windows::Forms::Label *  label29;
	private: System::Windows::Forms::Label *  label30;

	private: System::Windows::Forms::Label *  label13;







	private: System::Windows::Forms::TextBox *  tBoxMemo;
	private: System::Windows::Forms::ImageList *  imageList1;





	private: System::Windows::Forms::CheckBox *  chkOfferBreadfast;
	private: System::Windows::Forms::CheckBox *  chkWake;
	private: System::Windows::Forms::CheckBox *  chkSecruite;
	private: System::Windows::Forms::CheckBox *  chkIsVIP;
	private: System::Windows::Forms::Button *  btnImportFromOrder;
	private: System::Windows::Forms::TextBox *  tBoxArrivalIDShow;
	private: System::Windows::Forms::TextBox *  tBoxRoomIDSearch;
	private: System::Windows::Forms::TextBox *  tBoxArrivalID;
	private: System::Windows::Forms::Label *  label26;

	private: System::Windows::Forms::TextBox *  tBoxArrival;



	private: System::Windows::Forms::Label *  label11;

	private: System::Windows::Forms::Label *  label12;

	private: System::Windows::Forms::Label *  label14;

	private: System::Windows::Forms::Label *  label15;

	private: System::Windows::Forms::Label *  label16;

	private: System::Windows::Forms::Label *  label17;


	private: System::Windows::Forms::Label *  label18;

	private: System::Windows::Forms::Label *  label19;

	private: System::Windows::Forms::Label *  label20;
	private: System::Windows::Forms::DateTimePicker *  dtpDeparture;
	private: System::Windows::Forms::DateTimePicker *  dtpArrival;
	private: System::Windows::Forms::CheckBox *  chkIsAdditionalBed;
	private: System::Windows::Forms::TextBox *  tBoxRealPrice;
	private: System::Windows::Forms::TextBox *  tBoxRoomID;
	private: System::Windows::Forms::TextBox *  tBoxRoomPrice;
	private: System::Windows::Forms::ComboBox *  cmbRoomType;
	private: System::Windows::Forms::TextBox *  tBoxDiscountCause;

	private: System::Windows::Forms::TextBox *  tBoxPhoneNumber;
	private: System::Windows::Forms::TextBox *  tBoxDiscount;
	private: System::Windows::Forms::TextBox *  tBoxSettleNumber;
	private: System::Windows::Forms::TextBox *  tBoxOperator;
	private: System::Windows::Forms::TextBox *  tBoxOderShow;
	private: System::Windows::Forms::TextBox *  tBoxOderStatus;
	private: System::Windows::Forms::TextBox *  tBoxOP;
	private: System::Windows::Forms::TextBox *  tBoxPreDeal;
	private: System::Windows::Forms::TextBox *  tBoxAdditionalBedPrice;
	private: System::Windows::Forms::TextBox *  tBoxMemberID;
	private: System::Windows::Forms::TextBox *  tBoxOderCompany;
	private: System::Windows::Forms::Button *  btnFindRoom;
	private: System::Windows::Forms::DataGrid *  dgrdOder;
	private: System::ComponentModel::IContainer *  components;

	private:
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>


		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		void InitializeComponent(void)
		{
			this->components = new System::ComponentModel::Container();
			System::Resources::ResourceManager *  resources = new System::Resources::ResourceManager(__typeof(My::HotelArrival));
			this->toolBar1 = new System::Windows::Forms::ToolBar();
			this->tBtnFirstRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnNextRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnPreviousRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnLastRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnNewRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnModifyRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnDeleteRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnPostModified = new System::Windows::Forms::ToolBarButton();
			this->tBtnCancleModified = new System::Windows::Forms::ToolBarButton();
			this->tBtnQuit = new System::Windows::Forms::ToolBarButton();
			this->imageList1 = new System::Windows::Forms::ImageList(this->components);
			this->groupBox1 = new System::Windows::Forms::GroupBox();
			this->tBoxArrival = new System::Windows::Forms::TextBox();
			this->label2 = new System::Windows::Forms::Label();
			this->tBoxArrivalID = new System::Windows::Forms::TextBox();
			this->label1 = new System::Windows::Forms::Label();
			this->btnSearch = new System::Windows::Forms::Button();
			this->tBoxRoomIDSearch = new System::Windows::Forms::TextBox();
			this->label4 = new System::Windows::Forms::Label();
			this->dgrdOder = new System::Windows::Forms::DataGrid();
			this->groupBox2 = new System::Windows::Forms::GroupBox();
			this->chkOfferBreadfast = new System::Windows::Forms::CheckBox();
			this->btnImportFromOrder = new System::Windows::Forms::Button();
			this->btnFindRoom = new System::Windows::Forms::Button();
			this->dtpDeparture = new System::Windows::Forms::DateTimePicker();
			this->dtpArrival = new System::Windows::Forms::DateTimePicker();
			this->chkIsAdditionalBed = new System::Windows::Forms::CheckBox();
			this->label13 = new System::Windows::Forms::Label();
			this->tBoxMemo = new System::Windows::Forms::TextBox();
			this->label26 = new System::Windows::Forms::Label();
			this->label8 = new System::Windows::Forms::Label();
			this->tBoxRealPrice = new System::Windows::Forms::TextBox();
			this->tBoxRoomID = new System::Windows::Forms::TextBox();
			this->label9 = new System::Windows::Forms::Label();
			this->tBoxRoomPrice = new System::Windows::Forms::TextBox();
			this->label10 = new System::Windows::Forms::Label();
			this->label3 = new System::Windows::Forms::Label();
			this->cmbRoomType = new System::Windows::Forms::ComboBox();
			this->tBoxDiscountCause = new System::Windows::Forms::TextBox();
			this->tBoxArrivalIDShow = new System::Windows::Forms::TextBox();
			this->label5 = new System::Windows::Forms::Label();
			this->tBoxPhoneNumber = new System::Windows::Forms::TextBox();
			this->label6 = new System::Windows::Forms::Label();
			this->label7 = new System::Windows::Forms::Label();
			this->label29 = new System::Windows::Forms::Label();
			this->label30 = new System::Windows::Forms::Label();
			this->tBoxDiscount = new System::Windows::Forms::TextBox();
			this->label11 = new System::Windows::Forms::Label();
			this->tBoxSettleNumber = new System::Windows::Forms::TextBox();
			this->label12 = new System::Windows::Forms::Label();
			this->tBoxOperator = new System::Windows::Forms::TextBox();
			this->label14 = new System::Windows::Forms::Label();
			this->tBoxOderShow = new System::Windows::Forms::TextBox();
			this->label15 = new System::Windows::Forms::Label();
			this->tBoxOderStatus = new System::Windows::Forms::TextBox();
			this->label16 = new System::Windows::Forms::Label();
			this->tBoxOP = new System::Windows::Forms::TextBox();
			this->label17 = new System::Windows::Forms::Label();
			this->tBoxPreDeal = new System::Windows::Forms::TextBox();
			this->tBoxAdditionalBedPrice = new System::Windows::Forms::TextBox();
			this->label18 = new System::Windows::Forms::Label();
			this->tBoxMemberID = new System::Windows::Forms::TextBox();
			this->label19 = new System::Windows::Forms::Label();
			this->tBoxOderCompany = new System::Windows::Forms::TextBox();
			this->label20 = new System::Windows::Forms::Label();
			this->chkWake = new System::Windows::Forms::CheckBox();
			this->chkSecruite = new System::Windows::Forms::CheckBox();
			this->chkIsVIP = new System::Windows::Forms::CheckBox();
			this->groupBox1->SuspendLayout();
			(__try_cast<System::ComponentModel::ISupportInitialize *  >(this->dgrdOder))->BeginInit();
			this->groupBox2->SuspendLayout();
			this->SuspendLayout();
			// 
			// toolBar1
			// 
			System::Windows::Forms::ToolBarButton* __mcTemp__1[] = new System::Windows::Forms::ToolBarButton*[10];
			__mcTemp__1[0] = this->tBtnFirstRecord;
			__mcTemp__1[1] = this->tBtnNextRecord;
			__mcTemp__1[2] = this->tBtnPreviousRecord;
			__mcTemp__1[3] = this->tBtnLastRecord;
			__mcTemp__1[4] = this->tBtnNewRecord;
			__mcTemp__1[5] = this->tBtnModifyRecord;
			__mcTemp__1[6] = this->tBtnDeleteRecord;
			__mcTemp__1[7] = this->tBtnPostModified;
			__mcTemp__1[8] = this->tBtnCancleModified;
			__mcTemp__1[9] = this->tBtnQuit;
			this->toolBar1->Buttons->AddRange(__mcTemp__1);
			this->toolBar1->DropDownArrows = true;
			this->toolBar1->ImageList = this->imageList1;
			this->toolBar1->Location = System::Drawing::Point(0, 0);
			this->toolBar1->Name = S"toolBar1";
			this->toolBar1->ShowToolTips = true;
			this->toolBar1->Size = System::Drawing::Size(760, 41);
			this->toolBar1->TabIndex = 0;
			this->toolBar1->ButtonClick += new System::Windows::Forms::ToolBarButtonClickEventHandler(this, toolBar1_ButtonClick);
			// 
			// tBtnFirstRecord
			// 
			this->tBtnFirstRecord->ImageIndex = 5;
			this->tBtnFirstRecord->Text = S"首记录";
			this->tBtnFirstRecord->ToolTipText = S"首记录";
			// 
			// tBtnNextRecord
			// 
			this->tBtnNextRecord->ImageIndex = 8;
			this->tBtnNextRecord->Text = S"上一记录";
			this->tBtnNextRecord->ToolTipText = S"上一记录";
			// 
			// tBtnPreviousRecord
			// 
			this->tBtnPreviousRecord->ImageIndex = 4;
			this->tBtnPreviousRecord->Text = S"下一记录";
			this->tBtnPreviousRecord->ToolTipText = S"下一记录";
			// 
			// tBtnLastRecord
			// 
			this->tBtnLastRecord->ImageIndex = 7;
			this->tBtnLastRecord->Text = S"尾记录";
			this->tBtnLastRecord->ToolTipText = S"尾记录";
			// 
			// tBtnNewRecord
			// 
			this->tBtnNewRecord->ImageIndex = 9;
			this->tBtnNewRecord->Text = S"新增";
			this->tBtnNewRecord->ToolTipText = S"新增";
			// 
			// tBtnModifyRecord
			// 

⌨️ 快捷键说明

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