mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-18 15:39:05 +02:00
* Add getUpdatecount, fix some warnings
This commit is contained in:
parent
add91b7b27
commit
25f2393051
@ -1341,6 +1341,7 @@ type
|
|||||||
procedure CheckBrowseMode;
|
procedure CheckBrowseMode;
|
||||||
procedure ClearFields;
|
procedure ClearFields;
|
||||||
procedure Close;
|
procedure Close;
|
||||||
|
Function GetUpdateCount(UnresolvedOnly : Boolean) : Integer;
|
||||||
Procedure ApplyUpdates;
|
Procedure ApplyUpdates;
|
||||||
function ControlsDisabled: Boolean;
|
function ControlsDisabled: Boolean;
|
||||||
function CompareBookmarks(Bookmark1{%H-}, Bookmark2{%H-}: TBookmark): Longint; virtual;
|
function CompareBookmarks(Bookmark1{%H-}, Bookmark2{%H-}: TBookmark): Longint; virtual;
|
||||||
@ -1485,7 +1486,7 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create; reintroduce;
|
constructor Create; reintroduce;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function Edit: Boolean;
|
function Edit: Boolean; virtual;
|
||||||
procedure UpdateRecord;
|
procedure UpdateRecord;
|
||||||
property Active: Boolean read FActive;
|
property Active: Boolean read FActive;
|
||||||
property ActiveRecord: Integer read GetActiveRecord write SetActiveRecord;
|
property ActiveRecord: Integer read GetActiveRecord write SetActiveRecord;
|
||||||
@ -3154,7 +3155,7 @@ end;
|
|||||||
|
|
||||||
procedure TDataSet.GetCalcFields(var Buffer: TDataRecord);
|
procedure TDataSet.GetCalcFields(var Buffer: TDataRecord);
|
||||||
var
|
var
|
||||||
i: Integer;
|
|
||||||
OldState: TDatasetState;
|
OldState: TDatasetState;
|
||||||
begin
|
begin
|
||||||
if (FCalcFieldsCount > 0) or FInternalCalcFields then
|
if (FCalcFieldsCount > 0) or FInternalCalcFields then
|
||||||
@ -4158,6 +4159,23 @@ begin
|
|||||||
Active:=False;
|
Active:=False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TDataSet.GetUpdateCount(UnresolvedOnly: Boolean): Integer;
|
||||||
|
|
||||||
|
Var
|
||||||
|
I : Integer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Result:=0;
|
||||||
|
if Not Assigned(FChangeList) then
|
||||||
|
exit;
|
||||||
|
If Not UnresolvedOnly then
|
||||||
|
Result:=FChangeList.Count
|
||||||
|
else
|
||||||
|
For I:=0 to FChangeList.Count-1 do
|
||||||
|
if TRecordUpdateDescriptor(FChangeList[i]).ResolveStatus=rsUnresolved then
|
||||||
|
Inc(Result);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TDataSet.ApplyUpdates;
|
procedure TDataSet.ApplyUpdates;
|
||||||
begin
|
begin
|
||||||
DoBeforeApplyUpdates;
|
DoBeforeApplyUpdates;
|
||||||
@ -6992,8 +7010,8 @@ begin
|
|||||||
F:=FDisplayFormat
|
F:=FDisplayFormat
|
||||||
else
|
else
|
||||||
Case DataType of
|
Case DataType of
|
||||||
ftTime : F:=LongTimeFormat;
|
ftTime : F:=FormatSettings.LongTimeFormat;
|
||||||
ftDate : F:=ShortDateFormat;
|
ftDate : F:=FormatSettings.ShortDateFormat;
|
||||||
else
|
else
|
||||||
F:='c'
|
F:='c'
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user