Курсовая работа: Телефонная компания
if(ChoiseToLV2==2)
{
String ^q="insert into Lgot (Opisanie,Stoimost)VALUES('"+this->textBox10->Text+"',"+Convert::ToInt32(this->textBox11->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();
}
if(ChoiseToLV2==3)
{
String ^q="insert into Klient (Surname,ab_name,Num,bill)VALUES('"+this->textBox10->Text+"','"+this->textBox11->Text+"',"+Convert::ToInt32(this->textBox12->Text)+","+Convert::ToDouble(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();
}
if(ChoiseToLV2==4)
{
String ^q="insert into ys_ab (Data,Srok,id_service,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(),'Добавлениезаписивтаблицуклиент-услуга');";