#pragma once
using namespace System;
using namespace System::Drawing;
using namespace System::Windows::Forms;
///
/// Summary for Form2
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
///
public __gc class Form2 : public System::Windows::Forms::Form
{
public:
Form2(void)
{
InitializeComponent();
}
protected:
void Dispose(Boolean disposing)
{
if (disposing && components)
{
components->Dispose();
}
__super::Dispose(disposing);
}
private: System::Windows::Forms::Label * label1;
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::Label * label6;
private: System::Windows::Forms::Label * label7;
private: System::Windows::Forms::Label * label8;
private: System::Windows::Forms::Button * button1;
private: System::Windows::Forms::Button * button2;
public: System::Windows::Forms::ComboBox * comboBox1;
public: System::Windows::Forms::ComboBox * comboBox2;
public: System::Windows::Forms::ComboBox * comboBox3;
public: System::Windows::Forms::TextBox * textBox1;
public: System::Windows::Forms::TextBox * textBox2;
public: System::Windows::Forms::NumericUpDown * numericUpDown1;
public: System::Windows::Forms::NumericUpDown * numericUpDown2;
public: System::Windows::Forms::NumericUpDown * numericUpDown3;
private:
///
/// Required designer variable.
///
System::ComponentModel::Container * components;
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
void InitializeComponent(void)
{
this->StartPosition = FormStartPosition::CenterParent; //Position form in the centre of the parent form
this->label1 = new System::Windows::Forms::Label();
this->label2 = new System::Windows::Forms::Label();
this->label3 = new System::Windows::Forms::Label();
this->label4 = new System::Windows::Forms::Label();
this->label5 = new System::Windows::Forms::Label();
this->label6 = new System::Windows::Forms::Label();
this->label7 = new System::Windows::Forms::Label();
this->label8 = new System::Windows::Forms::Label();
this->textBox1 = new System::Windows::Forms::TextBox();
this->textBox2 = new System::Windows::Forms::TextBox();
this->comboBox1 = new System::Windows::Forms::ComboBox();
this->comboBox2 = new System::Windows::Forms::ComboBox();
this->comboBox3 = new System::Windows::Forms::ComboBox();
this->button1 = new System::Windows::Forms::Button();
this->button2 = new System::Windows::Forms::Button();
this->numericUpDown1 = new System::Windows::Forms::NumericUpDown();
this->numericUpDown2 = new System::Windows::Forms::NumericUpDown();
this->numericUpDown3 = new System::Windows::Forms::NumericUpDown();
(__try_cast(this->numericUpDown1))->BeginInit();
(__try_cast(this->numericUpDown2))->BeginInit();
(__try_cast(this->numericUpDown3))->BeginInit();
this->SuspendLayout();
//
// label1
//
this->label1->Location = System::Drawing::Point(16, 24);
this->label1->Name = S"label1";
this->label1->Size = System::Drawing::Size(56, 24);
this->label1->TabIndex = 0;
this->label1->Text = S"Guest ID";
//
// label2
//
this->label2->Location = System::Drawing::Point(24, 56);
this->label2->Name = S"label2";
this->label2->Size = System::Drawing::Size(40, 24);
this->label2->TabIndex = 1;
this->label2->Text = S"Name";
//
// label3
//
this->label3->Location = System::Drawing::Point(224, 56);
this->label3->Name = S"label3";
this->label3->Size = System::Drawing::Size(56, 32);
this->label3->TabIndex = 2;
this->label3->Text = S"Surname";
//
// label4
//
this->label4->Location = System::Drawing::Point(24, 96);
this->label4->Name = S"label4";
this->label4->Size = System::Drawing::Size(64, 16);
this->label4->TabIndex = 6;
this->label4->Text = S"Days Stay";
//
// label5
//
this->label5->Location = System::Drawing::Point(160, 96);
this->label5->Name = S"label5";
this->label5->Size = System::Drawing::Size(64, 16);
this->label5->TabIndex = 9;
this->label5->Text = S"Room No.";
//
// label6
//
this->label6->Location = System::Drawing::Point(280, 96);
this->label6->Name = S"label6";
this->label6->Size = System::Drawing::Size(72, 16);
this->label6->TabIndex = 11;
this->label6->Text = S"Room Type";
//
// label7
//
this->label7->Location = System::Drawing::Point(72, 136);
this->label7->Name = S"label7";
this->label7->Size = System::Drawing::Size(56, 16);
this->label7->TabIndex = 12;
this->label7->Text = S"Payment";
//
// label8
//
this->label8->Location = System::Drawing::Point(240, 136);
this->label8->Name = S"label8";
this->label8->Size = System::Drawing::Size(48, 16);
this->label8->TabIndex = 14;
this->label8->Text = S"Purpose";
//
// textBox1
//
this->textBox1->AcceptsReturn = true;
this->textBox1->AcceptsTab = true;
this->textBox1->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
this->textBox1->ImeMode = System::Windows::Forms::ImeMode::Alpha;
this->textBox1->Location = System::Drawing::Point(64, 56);
this->textBox1->Name = S"textBox1";
this->textBox1->Size = System::Drawing::Size(152, 20);
this->textBox1->TabIndex = 4;
this->textBox1->Text = S"";
//
// textBox2
//
this->textBox2->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
this->textBox2->Location = System::Drawing::Point(280, 56);
this->textBox2->Name = S"textBox2";
this->textBox2->Size = System::Drawing::Size(168, 20);
this->textBox2->TabIndex = 5;
this->textBox2->Text = S"";
//
// comboBox1
//
this->comboBox1->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
System::Object* __mcTemp__1[] = new System::Object*[3];
__mcTemp__1[0] = S"Executive";
__mcTemp__1[1] = S"Honeymoon";
__mcTemp__1[2] = S"Regular";
this->comboBox1->Items->AddRange(__mcTemp__1);
this->comboBox1->Location = System::Drawing::Point(352, 96);
this->comboBox1->Name = S"comboBox1";
this->comboBox1->Size = System::Drawing::Size(112, 21);
this->comboBox1->TabIndex = 17;
//
// comboBox2
//
this->comboBox2->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
System::Object* __mcTemp__2[] = new System::Object*[4];
__mcTemp__2[0] = S"Amex";
__mcTemp__2[1] = S"MC";
__mcTemp__2[2] = S"TChk";
__mcTemp__2[3] = S"Visa";
this->comboBox2->Items->AddRange(__mcTemp__2);
this->comboBox2->Location = System::Drawing::Point(128, 136);
this->comboBox2->Name = S"comboBox2";
this->comboBox2->Size = System::Drawing::Size(88, 21);
this->comboBox2->TabIndex = 18;
//
// comboBox3
//
this->comboBox3->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
System::Object* __mcTemp__3[] = new System::Object*[4];
__mcTemp__3[0] = S"Business";
__mcTemp__3[1] = S"Honeymoon";
__mcTemp__3[2] = S"Sports";
__mcTemp__3[3] = S"Vacation";
this->comboBox3->Items->AddRange(__mcTemp__3);
this->comboBox3->Location = System::Drawing::Point(296, 136);
this->comboBox3->Name = S"comboBox3";
this->comboBox3->Size = System::Drawing::Size(136, 21);
this->comboBox3->TabIndex = 19;
//
// button1
//
this->button1->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
this->button1->Location = System::Drawing::Point(96, 176);
this->button1->Name = S"button1";
this->button1->Size = System::Drawing::Size(120, 32);
this->button1->TabIndex = 16;
this->button1->Text = S"Submit";
this->button1->Click += new System::EventHandler(this, onClickSubmit);
//
// button2
//
this->button2->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
this->button2->Location = System::Drawing::Point(280, 176);
this->button2->Name = S"button2";
this->button2->Size = System::Drawing::Size(104, 32);
this->button2->TabIndex = 20;
this->button2->Text = S"Cancel";
this->button2->Click += new System::EventHandler(this, onClickCancel);
//
// numericUpDown1
//
this->numericUpDown1->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
this->numericUpDown1->Location = System::Drawing::Point(72, 24);
System::Int32 __mcTemp__4[] = new System::Int32[4];
__mcTemp__4[0] = 999999;
__mcTemp__4[1] = 0;
__mcTemp__4[2] = 0;
__mcTemp__4[3] = 0;
this->numericUpDown1->Maximum = System::Decimal(__mcTemp__4);
this->numericUpDown1->Name = S"numericUpDown1";
this->numericUpDown1->TabIndex = 23;
//
// numericUpDown2
//
this->numericUpDown2->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
this->numericUpDown2->Location = System::Drawing::Point(88, 96);
this->numericUpDown2->Name = S"numericUpDown2";
this->numericUpDown2->Size = System::Drawing::Size(56, 20);
this->numericUpDown2->TabIndex = 8;
//
// numericUpDown3
//
this->numericUpDown3->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
this->numericUpDown3->Location = System::Drawing::Point(216, 96);
System::Int32 __mcTemp__5[] = new System::Int32[4];
__mcTemp__5[0] = 14500;
__mcTemp__5[1] = 0;
__mcTemp__5[2] = 0;
__mcTemp__5[3] = 0;
this->numericUpDown3->Maximum = System::Decimal(__mcTemp__5);
this->numericUpDown3->Name = S"numericUpDown3";
this->numericUpDown3->Size = System::Drawing::Size(56, 20);
this->numericUpDown3->TabIndex = 24;
//
// Form2
//
this->AutoScaleBaseSize = System::Drawing::Size(5, 13);
this->ClientSize = System::Drawing::Size(480, 228);
this->Controls->Add(this->numericUpDown3);
this->Controls->Add(this->numericUpDown1);
this->Controls->Add(this->button2);
this->Controls->Add(this->comboBox3);
this->Controls->Add(this->comboBox2);
this->Controls->Add(this->comboBox1);
this->Controls->Add(this->button1);
this->Controls->Add(this->label8);
this->Controls->Add(this->label7);
this->Controls->Add(this->label6);
this->Controls->Add(this->label5);
this->Controls->Add(this->numericUpDown2);
this->Controls->Add(this->label4);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->label3);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Font = new System::Drawing::Font(S"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
this->Name = S"Form2";
this->Text = S"Add Record";
(__try_cast(this->numericUpDown1))->EndInit();
(__try_cast(this->numericUpDown2))->EndInit();
(__try_cast(this->numericUpDown3))->EndInit();
this->ResumeLayout(false);
}
private: System::Void onClickSubmit(System::Object * sender, System::EventArgs * e)
{
int ok = 1;
if (this->textBox1->Text->get_Length() == 0) ok = 0;
if (this->textBox2->Text->get_Length() == 0) ok = 0;
if(this->comboBox1->Text->get_Length() == 0) ok = 0;
if (this->comboBox2->Text->get_Length() == 0) ok = 0;
if (this->comboBox3->Text->get_Length() == 0) ok = 0;
if (this->numericUpDown1->Text->Equals("0")) ok = 0;
if (this->numericUpDown2->Text->Equals("0")) ok = 0;
if (this->numericUpDown3->Text->Equals("0")) ok = 0;
if (ok == 1)
{
this->DialogResult = DialogResult::OK;
Close();
}
}
private: System::Void onClickCancel(System::Object * sender, System::EventArgs * e)
{
Close();
}
};