Курсовые работы / ПРИС П _16
.pdf.6 – |
(3 |
) |
.7 – |
(4 |
) |
32
.8 – |
(3 |
) |
.9 – |
(3 |
) |
33
.10 – |
(3 |
) |
.11 – |
(4 |
) |
34
.12 – |
(3 |
) |
.13– |
(3 |
) |
35
.14 –
36
.15–
37
|
.1 – |
||||
|
|
|
|
|
|
|
|
|
|
|
|
Pass |
|
|
|
|
|
|
|
|
|
|
|
login |
|
|
50 |
|
|
|
|
|
|
|
|
pass |
|
|
50 |
|
|
|
|
|
|
|
|
rights |
|
|
|
|
|
|
|
|
|
|
|
OtvK |
|
|
|
|
|
|
|
|
|
|
|
id_ok |
|
|
|
|
( |
|
|
|
|
|
) |
|
|
|
|
|
|
Fam_ok |
|
|
|
|
|
|
|
|
|
|
|
Ima_ok |
|
|
- |
|
|
|
|
|
|
|
|
Ot_ok |
|
|
- |
|
|
|
|
|
|
|
|
Sp_ok |
|
|
200 |
|
|
|
|
|
|
|
|
Np_ok |
|
|
- |
|
|
|
|
|
|
|
|
Kz_ok |
|
|
|
|
|
|
|
|
|
|
|
Log_ok |
|
|
- |
|
|
|
|
|
|
|
|
Id_z_ok |
|
|
- |
|
|
|
|
|
|
|
|
MetR |
|
|
|
|
|
|
|
|
|
|
|
id_mr |
|
|
|
|
( |
|
|
|
|
|
) |
|
|
|
|
|
|
Nazv_mr |
|
|
- |
|
|
|
|
|
|
|
|
Pozicii |
|
|
|
|
|
|
|
|
|
|
|
id_pos |
|
|
|
|
( |
|
|
|
|
|
) |
|
|
|
|
|
|
Id_us_pos |
|
|
|
|
|
|
|
|
|
|
|
St_pos |
|
|
- |
|
|
|
|
|
|
|
|
Id_op_pos |
|
|
- |
|
|
|
|
|
|
|
|
|
38 |
|
|
|
.1 |
|
|
|
|
|
|
|
|
Oplata |
|
|
|
|
id_op |
|
|
|
( |
|
|
|
|
) |
id_ok_op |
|
|
|
|
|
|
|
|
|
Datar_op |
|
|
|
|
|
|
|
|
|
Datarop_id |
|
|
|
|
|
|
|
|
|
Fact_op |
|
- |
|
|
|
|
|
|
|
RCen |
|
|
|
|
id_rc |
|
|
|
( |
|
|
|
|
) |
Id_us_rc |
|
|
|
|
|
|
|
|
|
st_du |
|
- |
|
|
|
|
|
|
|
log_du |
|
- |
|
|
Uslugi |
|
|
|
|
id_us |
|
|
|
( |
|
|
|
|
) |
Nazv_us |
|
|
|
|
|
|
|
|
|
Tar_us |
|
- |
|
|
|
|
|
|
|
Id_mr_us |
|
- |
|
|
log_du |
|
- |
|
|
Zil |
|
|
|
|
id_z |
|
|
|
( |
|
|
|
|
) |
Adr_z |
|
- |
|
|
Pl_z |
|
- |
|
|
Dom_z |
|
- |
|
|
log_du |
|
- |
|
|
Kv_z |
|
|
|
|
|
|
|
|
|
39
unit aOtvK;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls;
type
TFaOtvK = class(TForm) Panel1: TPanel;
Label1: TLabel;
Label2: TLabel; e1: TEdit; BitBtn1: TBitBtn; cb1: TComboBox; e2: TEdit;
e3: TEdit; Label3: TLabel; Label4: TLabel; e4: TEdit; Label5: TLabel; e5: TEdit; Label6: TLabel; e6: TEdit; Label7: TLabel;
procedure cb1KeyPress(Sender: TObject; var Key: Char); procedure cb1Change(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure BitBtn1Click(Sender: TObject);
procedure e1KeyPress(Sender: TObject; var Key: Char); procedure e5KeyPress(Sender: TObject; var Key: Char); procedure e6KeyPress(Sender: TObject; var Key: Char); procedure FormShow(Sender: TObject);
private
{Private declarations } public
{Public declarations } end;
var
FaOtvK: TFaOtvK;
implementation
uses datm;
{$R *.dfm}
procedure TFaOtvK.cb1KeyPress(Sender: TObject; var Key: Char); begin
key:=#0;
end;
procedure TFaOtvK.cb1Change(Sender: TObject); begin
if id_z <> '' then begin
dm.com.CommandText:='Update zil SET log_z=FALSE where (id_z='+id_z+')'; dm.com.Execute;
id_z:=''; end;
dm.temp.Active:=false;
dm.temp.CommandText:='Select id_z from zil where (([adr_z]&", . "&[dom_z]&", . "&[kv_z])="'+cb1.text+'") and (log_z=FALSE)';
dm.temp.Active:=true; |
|
|
if dm.temp.RecordCount=0 then |
|
|
begin |
|
|
SHOАMESSAGE(' |
!'+#13+' |
'); |
40
cb1.Text:=''; id_z:=''; end
else begin
id_z:=dm.temp.fields[0].asstring;
dm.com.CommandText:='Update zil SET log_z=TRUE where (id_z='+id_z+')'; dm.com.Execute;
end;
end;
procedure TFaOtvK.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin
e1.Clear;e2.Clear; e3.Clear;e4.Clear;e5.Clear;e6.Clear; cb1.Clear;
if tm=2 then begin
dm.com.CommandText:='Update otvk set log_ok=FALSE where (id_ok='+tmp+')'; dm.com.Execute;
dm.ok.RecNo:=ind;
end;
if id_z<>'' then begin
dm.com.CommandText:='Update zil SET log_z=FALSE where (id_z='+id_z+')'; dm.com.Execute;
id_z:=''; end;
dm.ok.Requery(); |
|
|
|
close; |
|
|
|
end; |
|
|
|
procedure TFaOtvK.BitBtn1Click(Sender: TObject); |
|
||
var tmpstr:string; |
|
|
|
begin |
|
|
|
if (e1.Text='') or (e2.Text='') or (e3.Text='') or (e4.Text='') or (id_z='') then showmessage(' |
') |
||
else |
|
|
|
begin |
|
|
|
try |
|
|
|
if strtoint(e4.Text)<1 then |
|
|
|
begin |
|
|
|
ЬСШаЦОЬЬКРО(' |
|
1'); |
|
exit; |
|
|
|
end; |
|
|
|
strtoint(e2.Text);strtoint(e3.Text); |
|
|
|
except |
|
|
|
ЬСШаЦОЬЬКРО(' |
|
'); |
|
exit; |
|
|
|
end; |
|
|
|
if length(e2.Text)<4 then |
|
|
|
begin |
|
|
|
ЬСШаЦОЬЬКРО(' |
4 |
'); |
|
exit; |
|
|
|
end; |
|
|
|
if length(e3.Text)<6 then |
|
|
|
begin |
|
|
|
ЬСШаЦОЬЬКРО(' |
6 |
'); |
|
exit; |
|
|
|
end; |
|
|
|
if length(e1.Text)<4 then |
|
|
|
begin |
|
|
|
ЭЦЩЬЭЫ:=PМСКЫ('"'+О1.TОбЭ)+'" |
|
!'+#13+' |
?'; |
if application.MessageBox(pchar(tmpstr),' |
|
',mb_yesno+mb_iconquestion)=idno then exit; |
|
end; |
|
|
|
if length(e5.Text)<4 then |
|
|
|
begin |
|
|
|
ЭЦЩЬЭЫ:=PМСКЫ('"'+О5.TОбЭ)+'" |
!'+#13+' |
?'; |
|
if application.MessageBox(pchar(tmpstr),' |
|
',mb_yesno+mb_iconquestion)=idno then exit; |
|
end; |
|
|
|
if length(e6.Text)<4 then |
|
|
|
begin |
|
|
|
ЭЦЩЬЭЫ:=PМСКЫ('"'+О6.TОбЭ)+'" |
|
!'+#13+' |
?'; |
if application.MessageBox(pchar(tmpstr),' |
|
',mb_yesno+mb_iconquestion)=idno then exit; |
|
end; |
|
|
|
|
|
41 |
|