: .
ճ
1. ³ , .
2. ᒺ OnClick.
3. 䳿.
4. ³ .
Ank_zo_new_F.ANKDANI.Active:=True;
withAnk_zo_new_F do
begin
repeat
ANKDANI.CachedUpdates:=True;
ANKDANI.EditRangeEnd;
ANKDANI.Insert;
DBEdit1:= TDBEdit.Create(Self);
ifAnk_zo_new_F.ShowModal=mrOK then
begin
ANKDANI.Post;
ANKDANI.ApplyUpdates;
end else begin
ANKDANI.Cancel;
ANKDANI.CancelUpdates;
end;
ANKDANI.CachedUpdates:=False;
untilModalResult = mrCancel;
end;
Ank_zo_new_F.ANKDANI.Active:=False;
5. ³ .
6. .
7. .
8. .
6
: .
: .
ճ
1. Button. ( ). DBGrid:
AlignalCustom;
2. :
3. 䳿OnClick: ( )
procedureTPoisc_F.Button1Click(Sender: TObject);
var
LocValues:Variant;
LocFields:string;
begin
ifAnk_zo_prosm_F.Visible=Truethen
BEGIN
ifAnk_zo_prosm_F.ANKDANI.Locate('TIN',Edit1.Text, []) then
begin
Poisc_F.Close;
Ank_zo_prosm_F.DBGrid1.SetFocus;
end
else
ifAnk_zo_prosm_F.ANKDANI.Locate('FULLN_U',Edit2.Text, []) then
begin
Poisc_F.Close;
Ank_zo_prosm_F.DBGrid1.SetFocus;
end
else
ifAnk_zo_prosm_F.ANKDANI.Locate('NAME_U',Edit3.Text, []) then
begin
Poisc_F.Close;
Ank_zo_prosm_F.DBGrid1.SetFocus;
end
else
ifAnk_zo_prosm_F.ANKDANI.Locate('FATH_U',Edit4.Text, []) then
begin
Poisc_F.Close;
Ank_zo_prosm_F.DBGrid1.SetFocus;
end;
END
ELSE
ifAnk_zo_edit_F.Visible=Truethen
BEGIN
{------------------------Ank_zo_edit_F.ANKDANI.Locate-----}
ifAnk_zo_edit_F.ANKDANI.Locate('TIN',Edit1.Text, []) then
begin
Poisc_F.Close;
Ank_zo_edit_F.DBGrid1.SetFocus;
end
else
ifAnk_zo_edit_F.ANKDANI.Locate('FULLN_U',Edit2.Text, []) then
begin
Poisc_F.Close;
Ank_zo_edit_F.DBGrid1.SetFocus;
end
else
ifAnk_zo_prosm_F.ANKDANI.Locate('NAME_U',Edit3.Text, []) then
|
|
begin
Poisc_F.Close;
Ank_zo_edit_F.DBGrid1.SetFocus;
end
else
ifAnk_zo_edit_F.ANKDANI.Locate('FATH_U',Edit4.Text, []) then
begin
Poisc_F.Close;
Ank_zo_edit_F.DBGrid1.SetFocus;
end
END ELSE
ifBSV_edit_F.Visible=Truethen
BEGIN
{------------------------INDBSV.Locate-----}
ifBSV_edit_F.INDBSV.Locate('TIN',Edit1.Text, []) then
begin
Poisc_F.Close;
BSV_edit_F.DBGrid1.SetFocus;
end
END ELSE
ifBSV_prosm_F.Visible=Truethen
BEGIN
{------------------------INDBSV.Locate-----}
ifBSV_prosm_F.INDBSV.Locate('TIN',Edit1.Text, []) then
begin
Poisc_F.Close;
BSV_prosm_F.DBGrid1.SetFocus;
end
END ELSE
ifIndani_prosm_F.Visible=Truethen
BEGIN
{------------------------INDBSV.Locate-----}
ifIndani_prosm_F.INDANI.Locate('TIN',Edit1.Text, []) then
begin
Poisc_F.Close;
Indani_prosm_F.DBGrid1.SetFocus;
end
END ELSE
ifBSV_prosm_F.Visible=Truethen
BEGIN
{------------------------INDBSV.Locate-----}
ifindani_edit_F.INDANI.Locate('TIN',Edit1.Text, []) then
begin
Poisc_F.Close;
indani_edit_F.DBGrid1.SetFocus;
end
end;
end;
end.
4. 䳿 OnClick:
procedureTPoisc_F.Button2Click(Sender: TObject);
begin
Close;
end;
5. Ͳ 䳿 OnClick:
procedureTDelete_F.Button1Click(Sender: TObject);
begin
ModalResult:= mrOk;
end;
procedureTDelete_F.Button2Click(Sender: TObject);
begin
ModalResult:= mrCancel;
end;
6. 䳿 OnClick:
{}
with Delete_F do
begin
ShowModal;
ifModalResult=mrOkthen
begin
ankdani.Delete
end
elseankdani.Cancel
end
else
{}
with Poisc_F do
begin
Edit1.Clear;
Edit2.Clear;
Edit3.Clear;
Edit4.Clear;
Edit2.Visible:=True;
Edit3.Visible:=True;
Edit4.Visible:=True;
Label2.Visible:=True;
Label3.Visible:=True;
Label4.Visible:=True;
ShowModal
End;
7