📄 checkoutform.h
字号:
this->保存Button->Click += gcnew System::EventHandler(this, &CheckOutForm::保存Button_Click);
//
// 旅客姓名ComboBox
//
this->旅客姓名ComboBox->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
this->旅客姓名ComboBox->FormattingEnabled = true;
this->旅客姓名ComboBox->Location = System::Drawing::Point(77, 61);
this->旅客姓名ComboBox->Name = L"旅客姓名ComboBox";
this->旅客姓名ComboBox->Size = System::Drawing::Size(176, 20);
this->旅客姓名ComboBox->TabIndex = 42;
this->旅客姓名ComboBox->SelectedIndexChanged += gcnew System::EventHandler(this, &CheckOutForm::旅客姓名ComboBox_SelectedIndexChanged);
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(6, 63);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(65, 12);
this->label2->TabIndex = 41;
this->label2->Text = L"旅客姓名:";
//
// label11
//
this->label11->AutoSize = true;
this->label11->Location = System::Drawing::Point(6, 37);
this->label11->Name = L"label11";
this->label11->Size = System::Drawing::Size(65, 12);
this->label11->TabIndex = 40;
this->label11->Text = L"酒店房号:";
//
// label5
//
this->label5->AutoSize = true;
this->label5->Location = System::Drawing::Point(3, 73);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(53, 12);
this->label5->TabIndex = 4;
this->label5->Text = L"电话费:";
//
// 说明TextBox
//
this->说明TextBox->Location = System::Drawing::Point(74, 95);
this->说明TextBox->Name = L"说明TextBox";
this->说明TextBox->Size = System::Drawing::Size(162, 21);
this->说明TextBox->TabIndex = 7;
//
// groupBox2
//
this->groupBox2->Controls->Add(this->说明TextBox);
this->groupBox2->Controls->Add(this->label7);
this->groupBox2->Controls->Add(this->结帐金额TextBox);
this->groupBox2->Controls->Add(this->label8);
this->groupBox2->Controls->Add(this->费用总额TextBox);
this->groupBox2->Controls->Add(this->label9);
this->groupBox2->Controls->Add(this->预收押金TextBox);
this->groupBox2->Controls->Add(this->label10);
this->groupBox2->Location = System::Drawing::Point(273, 91);
this->groupBox2->Name = L"groupBox2";
this->groupBox2->Size = System::Drawing::Size(263, 131);
this->groupBox2->TabIndex = 47;
this->groupBox2->TabStop = false;
this->groupBox2->Text = L"结算信息";
//
// label7
//
this->label7->AutoSize = true;
this->label7->Location = System::Drawing::Point(3, 100);
this->label7->Name = L"label7";
this->label7->Size = System::Drawing::Size(41, 12);
this->label7->TabIndex = 6;
this->label7->Text = L"说明:";
//
// 结帐金额TextBox
//
this->结帐金额TextBox->Location = System::Drawing::Point(74, 68);
this->结帐金额TextBox->Name = L"结帐金额TextBox";
this->结帐金额TextBox->Size = System::Drawing::Size(162, 21);
this->结帐金额TextBox->TabIndex = 5;
this->结帐金额TextBox->Text = L"0";
//
// label8
//
this->label8->AutoSize = true;
this->label8->Location = System::Drawing::Point(3, 73);
this->label8->Name = L"label8";
this->label8->Size = System::Drawing::Size(65, 12);
this->label8->TabIndex = 4;
this->label8->Text = L"结帐金额:";
//
// 费用总额TextBox
//
this->费用总额TextBox->Location = System::Drawing::Point(74, 41);
this->费用总额TextBox->Name = L"费用总额TextBox";
this->费用总额TextBox->ReadOnly = true;
this->费用总额TextBox->Size = System::Drawing::Size(162, 21);
this->费用总额TextBox->TabIndex = 3;
//
// label9
//
this->label9->AutoSize = true;
this->label9->Location = System::Drawing::Point(3, 46);
this->label9->Name = L"label9";
this->label9->Size = System::Drawing::Size(65, 12);
this->label9->TabIndex = 2;
this->label9->Text = L"费用总额:";
//
// 预收押金TextBox
//
this->预收押金TextBox->Location = System::Drawing::Point(74, 14);
this->预收押金TextBox->Name = L"预收押金TextBox";
this->预收押金TextBox->ReadOnly = true;
this->预收押金TextBox->Size = System::Drawing::Size(162, 21);
this->预收押金TextBox->TabIndex = 1;
//
// label10
//
this->label10->AutoSize = true;
this->label10->Location = System::Drawing::Point(3, 19);
this->label10->Name = L"label10";
this->label10->Size = System::Drawing::Size(65, 12);
this->label10->TabIndex = 0;
this->label10->Text = L"预收押金:";
//
// 结帐日期DateTimePicker
//
this->结帐日期DateTimePicker->Location = System::Drawing::Point(77, 8);
this->结帐日期DateTimePicker->Name = L"结帐日期DateTimePicker";
this->结帐日期DateTimePicker->Size = System::Drawing::Size(176, 21);
this->结帐日期DateTimePicker->TabIndex = 39;
this->结帐日期DateTimePicker->ValueChanged += gcnew System::EventHandler(this, &CheckOutForm::结帐日期DateTimePicker_ValueChanged);
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(6, 11);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(65, 12);
this->label1->TabIndex = 38;
this->label1->Text = L"结帐日期:";
//
// groupBox1
//
this->groupBox1->Controls->Add(this->用餐费TextBox);
this->groupBox1->Controls->Add(this->label6);
this->groupBox1->Controls->Add(this->电话费TextBox);
this->groupBox1->Controls->Add(this->label5);
this->groupBox1->Controls->Add(this->住宿费TextBox);
this->groupBox1->Controls->Add(this->label4);
this->groupBox1->Controls->Add(this->店内消费TextBox);
this->groupBox1->Controls->Add(this->label3);
this->groupBox1->Location = System::Drawing::Point(8, 87);
this->groupBox1->Name = L"groupBox1";
this->groupBox1->Size = System::Drawing::Size(251, 135);
this->groupBox1->TabIndex = 46;
this->groupBox1->TabStop = false;
this->groupBox1->Text = L"已经发生的费用";
//
// 住宿费TextBox
//
this->住宿费TextBox->Location = System::Drawing::Point(69, 41);
this->住宿费TextBox->Name = L"住宿费TextBox";
this->住宿费TextBox->ReadOnly = true;
this->住宿费TextBox->Size = System::Drawing::Size(169, 21);
this->住宿费TextBox->TabIndex = 3;
//
// label4
//
this->label4->AutoSize = true;
this->label4->Location = System::Drawing::Point(3, 46);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(53, 12);
this->label4->TabIndex = 2;
this->label4->Text = L"住宿费:";
//
// 店内消费TextBox
//
this->店内消费TextBox->Location = System::Drawing::Point(69, 14);
this->店内消费TextBox->Name = L"店内消费TextBox";
this->店内消费TextBox->ReadOnly = true;
this->店内消费TextBox->Size = System::Drawing::Size(169, 21);
this->店内消费TextBox->TabIndex = 1;
//
// label3
//
this->label3->AutoSize = true;
this->label3->Location = System::Drawing::Point(3, 19);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(65, 12);
this->label3->TabIndex = 0;
this->label3->Text = L"店内消费:";
//
// CheckOutForm
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
static_cast<System::Int32>(static_cast<System::Byte>(192)));
this->ClientSize = System::Drawing::Size(540, 414);
this->Controls->Add(this->客房入住单DataGridView);
this->Controls->Add(this->折扣价格TextBox);
this->Controls->Add(this->label12);
this->Controls->Add(this->入住日期TextBox);
this->Controls->Add(this->label13);
this->Controls->Add(this->打印Button);
this->Controls->Add(this->酒店房号ComboBox);
this->Controls->Add(this->保存Button);
this->Controls->Add(this->旅客姓名ComboBox);
this->Controls->Add(this->label2);
this->Controls->Add(this->label11);
this->Controls->Add(this->groupBox2);
this->Controls->Add(this->结帐日期DateTimePicker);
this->Controls->Add(this->label1);
this->Controls->Add(this->groupBox1);
this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::Fixed3D;
this->MaximizeBox = false;
this->MinimizeBox = false;
this->Name = L"CheckOutForm";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
this->Text = L"登记旅客结帐信息";
this->Load += gcnew System::EventHandler(this, &CheckOutForm::CheckOutForm_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->客房入住单DataGridView))->EndInit();
this->groupBox2->ResumeLayout(false);
this->groupBox2->PerformLayout();
this->groupBox1->ResumeLayout(false);
this->groupBox1->PerformLayout();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
public:String^ MyOperator;
public:String^ MyCompany;
private:String^ My入住编号;
private: DateTime My结帐日期;
private: DateTime My入住日期;
private : static double My店内消费 = 0;
private : static double My电话费 = 0;
private : static double My用餐费 = 0;
private : static double My住宿费 = 0;
private : static double My费用总额 = 0;
private : static String^ My结帐编号 = "";
private : static double My预收押金 = 0;
private : static double My结帐金额 = 0;
private :static int My住宿人数 = 0;
private: static String^ MyHotelConnectionString= L"Data Source=.;Initial Catalog=MyHotel;Integrated Security=True;Pooling=False";
private: System::Void CheckOutForm_Load(System::Object^ sender, System::EventArgs^ e) {
//获取酒店已入住房间信息
this->酒店房号ComboBox->Items->Clear();
String^ MySQLConnectionString = MyHotelConnectionString;
SqlConnection^ MyConnection = gcnew SqlConnection(MySQLConnectionString);
MyConnection->Open();
System::Data::DataTable^ MyRoomTable = gcnew System::Data::DataTable();
String^ MySQL = "Select * From 酒店房间 Where 已入住人数<>0 ";
SqlDataAdapter^ MyAdapter = gcnew SqlDataAdapter(MySQL, MyConnection);
MyAdapter->Fill(MyRoomTable);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -