Курсовые работы / ПРИС П _16
.pdfend; |
|
end; |
|
procedure TFoplP.BitBtn4Click(Sender: TObject); |
|
begin |
|
dm.opp.Active:=false; |
|
dm.opp.CommandText:='Select id_op,([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ) as fio_ok,([adr_z]&", . "&[dom_z]&", |
. "&[kv_z]) as |
adr,dataop_op,sum(st_pos) as summa from oplata,pozicii,otvk,zil '+
'where (id_z=id_z_ok) and (id_ok=id_ok_op) and (id_op=id_op_pos) and (fact_op=true) and (adr_z like "%'+e2.Text+'%") and (([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ) like "%'+e1.Text+'%") group by id_op,([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ),([adr_z]&", . "&[dom_z]&", .
"&[kv_z]),dataop_op'; |
|
|
|
|
dm.opp.Active:=true; |
|
|
|
|
end; |
|
|
|
|
procedure TFoplP.Button1Click(Sender: TObject); |
|
|
|
|
begin |
|
|
|
|
dm.opp.Active:=false; |
|
|
|
|
dm.opp.CommandText:='Select id_op,([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ) as fio_ok,([adr_z]&", |
. "&[dom_z]&", |
. "&[kv_z]) as |
||
adr,dataop_op,sum(st_pos) as summa from oplata,pozicii,otvk,zil '+ |
|
|
|
|
'where (id_z=id_z_ok) and (id_ok=id_ok_op) and (id_op=id_op_pos) and (fact_op=true) and (([adr_z]&", |
. "&[dom_z]&", |
. "&[kv_z]) like |
||
"%'+e2.Text+'%") and (([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ) like "%'+e1.Text+'%") group by |
id_op,([fam_ok]&" "&[ima_ok]&" "&[ot_ok] |
|||
),([adr_z]&", . "&[dom_z]&", |
. "&[kv_z]) ,dataop_op order by dataop_op'; |
|
|
|
dm.opp.Active:=true; |
|
|
|
|
end; |
|
|
|
|
procedure TFoplP.Button2Click(Sender: TObject); |
|
|
|
|
begin |
|
|
|
|
dm.opp.Active:=false; |
|
|
|
|
dm.opp.CommandText:='Select id_op,([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ) as fio_ok,([adr_z]&", |
. "&[dom_z]&", |
. "&[kv_z]) as |
||
adr,dataop_op,sum(st_pos) as summa from oplata,pozicii,otvk,zil '+ |
|
|
|
|
'where (id_z=id_z_ok) and (id_ok=id_ok_op) and (id_op=id_op_pos) and (fact_op=true) and (([adr_z]&", |
. "&[dom_z]&", |
. "&[kv_z]) like |
||
"%'+e2.Text+'%") and (([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ) like "%'+e1.Text+'%") group by |
id_op,([fam_ok]&" "&[ima_ok]&" "&[ot_ok] |
|||
),([adr_z]&", . "&[dom_z]&", |
. "&[kv_z]),dataop_op order by sum(st_pos)'; |
|
|
|
dm.opp.Active:=true; |
|
|
|
|
end; |
|
|
|
|
procedure TFoplP.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
|
|
|
|
begin |
|
|
|
|
dm.opp.Active:=false; |
|
|
|
|
e1.Clear;e2.Clear; |
|
|
|
|
end; |
|
|
|
|
procedure TFoplP.Button3Click(Sender: TObject); |
|
|
|
|
begin |
|
|
|
|
dm.opp.Active:=false; |
|
|
|
|
dm.opp.CommandText:='Select |
id_op,([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ) as fio_ok,([adr_z]&", |
. "&[dom_z]&", |
. "&[kv_z]) as |
adr,dataop_op,sum(st_pos) as summa from oplata,pozicii,otvk,zil '+
'where (id_z=id_z_ok) and (id_ok=id_ok_op) and (id_op=id_op_pos) and (fact_op=true) group by id_op,([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ),([adr_z]&", . "&[dom_z]&", . "&[kv_z]),dataop_op';
dm.opp.Active:=true;
end;
end. unit ot1; interface uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ComCtrls, ExtCtrls;
type
62
TFot1 = class(TForm)
Panel1: TPanel;
dtp1: TDateTimePicker; Label1: TLabel; BitBtn1: TBitBtn;
procedure BitBtn1Click(Sender: TObject); private
{Private declarations } public
{Public declarations } end;
var
Fot1: TFot1; implementation uses datm, main; {$R *.dfm}
procedure TFot1.BitBtn1Click(Sender: TObject); begin
dm.temp.Active:=false;
dm.temp.CommandText:='Select sum(st_pos) from pozicii,oplata where (id_op=id_op_pos) and (datar_op<=#'+fmain.data(dtp1.Date)+'#) and ((dataop_op>#'+fmain.data(dtp1.Date)+'#) OR (dataop_op is Null))';
dm.temp.Active:=true;
showmessage(' : ' + dm.temp.Fields[0].AsString); end;
end. unit ot2; interface uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ComCtrls, ExtCtrls;
type
TFot2 = class(TForm)
Panel1: TPanel;
Label1: TLabel;
dtp1: TDateTimePicker; BitBtn1: TBitBtn; Label2: TLabel;
dtp2: TDateTimePicker;
procedure BitBtn1Click(Sender: TObject); private
{Private declarations } public
{Public declarations } end;
var
Fot2: TFot2; implementation uses datm, main; {$R *.dfm}
function ReplaceStr(Str, SubStr, Replace: string): string;
д |
ж |
var
i:Integer;
63
begin Result:= ''; repeat
i:=Pos(SubStr, Str); if i > 0 then begin
Result:=Result+Copy(Str,1,I-1)+Replace;
Str:=Copy(Str,i+Length(SubStr),MaxInt); end else Result:=Result+Str;
until i<=0; end;
procedure TFot2.BitBtn1Click(Sender: TObject); begin
dm.temp.Active:=false;
dm.temp.CommandText:='Select max(st_rc) from rcen where (data_rc BETWEEN #'+fmain.data(dtp1.Date)+'# and #'+fmain.data(dtp2.Date)+'#) ';
dm.temp.Active:=true;
tmp:=dm.temp.Fields[0].AsString; if trim(tmp)='' then
begin dm.temp.Active:=false;
dm.temp.CommandText:='Select max(st_rc) from rcen where (data_rc <= #'+fmain.data(dtp1.Date)+'# )'; dm.temp.Active:=true;
tmp:=dm.temp.Fields[0].AsString;
end;
if trim(tmp)='' then begin
ЬСШаЦОЬЬКРО(' |
'); |
|
exit; |
|
|
end; |
|
|
tmp:=ReplaceStr(tmp,',','.'); |
|
|
dm.temp.Active:=false; |
|
|
dm.temp.CommandText:='Select |
nazv_us from uslugi,rcen where (id_us=id_us_rc) and (st_rc='+tmp+') and |
((data_rc BETWEEN |
#'+fmain.data(dtp1.Date)+'# and #'+fmain.data(dtp2.Date)+'#) OR (data_rc <= #'+fmain.data(dtp1.Date)+'# ))'; |
|
|
dm.temp.Active:=true; |
|
|
showmessage(' |
: ' + dm.temp.Fields[0].AsString); |
|
end; |
|
|
end. unit ot3; |
|
|
interface |
|
|
uses |
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Spin, Buttons, ExtCtrls,dateutils, WordXP, OleServer,registry;
type
TFot3 = class(TForm) Panel1: TPanel; Label1: TLabel; BitBtn1: TBitBtn; se1: TSpinEdit; Label2: TLabel;
WordApplication1: TWordApplication; WordDocument1: TWordDocument; procedure BitBtn1Click(Sender: TObject);
64
private
{Private declarations } public
{Public declarations } end;
var
Fot3: TFot3;
implementation
uses datm, main;
{$R *.dfm}
procedure TFot3.BitBtn1Click(Sender: TObject); var data:tdatetime;
Template,NewTemplate,FindText, NewStr, Replace,ReplaceWith:OleVariant; |
|
|
|||||
LinkToFile,SaveWithDocument,Range:OleVariant; |
|
|
|
|
|||
Table1: Table; |
|
|
|
|
|
|
|
i: integer; |
|
|
|
|
|
|
|
flag:boolean; |
|
|
|
|
|
|
|
Reg: TRegistry; |
|
|
|
|
|
|
|
begin |
|
|
|
|
|
|
|
// |
, |
|
Word |
|
|
|
|
Reg := TRegistry.Create; |
|
|
|
|
|
||
Reg.RootKey := HKEY_CLASSES_ROOT; |
|
|
|
|
|||
flag:=reg.KeyExists('Word.Application'); |
|
|
|
|
|||
reg.Free; |
|
|
|
|
|
|
|
//flag:=true; |
|
|
|
|
|
|
|
if flag=false then |
|
|
|
|
|
||
begin |
|
|
|
|
|
|
|
application.MessageBox('Word |
',' |
',mb_ok+mb_iconstop); |
|
|
|||
exit; |
|
|
|
|
|
|
|
end; |
|
|
|
|
|
|
|
WordApplication1.Connect; // |
|
|
|
|
|
||
// |
|
otchet.dot |
Word |
|
|
|
|
Template:=ExtractFilePath(Application.EXEName)+'\Data\ |
\ |
.dot'; // |
|
||||
WordApplication1.Documents.Add(Template,EmptyParam,EmptyParam,EmptyParam);// |
|
||||||
WordDocument1.ConnectTo(WordApplication1.ActiveDocument); // |
WordDocument1 c |
( . . |
|||||
|
|
|
) |
|
|
|
|
// |
|
|
|
|
|
|
|
TКЛХО1:=АШЫНDШМЮЦОЧЭ1.TКЛХОЬ.IЭОЦ(1); // |
|
TКЛХО1 |
|
|
|||
//WordDocument1.Tables - |
|
( |
TКЛХОЬ), АШЫНDШМЮЦОЧЭ1.TКЛХОЬ.IЭОЦ(Т) - i- |
|
|||
data:=incday(date,-se1.Value); |
|
|
|
|
|
||
dm.temp.Active:=false; |
|
|
|
|
|
||
dm.temp.CommandText:='Select |
([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ) |
as fio_ok,([sp_ok]&"-"&[np_ok]) |
as pasp,([adr_z]&", . |
||||
"&[dom_z]&", |
. "&[kv_z]) as adr from zil,otvk,pozicii,oplata '+ |
|
|
'where (id_z=id_z_ok) and (id_ok=id_ok_op) and (id_op=id_op_pos) and (fact_op=FALSE) and (datar_op between date() and
#'+fmain.data(data)+'#) GROUP BY ([fam_ok]&" "&[ima_ok]&" "&[ot_ok] ),([sp_ok]&"-"&[np_ok]),([adr_z]&", . "&[dom_z]&", . "&[kv_z])';
65
dm.temp.Active:=true;
i:=2;
While (not dm.temp.Eof)do begin
Table1.Rows.Add(EmptyParam);
Table1.Cell(i, 1).Range.Text := dm.temp.Fields[0].AsString; Table1.Cell(i, 2).Range.Text := dm.temp.Fields[1].AsString; Table1.Cell(i, 3).Range.Text := dm.temp.Fields[2].AsString; inc(i);dm.temp.next;
end; Table1.Rows.Item(i).Delete;
WordApplication1.Visible:=true; // MS Word WordApplication1.Disconnect; //
end;
end. unit OtvK; interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, DBGrids, StdCtrls, Buttons, ExtCtrls;
type
TFOtvK = class(TForm)
Panel1: TPanel;
Label1: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
e1: TEdit; BitBtn4: TBitBtn; BitBtn5: TBitBtn;
DBGrid1: TDBGrid;
Label2: TLabel;
Button1: TButton;
procedure BitBtn5Click(Sender: TObject); procedure BitBtn4Click(Sender: TObject); procedure BitBtn1Click(Sender: TObject); procedure BitBtn2Click(Sender: TObject); procedure BitBtn3Click(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure Button1Click(Sender: TObject);
private
{Private declarations } public
{Public declarations } end;
var
FOtvK: TFOtvK; implementation
uses datm, aOtvK; {$R *.dfm}
procedure TFOtvK.BitBtn5Click(Sender: TObject); begin
dm.ok.Active:=false;
66
dm.ok.CommandText:='Select id_ok,fam_ok,ima_ok,ot_ok,sp_ok,np_ok,kz_ok,log_ok,([adr_z]&", |
. "&[dom_z]&", . "&[kv_z]) as adr from |
|||||
OtvK,zil WHERE (id_z=id_z_ok) ORDER BY kz_ok'; |
|
|
|
|
|
|
dm.ok.Active:=true; |
|
|
|
|
|
|
end; |
|
|
|
|
|
|
procedure TFOtvK.BitBtn4Click(Sender: TObject); |
|
|
|
|
|
|
begin |
|
|
|
|
|
|
if e1.Text<>'' then |
|
|
|
|
|
|
begin |
|
|
|
|
|
|
dm.ok.Active:=false; |
|
|
|
|
|
|
dm.ok.CommandText:='Select id_ok,fam_ok,ima_ok,ot_ok,sp_ok,np_ok,kz_ok,log_ok,([adr_z]&", |
. "&[dom_z]&", |
. "&[kv_z]) |
as |
adr |
||
from OtvK,zil WHERE (id_z=id_z_ok)and (([sp_ok]&"-"&[np_ok]) = "'+e1.Text+'") ORDER BY kz_ok'; |
|
|
|
|||
dm.ok.Active:=true; |
|
|
|
|
|
|
end |
|
|
|
|
|
|
else |
|
|
|
|
|
|
begin |
|
|
|
|
|
|
dm.ok.Active:=false; |
|
|
|
|
|
|
dm.ok.CommandText:='Select id_ok,fam_ok,ima_ok,ot_ok,sp_ok,np_ok,kz_ok,log_ok,([adr_z]&", |
. "&[dom_z]&", |
. "&[kv_z]) |
as |
adr |
||
from OtvK,zil WHERE (id_z=id_z_ok) ORDER BY kz_ok'; |
|
|
|
|
|
|
dm.ok.Active:=true; |
|
|
|
|
|
|
end |
|
|
|
|
|
|
end; |
|
|
|
|
|
|
procedure TFOtvK.BitBtn1Click(Sender: TObject); |
|
|
|
|
|
|
begin |
|
|
|
|
|
|
faOtvK.Caption:=bitbtn1.Caption; |
|
|
|
|
|
|
faOtvK.cb1.Clear; |
|
|
|
|
|
|
dm.temp.Active:=false; |
|
|
|
|
|
|
dm.temp.CommandText:='Select ([adr_z]&", |
. "&[dom_z]&", |
. "&[kv_z]) from zil order by adr_z'; |
|
|
|
|
dm.temp.Active:=true; |
|
|
|
|
|
|
while not dm.temp.Eof do |
|
|
|
|
|
|
begin |
|
|
|
|
|
|
faOtvK.cb1.Items.Add(dm.temp.Fields[0].AsString); |
|
|
|
|
|
|
dm.temp.Next; |
|
|
|
|
|
|
end; |
|
|
|
|
|
|
tm:=1; |
|
|
|
|
|
|
faOtvK.ShowModal; |
|
|
|
|
|
|
end; |
|
|
|
|
|
|
procedure TFOtvK.BitBtn2Click(Sender: TObject); |
|
|
|
|
|
|
begin |
|
|
|
|
|
|
if dm.ok.Fields[0].AsString='' then exit; |
|
|
|
|
|
|
tm:=2;ind:=dm.ok.RecNo; |
|
|
|
|
|
|
faotvk.Caption:=bitbtn2.Caption; |
|
|
|
|
|
|
tmp:=dm.ok.Fields[0].AsString; |
|
|
|
|
|
|
dm.temp.Active:=false; |
|
|
|
|
|
|
dm.temp.CommandText:='Select log_ok from otvk where id_ok='+tmp+''; |
|
|
|
|
||
dm.temp.Active:=true; |
|
|
|
|
|
|
if dm.temp.Fields[0].AsBoolean=false then |
|
|
|
|
|
|
begin |
|
|
|
|
|
|
faOtvK.cb1.Clear; |
|
|
|
|
|
|
dm.temp.Active:=false; |
|
|
|
|
|
|
dm.temp.CommandText:='Select ([adr_z]&", |
. "&[dom_z]&", |
. "&[kv_z]) from zil order by adr_z'; |
|
|
|
|
dm.temp.Active:=true; |
|
|
|
|
|
|
67
while not dm.temp.Eof do begin
faOtvK.cb1.Items.Add(dm.temp.Fields[0].AsString);
dm.temp.Next;
end; faotvk.cb1.Text:=dm.ok.fieldbyname('adr').AsString; faotvk.e1.Text:=dm.ok.fieldbyname('fam_ok').AsString; faotvk.e5.Text:=dm.ok.fieldbyname('ima_ok').AsString; faotvk.e6.Text:=dm.ok.fieldbyname('ot_ok').AsString; faotvk.e2.Text:=dm.ok.fieldbyname('sp_ok').AsString; faotvk.e3.Text:=dm.ok.fieldbyname('np_ok').AsString; faotvk.e4.Text:=dm.ok.fieldbyname('kz_ok').AsString; faotvk.cb1Change(sender);
dm.com.CommandText:='Update otvk SET log_ok=TRUE WHERE (id_ok='+tmp+')'; dm.com.Execute;
faotvk.ShowModal; end
else begin
ЬСШаЦОЬЬКРО(' |
') |
end;
end;
procedure TFOtvK.BitBtn3Click(Sender: TObject); begin
if dm.ok.Fields[0].AsString='' then exit; tmp:=dm.ok.Fields[0].AsString; dm.temp.Active:=false;
dm.temp.CommandText:='Select log_ok from otvk where id_ok='+tmp+''; dm.temp.Active:=true;
if dm.temp.Fields[0].AsBoolean=false then begin
if application.MessageBox(' ?',' ',mb_yesno+mb_iconquestion)=idyes then begin
dm.com.CommandText:='DELETE * from otvk WHERE (id_ok='+tmp+')'; dm.com.Execute;
dm.ok.Requery();
end; end
else begin
ЬСШаЦОЬЬКРО(' |
') |
end;
end;
procedure TFOtvK.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin
dm.ok.Active:=false;
e1.Clear;
end;
procedure TFOtvK.Button1Click(Sender: TObject); begin
dm.ok.Active:=false;
68
dm.ok.CommandText:='Select id_ok,fam_ok,ima_ok,ot_ok,sp_ok,np_ok,kz_ok,log_ok,([adr_z]&", . "&[dom_z]&", . "&[kv_z]) as adr from OtvK,zil WHERE (id_z=id_z_ok) ORDER BY fam_ok,ima_ok,ot_ok';
dm.ok.Active:=true;
end;
end. unit Pozicii; interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids;
type
TFPozicii = class(TForm)
DBGrid1: TDBGrid;
private
{Private declarations } public
{Public declarations } end;
var
FPozicii: TFPozicii; implementation
uses datm; {$R *.dfm} end. unit Uslugi; interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, StdCtrls, Buttons, ExtCtrls;
type
TFUslugi = class(TForm)
Panel1: TPanel;
Label1: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
e1: TEdit;
BitBtn4: TBitBtn;
BitBtn5: TBitBtn;
DBGrid1: TDBGrid;
Button1: TButton;
procedure BitBtn1Click(Sender: TObject); procedure BitBtn2Click(Sender: TObject); procedure BitBtn3Click(Sender: TObject); procedure BitBtn4Click(Sender: TObject); procedure BitBtn5Click(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure Button1Click(Sender: TObject);
private
{Private declarations } public
{Public declarations } end;
var
69
FUslugi: TFUslugi; implementation
uses datm, aUslugi; {$R *.dfm}
procedure TFUslugi.BitBtn1Click(Sender: TObject); begin
fauslugi.Caption:=bitbtn1.Caption;
tm:=1;
fauslugi.cb1.Clear;
dm.temp.Active:=false;
dm.temp.CommandText:='Select nazv_mr from metr order by nazv_mr'; dm.temp.Active:=true;
while not dm.temp.Eof do begin
fauslugi.cb1.Items.Add(dm.temp.Fields[0].AsString);
dm.temp.Next;
end;
fauslugi.ShowModal;
end;
procedure TFUslugi.BitBtn2Click(Sender: TObject); begin
if dm.us.Fields[0].AsString='' then exit; tm:=2;ind:=dm.us.RecNo; fauslugi.Caption:=bitbtn2.Caption; tmp:=dm.us.Fields[0].AsString; dm.temp.Active:=false;
dm.temp.CommandText:='Select log_us from uslugi where id_us='+tmp+''; dm.temp.Active:=true;
if dm.temp.Fields[0].AsBoolean=false then begin
fauslugi.cb1.Clear;
dm.temp.Active:=false;
dm.temp.CommandText:='Select nazv_mr from metr order by nazv_mr'; dm.temp.Active:=true;
while not dm.temp.Eof do begin
fauslugi.cb1.Items.Add(dm.temp.Fields[0].AsString);
dm.temp.Next;
end; fauslugi.cb1.Text:=dm.us.fieldbyname('nazv_mr').AsString; fauslugi.e1.Text:=dm.us.fieldbyname('nazv_us').AsString; fauslugi.e2.Text:=dm.us.fieldbyname('tar_us').AsString; fauslugi.cb1Change(sender);
dm.com.CommandText:='Update uslugi SET log_us=TRUE WHERE (id_us='+tmp+')'; dm.com.Execute;
fauslugi.ShowModal; end
else begin
ЬСШаЦОЬЬКРО(' |
') |
end;
end;
70
procedure TFUslugi.BitBtn3Click(Sender: TObject); begin
if dm.us.Fields[0].AsString='' then exit; tmp:=dm.us.Fields[0].AsString; dm.temp.Active:=false;
dm.temp.CommandText:='Select log_us from uslugi where id_us='+tmp+''; dm.temp.Active:=true;
if dm.temp.Fields[0].AsBoolean=false then begin
if application.MessageBox(' ?',' ',mb_yesno+mb_iconquestion)=idyes then begin
dm.com.CommandText:='DELETE * from uslugi WHERE (id_us='+tmp+')'; dm.com.Execute;
dm.us.Requery();
end; end
else begin
ЬСШаЦОЬЬКРО(' |
') |
end; |
|
end; |
|
procedure TFUslugi.BitBtn4Click(Sender: TObject); |
|
begin |
|
dm.us.Active:=false;
dm.us.CommandText:='select id_us,nazv_us,tar_us,nazv_mr from metR,uslugi where (id_mr=id_mr_us) and (nazv_us like "%'+e1.Text+'%")'; dm.us.Active:=true;
end;
procedure TFUslugi.BitBtn5Click(Sender: TObject); begin
dm.us.Active:=false;
dm.us.CommandText:='select id_us,nazv_us,tar_us,nazv_mr from metR,uslugi where (id_mr=id_mr_us) and (nazv_us like "%'+e1.Text+'%") order by tar_us';
dm.us.Active:=true;
end;
procedure TFUslugi.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin
dm.us.Active:=false;
e1.Clear;
end;
procedure TFUslugi.Button1Click(Sender: TObject); begin
dm.us.Active:=false;
dm.us.CommandText:='select id_us,nazv_us,tar_us,nazv_mr from metR,uslugi where (id_mr=id_mr_us)'; dm.us.Active:=true;
end;
end. unit Zil; interface uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Grids, DBGrids, ExtCtrls;
type TFZil = class(TForm)
71