Курсовая работа: Телефонная компания
}
if(ChoiseToLV2==5)
{
String ^q="delete from services where id_service="+Convert::ToInt32(this->textBox9->Text);
cmd=gcnew System::Data::OleDb::OleDbCommand(q,cn);
rdr=cmd->ExecuteReader();
q="insert into changes(id_user,data,Opisanie) values("+id+",Now(),'Удалениезаписивтаблицеуслугас ID "+Convert::ToInt32(this->textBox9->Text)+"');";
cmd=gcnew System::Data::OleDb::OleDbCommand(q,cn);
rdr=cmd->ExecuteReader();
rdr->Close();
}
rdr->Close();
cn->Close();
}
//Действия при нажатии на кнопку "Добавить"
private: System::Void button16_Click(System::Object^ sender, System::EventArgs^ e) {
cn->Open();
System::Data::OleDb::OleDbCommand ^cmd;
System::Data::OleDb::OleDbDataReader ^rdr;
if(ChoiseToLV2==1)
{
String ^q="insert into lg_ab (Data,Srok,id_lgot,id_klient) VALUES('"+this->textBox10->Text+"','"+this->textBox11->Text+"',"+Convert::ToInt32(this->textBox12->Text)+","+Convert::ToInt32(this->textBox13->Text)+")";
cmd=gcnew System::Data::OleDb::OleDbCommand(q,cn);
rdr=cmd->ExecuteReader();
rdr->Close();
q="insert into changes(id_user,data,Opisanie) values("+id+",Now(),'Добавлениезаписивтаблицуклиент-льгота');";
cmd=gcnew System::Data::OleDb::OleDbCommand(q,cn);
rdr=cmd->ExecuteReader();
rdr->Close();