The PersonID can alternatively be determined from a
query:
Delphi-Quellcode:
unit unit1;
interface
type
TForm1 =
class(TForm)
{...}
private // <- for use self
function GetMyPersonID: Integer;
procedure SetMyPersonID(AValue: Integer);
public // <- for use to other
property MyPersonID: Integer
read GetMyPersonID
write SetPersonID;
end;
var
Form1: TForm1;
// <- Instance of TForm1
implementation
procedure TForm1.SetMyPersonID(AValue: Integer);
begin
FQuery.FieldByName('
MyPersonID').AsInteger := AValue;
end;
procedure TForm1.GetMyPersonID: Integer;
begin
Result := FQuery.FieldByName('
MyPersonID').AsInteger;
end;