mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-20 17:14:21 +02:00
* Some patches from Uberto Barbini
+ TLoginEvent more Delphi compatible (D5 and bigger). * AsCurrency Property for TField.
This commit is contained in:
parent
525e2cf1ff
commit
69a6bf363a
18
fcl/db/db.pp
18
fcl/db/db.pp
@ -167,6 +167,7 @@ type
|
||||
property Count: Longint read GetCount;
|
||||
Property HiddenFields : Boolean Read FHiddenFields Write FHiddenFields;
|
||||
property Items[Index: Longint]: TFieldDef read GetItem; default;
|
||||
property Updated: Boolean read FUpdated write FUpdated;
|
||||
end;
|
||||
|
||||
{ TField }
|
||||
@ -243,6 +244,7 @@ type
|
||||
procedure DataChanged;
|
||||
procedure FreeBuffers; virtual;
|
||||
function GetAsBoolean: Boolean; virtual;
|
||||
function GetAsCurrency: Currency; virtual;
|
||||
function GetAsDateTime: TDateTime; virtual;
|
||||
function GetAsFloat: Double; virtual;
|
||||
function GetAsLongint: Longint; virtual;
|
||||
@ -262,6 +264,7 @@ type
|
||||
procedure PropertyChanged(LayoutAffected: Boolean);
|
||||
procedure ReadState(Reader: TReader); override;
|
||||
procedure SetAsBoolean(AValue: Boolean); virtual;
|
||||
procedure SetAsCurrency(AValue: Currency); virtual;
|
||||
procedure SetAsDateTime(AValue: TDateTime); virtual;
|
||||
procedure SetAsFloat(AValue: Double); virtual;
|
||||
procedure SetAsLongint(AValue: Longint); virtual;
|
||||
@ -287,6 +290,7 @@ type
|
||||
procedure SetFieldType(AValue: TFieldType); virtual;
|
||||
procedure Validate(Buffer: Pointer);
|
||||
property AsBoolean: Boolean read GetAsBoolean write SetAsBoolean;
|
||||
property AsCurrency: Currency read GetAsCurrency write SetAsCurrency;
|
||||
property AsDateTime: TDateTime read GetAsDateTime write SetAsDateTime;
|
||||
property AsFloat: Double read GetAsFloat write SetAsFloat;
|
||||
property AsLongint: Longint read GetAsLongint write SetAsLongint;
|
||||
@ -611,7 +615,7 @@ type
|
||||
FCurrency : boolean;
|
||||
protected
|
||||
class procedure CheckTypeSize(AValue: Longint); override;
|
||||
function GetAsCurrency: Currency; virtual;
|
||||
function GetAsCurrency: Currency; override;
|
||||
function GetAsFloat: Double; override;
|
||||
function GetAsLongint: Longint; override;
|
||||
function GetAsString: string; override;
|
||||
@ -622,7 +626,7 @@ type
|
||||
procedure SetAsFloat(AValue: Double); override;
|
||||
procedure SetAsLongint(AValue: Longint); override;
|
||||
procedure SetAsString(const AValue: string); override;
|
||||
procedure SetAsCurrency(AValue: Currency); virtual;
|
||||
procedure SetAsCurrency(AValue: Currency); override;
|
||||
procedure SetVarValue(const AValue: Variant); override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
@ -1313,8 +1317,7 @@ type
|
||||
|
||||
{ TDatabase }
|
||||
|
||||
TLoginEvent = procedure(Database: TDatabase;
|
||||
LoginParams: TStrings) of object;
|
||||
TLoginEvent = procedure(Sender: TObject; Username, Password: string) of object;
|
||||
|
||||
TDatabaseClass = Class Of TDatabase;
|
||||
|
||||
@ -1939,7 +1942,12 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.50 2005-04-26 16:37:44 michael
|
||||
Revision 1.51 2005-04-26 16:48:58 michael
|
||||
* Some patches from Uberto Barbini
|
||||
+ TLoginEvent more Delphi compatible (D5 and bigger).
|
||||
* AsCurrency Property for TField.
|
||||
|
||||
Revision 1.50 2005/04/26 16:37:44 michael
|
||||
+ Added TCustomConnection by Uberto Barbini
|
||||
|
||||
Revision 1.49 2005/04/26 15:45:30 michael
|
||||
|
@ -475,6 +475,11 @@ begin
|
||||
Result:=-1;
|
||||
end;
|
||||
|
||||
function TField.GetAsCurrency: Currency;
|
||||
begin
|
||||
Result := GetAsFloat;
|
||||
end;
|
||||
|
||||
procedure TField.SetAlignment(const AValue: TAlignMent);
|
||||
begin
|
||||
if FAlignment <> AValue then
|
||||
@ -484,6 +489,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TField.SetAsCurrency(AValue: Currency);
|
||||
begin
|
||||
SetAsFloat(AValue);
|
||||
end;
|
||||
|
||||
function TField.GetIsNull: Boolean;
|
||||
|
||||
begin
|
||||
@ -2298,7 +2308,12 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.32 2005-04-26 15:45:30 michael
|
||||
Revision 1.33 2005-04-26 16:48:58 michael
|
||||
* Some patches from Uberto Barbini
|
||||
+ TLoginEvent more Delphi compatible (D5 and bigger).
|
||||
* AsCurrency Property for TField.
|
||||
|
||||
Revision 1.32 2005/04/26 15:45:30 michael
|
||||
+ Patch from Sergey Smirnov to fix TTimeField.AsString
|
||||
|
||||
Revision 1.31 2005/04/16 10:02:13 michael
|
||||
|
Loading…
Reference in New Issue
Block a user