Код:
type
TForm1 = class(TForm)
CanEdit: Boolean;
procedure TForm1.FormCreate(Sender: TObject);
begin
CanEdit:=True;
end;
procedure TForm1.Table1AfterDelete(DataSet: TDataSet);
begin
CanEdit:=False;
end;
procedure TForm1.Table1BeforeEdit(DataSet: TDataSet);
begin
if not CanEdit then raise Exception.Create('Oops');
end;
__________________
Пишу программы за еду.
__________________
|