Einzelnen Beitrag anzeigen

question

Registriert seit: 17. Apr 2013
97 Beiträge
 
#3

AW: access value by Property

  Alt 22. Aug 2013, 17:19
Here is the sample code please

Code:
unit Unit1;
{

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
  TForm1 = class(TForm)
   
  private
    FNewID : Integer;  
  public
    property NewID : Integer read FNewID;
    Person (ID : Integer);
  end;

var
  Form1: TForm1;
 
implementation


{$R *.DFM}
{$R common.res}

procedure TForm1.Person (ID : Integer);
begin
//here i get the value of ID after query from Database
//for example I have got ID=20;
end;

procedure TForm1.btnOkClick(Sender: TObject);
begin
if True then //after check the condition, i wanna call
Form1.Person (ID); // here how can i initialize ID so that i get the value 20
end;

end.

Geändert von question (22. Aug 2013 um 17:21 Uhr)
  Mit Zitat antworten Zitat