//
// Id
//>Id->Location = System::Drawing::Point(52, 113);>Id->MaximumSize = System::Drawing::Size(200, 4);>Id->Multiline = true;>Id->Name = L"Id";>Id->Size = System::Drawing::Size(14, 4);>Id->TabIndex = 11;>Id->Text = L"0";>Id->Visible = false;
//
// AddMeetingButton
//>AddMeetingButton->BackColor = System::Drawing::SystemColors::ControlDarkDark;>AddMeetingButton->Location = System::Drawing::Point(12, 140);>AddMeetingButton->Name = L"AddMeetingButton";>AddMeetingButton->Size = System::Drawing::Size(123, 23);>AddMeetingButton->TabIndex = 12;>AddMeetingButton->Text = L"Сохранить";>AddMeetingButton->UseVisualStyleBackColor = false;>AddMeetingButton->Click += gcnew System::EventHandler(this, &MeetingForm::AddMeetingButton_Click);
//
// CancelMeetingButton
//>CancelMeetingButton->BackColor = System::Drawing::SystemColors::ControlDarkDark;>CancelMeetingButton->Location = System::Drawing::Point(153, 140);>CancelMeetingButton->Name = L"CancelMeetingButton";>CancelMeetingButton->Size = System::Drawing::Size(119, 23);>CancelMeetingButton->TabIndex = 13;>CancelMeetingButton->Text = L"Отменить";>CancelMeetingButton->UseVisualStyleBackColor = false;>CancelMeetingButton->Click += gcnew System::EventHandler(this, &MeetingForm::CancelMeetingButton_Click);
//
// CandidatesList
//>CandidatesList->FormattingEnabled = true;>CandidatesList->Location = System::Drawing::Point(72, 61);>CandidatesList->Name = L"CandidatesList";>CandidatesList->Size = System::Drawing::Size(200, 21);>CandidatesList->TabIndex = 14;
//
// MeetingForm
//>AutoScaleDimensions = System::Drawing::SizeF(6, 13);>AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;>BackColor = System::Drawing::SystemColors::ControlDarkDark;>ClientSize = System::Drawing::Size(284, 174);>Controls->Add(this->CandidatesList);>Controls->Add(this->CancelMeetingButton);>Controls->Add(this->AddMeetingButton);>Controls->Add(this->Id);>Controls->Add(this->Description);>Controls->Add(this->EndTime);>Controls->Add(this->BeginTime);>Controls->Add(this->Day);>Controls->Add(this->DescriptionTitle);>Controls->Add(this->ClientTitle);>Controls->Add(this->EndTimeTitle);>Controls->Add(this->BeginTimeTitle);>Controls->Add(this->DayTitle);>ForeColor = System::Drawing::SystemColors::ButtonHighlight;>FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedToolWindow;>Name = L"MeetingForm";>StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
this->Text = L"Добавить встречу";
this->Load += gcnew System::EventHandler(this, &MeetingForm::MeetingForm_Load);>ResumeLayout(false);>PerformLayout();
}
#pragma endregion: System::Void MeetingForm_Load(System::Object^ sender, System::EventArgs^ e) {^ msi = gcnew MySqlInterface;
{(this->_Id > 0)
{>Id->Text = "" + this->_Id;>Day->Text = this->_Day;>BeginTime->Text = this->_StartTime;>EndTime->Text = this->_EndTime;>CandidatesList->ValueMember = "Id";>CandidatesList->DisplayMember = "Name";>CandidatesList->DataSource = msi->GetCandidates();>CandidatesList->Text = this->_ClientName;>Description->Text = this->_Description;
}
{>CandidatesList->ValueMember = "Id";>CandidatesList->DisplayMember = "Name";>CandidatesList->DataSource = msi->GetCandidates();>CandidatesList->SelectedIndex = -1;
}
}(Exception ^ e)
{::Show("Ошибка соединения с базой даных");
}
}: System::Void AddMeetingButton_Click(System::Object^ sender, System::EventArgs^ e) {^ msi = gcnew MySqlInterface;candidateId = 0;
{>AddUpdateMeeting(int::Parse(this->Id->Text), this->_IdUser, this->Day->Value, this->BeginTime->Value, this->EndTime->Value, int::Parse(this->CandidatesList->SelectedIndex == -1 ? "0" : this->CandidatesList->SelectedValue->ToString()), this->Description->Text);>Close();
}(Exception ^ e)
{::Show("Ошибка соединения с базой даных");
}
}: System::Void CancelMeetingButton_Click(System::Object^ sender, System::EventArgs^ e) {
this->Close();
}
};
}