Курсовая работа: Телефонная компания
if(ChoiseToLV2==2)
{
String ^q="delete from lgot where id_lgot="+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();
}
if(ChoiseToLV2==3)
{
String ^q="delete from Klient where id_klient="+Convert::ToInt32(this->textBox9->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(),'УдалениезаписивтаблицеКлиентс ID "+Convert::ToInt32(this->textBox9->Text)+"');";
cmd=gcnew System::Data::OleDb::OleDbCommand(q,cn);
rdr=cmd->ExecuteReader();
rdr->Close();
}
if(ChoiseToLV2==4)
{
String ^q="delete from ys_ab where id_ys_ab="+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();