Разработка программной системы «Автоматизированная записная книжка», страница 15

GradientRect (clBlue, clBlack, Canvas);

Form4.Refresh;

Label1.Visible:=true;

Label2.Visible:=true;

Label3.Visible:=true;

Label5.Visible:=true;

Edit1.Visible:=true;

Edit2.Visible:=true;

Edit3.Visible:=true;

BitBtn9.Visible:=true;

BitBtn12.Visible:=true;

end;

procedure TForm4.N9Click(Sender: TObject);

begin

Label2.Visible:=false;

Label3.Visible:=false;

Label6.Visible:=false;

Edit1.Visible:=false;

Edit2.Visible:=false;

Edit3.Visible:=false;

BitBtn5.Visible:=false;

BitBtn6.Visible:=false;

BitBtn7.Visible:=false;

BitBtn8.Visible:=false;

BitBtn9.Visible:=false;

BitBtn11.Visible:=false;

BitBtn12.Visible:=false;

BitBtn13.Visible:=false;

ComboBox2.Visible:=false;

GradientRect (clBlue, clBlack, Canvas);

Form4.Refresh;

Label1.Visible:=true;

Label4.Visible:=true;

Label5.Visible:=true;

Edit4.Visible:=true;

BitBtn10.Visible:=true;

Edit4.Clear;

end;

procedure TForm4.BitBtn10Click(Sender: TObject);

var v: integer;

begin

DataModule1.ADOQuery3.Close;

DataModule1.ADOQuery3.SQL.Clear;

DataModule1.ADOQuery3.SQL.Add('select * from books where Nazvanie='''+Edit4.Text+''' ');

DataModule1.ADOQuery3.Open;

v:=DataModule1.ADOQuery3.Fields[0].AsInteger;

Edit1.Text:=DataModule1.ADOQuery3.Fields[1].AsString;

Edit2.Text:=DataModule1.ADOQuery3.Fields[2].AsString;


Edit3.Text:=DataModule1.ADOQuery3.Fields[3].AsString;

Label4.Visible:=false;

Label6.Visible:=false;

Edit4.Visible:=false;

BitBtn5.Visible:=false;

BitBtn8.Visible:=false;

BitBtn9.Visible:=false;

BitBtn7.Visible:=false;

BitBtn6.Visible:=false;

BitBtn10.Visible:=false;

BitBtn11.Visible:=false;

GradientRect (clBlue, clBlack, Canvas);

Form4.Refresh;

Label1.Visible:=true;

Label2.Visible:=true;

Label3.Visible:=true;

Label5.Visible:=true;

Edit1.Visible:=true;

Edit2.Visible:=true;

Edit3.Visible:=true;

BitBtn13.Visible:=true;

end;

procedure TForm4.N10Click(Sender: TObject);

begin

BitBtn10.Visible:=false;

BitBtn5.Visible:=false;

BitBtn6.Visible:=false;

BitBtn7.Visible:=false;

BitBtn8.Visible:=false;

BitBtn9.Visible:=false;

BitBtn12.Visible:=false;

BitBtn13.Visible:=false;

Edit1.Visible:=false;

Edit2.Visible:=false;

Edit3.Visible:=false;

Label1.Visible:=false;

Label2.Visible:=false;

Label3.Visible:=false;

ComboBox2.Visible:=false;

Edit4.Clear;

GradientRect (clBlue, clBlack, Canvas);

Form4.Refresh;

BitBtn11.Visible:=true;

Edit4.Visible:=true;

Label4.Visible:=true;

Label5.Visible:=true;

Label6.Visible:=true;

end;

procedure TForm4.BitBtn11Click(Sender: TObject);

var v: integer;

begin

DataModule1.ADOQuery3.Close;


DataModule1.ADOQuery3.SQL.Clear;

DataModule1.ADOQuery3.SQL.Add('select * from books where FIO_avtora='''+Edit4.Text+''' ');

DataModule1.ADOQuery3.Open;

v:=DataModule1.ADOQuery3.Fields[0].AsInteger;

Edit1.Text:=DataModule1.ADOQuery3.Fields[1].AsString;

Edit2.Text:=DataModule1.ADOQuery3.Fields[2].AsString;

Edit3.Text:=DataModule1.ADOQuery3.Fields[3].AsString;

Label4.Visible:=false;

Label6.Visible:=false;

Edit4.Visible:=false;

BitBtn7.Visible:=false;

BitBtn6.Visible:=false;;

BitBtn5.Visible:=false;

BitBtn8.Visible:=false;

BitBtn9.Visible:=false;

BitBtn10.Visible:=false;

BitBtn11.Visible:=false;

GradientRect (clBlue, clBlack, Canvas);

Form4.Refresh;

Label1.Visible:=true;

Label2.Visible:=true;

Label3.Visible:=true;

Label5.Visible:=true;

Edit1.Visible:=true;

Edit2.Visible:=true;

Edit3.Visible:=true;

BitBtn13.Visible:=true;

Edit4.Clear;

end;

procedure TForm4.N3Click(Sender: TObject);

begin

form7.Show;

form4.Close;

Edit1.Visible:=false;

Edit2.Visible:=false;

Edit3.Visible:=false;

Edit4.Visible:=false;

Label1.Visible:=false;

Label2.Visible:=false;

Label3.Visible:=false;

Label4.Visible:=false;

Label6.Visible:=false;

BitBtn5.Visible:=false;

BitBtn6.Visible:=false;

BitBtn7.Visible:=false;

BitBtn8.Visible:=false;

BitBtn9.Visible:=false;

BitBtn10.Visible:=false;

BitBtn11.Visible:=false;