1 .............................................................................................. 3
2 .................................................................. 4
2.1 .......................................................................................... 6
3 ............................................................................................. 7
3.1. ..................................................................................................... 7
3.2. ....................................................................................................... 8
4 ........................................................................ 10
5 ........................................................................................... 16
........................................................................................................ 27
............................................................... 28
() , , , , :
;
;
;
;
;
;
;
;
1 bdkvartir .
1 bdkvartir
ID apartment | + | + | ||
ID client | + | |||
Price | + | |||
Adress | + | |||
Area | ||||
Metro | ||||
Time to metro | ||||
Rating | ||||
Rooms | + | |||
Status | + |
2 lients .
2 lients
ID client | + | + | ||
SNP | + | |||
Adress | ||||
Serial and number pass | + | |||
Service | + | |||
Telephone | + |
3 Buy .
3 Buy
ID apartment | + | + | ||
ID client | + | |||
Payable | + | |||
Date | + |
4 Sell .
|
|
4 Sell
ID apartment | + | + | ||
ID client | + | |||
Payable | + | |||
Date | + |
5 payment for services .
5 payment for services
Payable | + | + | ||
Service | + | |||
Date | + |
6 Service .
6 Service
Byu | + | |||
Sell | + | |||
Payment for services | + | + | ||
Date | + |
1.
.1
!!!!!! !
!
1)
qry1.Close; qry1.SQL.Clear; qry1.SQL.Add('select * from Klients'); qry1.Open; |
2)
procedure TForm7.btn1Click(Sender: TObject); begin Form7.RvProject1.Execute; end; |
3)
SELECT * FROM Klients ORDER BY SNP; |
4)
qry1.Close; qry1.SQL.Clear; qry1.SQL.Add('select * from Klients where SNP like "'+Edit1.Text+'%"'); qry1.Open; |
:
1. (. 2).
. 2
- (. 3).
. 3
.
1. . (. 4)
:
.
.
.
.
.
.
.
.
.
. 4
2. . (. 5)
. 5
3. . (. 6)
.6
4. . (. 7)
. 7
5. . (. 8)
. 8
6. . (. 9)
. 9
7. . (. 10)
. 10
8. . (. 11)
. 11
9. . (. 12)
. 12
program Project1; uses Forms, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas' {Form2}, Unit3 in 'Unit3.pas' {Form3}, Unit4 in 'Unit4.pas' {Form4}, Unit5 in 'Unit5.pas' {Form5}, Unit6 in 'Unit6.pas' {Form6}, Unit7 in 'Unit7.pas' {Form7}, Unit8 in 'Unit8.pas' {Form8}, Unit9 in 'Unit9.pas' {Form9}; {$R *.res} begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm2, Form2); Application.CreateForm(TForm3, Form3); Application.CreateForm(TForm4, Form4); Application.CreateForm(TForm5, Form5); Application.CreateForm(TForm6, Form6); Application.CreateForm(TForm7, Form7); Application.CreateForm(TForm8, Form8); Application.CreateForm(TForm9, Form9); Application.Run; end. --------------------------------------------------------------------- unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Label1: TLabel; Button2: TButton; Button3: TButton; Button4: TButton; Button1: TButton; Button5: TButton; Button6: TButton; Button7: TButton; Button8: TButton; Button9: TButton; Label2: TLabel; procedure Button3Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button6Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button7Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button8Click(Sender: TObject); procedure Button9Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation uses Unit2, Unit3, Unit4, Unit5, Unit7, Unit6, Unit8, Unit9; {$R *.dfm} procedure TForm1.Button3Click(Sender: TObject); begin Form1.close; end; procedure TForm1.Button2Click(Sender: TObject); begin form1.Visible:=false; form2.Visible:=true; end; procedure TForm1.Button6Click(Sender: TObject); begin form1.Visible:=false; form3.Visible:=true; end; procedure TForm1.Button4Click(Sender: TObject); begin form1.Visible:=false; form4.Visible:=true; end; procedure TForm1.Button7Click(Sender: TObject); begin form1.Visible:=false; form5.Visible:=true; end; procedure TForm1.Button5Click(Sender: TObject); begin form1.Visible:=false; form7.Visible:=true; end; procedure TForm1.Button1Click(Sender: TObject); begin form1.Visible:=false; form6.Visible:=true; end; procedure TForm1.Button8Click(Sender: TObject); begin form1.Visible:=false; form8.Visible:=true; end; procedure TForm1.Button9Click(Sender: TObject); begin form1.Visible:=false; form9.Visible:=true; end; end. --------------------------------------------------------------------- unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, DBTables, ExtCtrls, DBCtrls, StdCtrls, Mask; type TForm2 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label11: TLabel; dbedtSNP: TDBEdit; dbedt: TDBEdit; dbedtStreet: TDBEdit; dbedtHouse: TDBEdit; dbedtApartment: TDBEdit; Button1: TButton; DBNavigator: TDBNavigator; Table1: TTable; DataSource1: TDataSource; Label7: TLabel; DBEdit1: TDBEdit; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation uses Unit1, Unit3; {$R *.dfm} procedure TForm2.Button1Click(Sender: TObject); begin form2.Visible:=false; form3.Visible:=true; end; end. --------------------------------------------------------------------- unit Unit3; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, XPMan, DBTables, DB, StdCtrls, Grids, DBGrids, DBCtrls, ExtCtrls, RpBase, RpSystem, RpRave, RpDefine, RpCon, RpConDS; type TForm3 = class(TForm) Label1: TLabel; Label3: TLabel; Panel1: TPanel; DBNavigator: TDBNavigator; DBGrid1: TDBGrid; Button1: TButton; Button2: TButton; btn1: TButton; Edit1: TEdit; Table1: TTable; DataSource1: TDataSource; qry2: TQuery; qry1: TQuery; RvDataSetConnection1: TRvDataSetConnection; RvProject1: TRvProject; RvSystem1: TRvSystem; btn3: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Edit1Change(Sender: TObject); procedure btn1Click(Sender: TObject); procedure btn3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form3: TForm3; implementation uses Unit1; {$R *.dfm} procedure TForm3.Button1Click(Sender: TObject); begin Form3.close; end; procedure TForm3.Button2Click(Sender: TObject); begin form3.Visible:=false; form1.Visible:=true; end; procedure TForm3.Edit1Change(Sender: TObject); begin qry1.Close; qry1.SQL.Clear; qry1.SQL.Add('select * from Klients where SNP like "'+Edit1.Text+'%"'); qry1.Open; end; procedure TForm3.btn1Click(Sender: TObject); begin Form3.RvProject1.Execute; end; procedure TForm3.btn3Click(Sender: TObject); begin qry1.Close; qry1.SQL.Clear; qry1.SQL.Add('select * from Klients'); qry1.Open; end; end. --------------------------------------------------------------------- unit Unit4; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, DBCtrls, StdCtrls, Mask, DB, DBTables; type TForm4 = class(TForm) Table1: TTable; DataSource1: TDataSource; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; Label8: TLabel; Label9: TLabel; dbedtSNP: TDBEdit; dbedt: TDBEdit; dbedtStreet: TDBEdit; dbedtHouse: TDBEdit; dbedtApartment: TDBEdit; Button1: TButton; DBNavigator: TDBNavigator; dbedtLogin: TDBEdit; pas: TDBEdit; DBEdit1: TDBEdit; Table2: TTable; DataSource2: TDataSource; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form4: TForm4; implementation uses Unit5; {$R *.dfm} procedure TForm4.Button1Click(Sender: TObject); begin form4.Visible:=false; form5.Visible:=true; end; end. --------------------------------------------------------------------- unit Unit5; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, XPMan, DBTables, DB, StdCtrls, Grids, DBGrids, DBCtrls, ExtCtrls, RpBase, RpSystem, RpRave, RpDefine, RpCon, RpConDS; type TForm5 = class(TForm) Label1: TLabel; Label3: TLabel; Panel1: TPanel; DBGrid1: TDBGrid; Button1: TButton; Button2: TButton; btn1: TButton; Edit1: TEdit; qry1: TQuery; RvDataSetConnection2: TRvDataSetConnection; RvProject1: TRvProject; RvSystem1: TRvSystem; btn3: TButton; DBNavigator: TDBNavigator; Table1: TTable; DataSource1: TDataSource; procedure Edit1Change(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure btn1Click(Sender: TObject); procedure btn3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form5: TForm5; implementation uses Unit1; {$R *.dfm} procedure TForm5.Edit1Change(Sender: TObject); begin qry1.Close; qry1.SQL.Clear; qry1.SQL.Add('select * from bdkvartir where Metro like "'+Edit1.Text+'%"'); qry1.Open; end; procedure TForm5.Button2Click(Sender: TObject); begin form5.Visible:=false; form1.Visible:=true; end; procedure TForm5.Button1Click(Sender: TObject); begin Form5.close; end; procedure TForm5.btn1Click(Sender: TObject); begin Form5.RvProject1.Execute; end; procedure TForm5.btn3Click(Sender: TObject); begin qry1.Close; qry1.SQL.Clear; qry1.SQL.Add('select * from bdkvartir'); qry1.Open; end; end. --------------------------------------------------------------------- unit Unit6; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, DBTables, StdCtrls, DBCtrls, Mask, Grids, DBGrids, ExtCtrls; type TForm6 = class(TForm) Label2: TLabel; Splitter1: TSplitter; Label1: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; Label8: TLabel; Label9: TLabel; Button1: TButton; Panel1: TPanel; DBGrid1: TDBGrid; DBEdit1: TDBEdit; DBNavigator1: TDBNavigator; DBEdit2: TDBEdit; DBEdit3: TDBEdit; DBEdit4: TDBEdit; Edit1: TEdit; Edit2: TEdit; Button4: TButton; Table1: TTable; DataSource1: TDataSource; Table2: TTable; DataSource2: TDataSource; Label10: TLabel; btn3: TButton; qry1: TQuery; procedure Button4Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure btn3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form6: TForm6; implementation uses Unit8; {$R *.dfm} procedure TForm6.Button4Click(Sender: TObject); var a,b: real; c,d: real; begin a:= StrToFloat(Edit1.Text); b:= StrToFloat(Edit2.Text); c:= a * b; d:= (a * b) + a; Label7.Caption:= FloatToStrF(c,ffCurrency,10,2); Label10.Caption:= FloatToStrF(d,ffCurrency,10,2); end; procedure TForm6.Button1Click(Sender: TObject); begin form6.Visible:=false; form8.Visible:=true; end; procedure TForm6.btn3Click(Sender: TObject); begin qry1.Close; qry1.SQL.Clear; qry1.SQL.Add('select * from Service1'); qry1.Open; end; end. unit Unit7; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, DBTables, StdCtrls, DBCtrls, Mask, Grids, DBGrids, ExtCtrls; type TForm7 = class(TForm) Label2: TLabel; Splitter1: TSplitter; Label1: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; Label8: TLabel; Label9: TLabel; Button1: TButton; Panel1: TPanel; DBGrid1: TDBGrid; DBEdit1: TDBEdit; DBNavigator1: TDBNavigator; DBEdit2: TDBEdit; DBEdit3: TDBEdit; DBEdit4: TDBEdit; Edit1: TEdit; Edit2: TEdit; Button4: TButton; Table1: TTable; DataSource1: TDataSource; Table2: TTable; DataSource2: TDataSource; Label10: TLabel; btn3: TButton; qry1: TQuery; procedure Button4Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure btn3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form7: TForm7; implementation uses Unit8; {$R *.dfm} procedure TForm7.Button4Click(Sender: TObject); Var a,b: real; c,d: real; begin a:= StrToFloat(Edit1.Text); b:= StrToFloat(Edit2.Text); c:= a * b; d:= (a * b) + a; Label7.Caption:= FloatToStrF(c,ffCurrency,10,2); Label10.Caption:= FloatToStrF(d,ffCurrency,10,2); end; procedure TForm7.Button1Click(Sender: TObject); begin form7.Visible:=false; form8.Visible:=true; end; procedure TForm7.btn3Click(Sender: TObject); begin qry1.Close; qry1.SQL.Clear; qry1.SQL.Add('select * from Buy'); qry1.Open; end; end. unit Unit8; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, XPMan, DBTables, DB, StdCtrls, ExtCtrls, DBCtrls, Mask; type TForm8 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; DBEdit1: TDBEdit; DBNavigator1: TDBNavigator; DBEdit2: TDBEdit; DBEdit3: TDBEdit; Button2: TButton; Button3: TButton; Table2: TTable; DataSource2: TDataSource; procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form8: TForm8; implementation uses Unit1; {$R *.dfm} procedure TForm8.Button2Click(Sender: TObject); begin form8.Visible:=false; form1.Visible:=true; end; procedure TForm8.Button3Click(Sender: TObject); begin Form8.close; end; end. unit Unit9; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, XPMan, DBTables, DB, Grids, DBGrids, ExtCtrls, StdCtrls, DBCtrls, Mask, RpBase, RpSystem, RpRave, RpDefine, RpCon, RpConDS; type TForm9 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; DBEdit1: TDBEdit; DBNavigator1: TDBNavigator; DBEdit2: TDBEdit; DBEdit3: TDBEdit; Button2: TButton; Button3: TButton; DBEdit4: TDBEdit; Panel1: TPanel; DBGrid1: TDBGrid; Button1: TButton; Button4: TButton; Table2: TTable; DataSource2: TDataSource; Table1: TTable; DataSource1: TDataSource; qry1: TQuery; Label6: TLabel; btn3: TButton; procedure Button3Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure btn3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form9: TForm9; implementation uses Unit1, Unit6, Unit7; {$R *.dfm} procedure TForm9.Button3Click(Sender: TObject); begin Form1.close; end; procedure TForm9.Button2Click(Sender: TObject); begin form9.Visible:=false; form1.Visible:=true; end; procedure TForm9.Button4Click(Sender: TObject); begin form9.Visible:=false; form6.Visible:=true; end; procedure TForm9.Button1Click(Sender: TObject); begin form9.Visible:=false; form7.Visible:=true; end; procedure TForm9.btn3Click(Sender: TObject); begin end; end. |
|
|
|
|
|
|
|
|
.
- , - .
.
- . . , . . , . . , . . . Delphi. . 2005.
- . . Delphi . Borland Delphi 2006 = Delphi for Dummies. .: , 2007. 336 . ISBN 0-7645-0179-8
- . SQL / . . 3- . .: , 2005. 288 .
- , . SQL / . . .: , 2005. 496 .
- |
- Delphi Sources Delphi, 800 , , , FAQ
- DELPHI
- Delphi Plus , Delphi
- Torrys Delphi Pages Delphi (.)
- DRKB Delphi