mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
This commit is contained in:
parent
e8f611c1b6
commit
dad88f85b6
@ -594,7 +594,9 @@ function TCustomer.ToString: String;
|
|||||||
begin
|
begin
|
||||||
Result := '';
|
Result := '';
|
||||||
if PKIsNull then
|
if PKIsNull then
|
||||||
Result := '<null>';
|
Result := '<null>'
|
||||||
|
else
|
||||||
|
Result := fID.ValueOrDefault.ToString;
|
||||||
Result := Format('[ID: %6s][CODE: %6s][CompanyName: %18s][City: %16s][Rating: %3d][Note: %s]',[
|
Result := Format('[ID: %6s][CODE: %6s][CompanyName: %18s][City: %16s][Rating: %3d][Note: %s]',[
|
||||||
Result, fCode.ValueOrDefault, fCompanyName.ValueOrDefault, fCity, fRating.ValueOrDefault, fNote]);
|
Result, fCode.ValueOrDefault, fCompanyName.ValueOrDefault, fCity, fRating.ValueOrDefault, fNote]);
|
||||||
end;
|
end;
|
||||||
|
@ -91,7 +91,9 @@ begin
|
|||||||
TJWTCheckableClaim.NotBefore,
|
TJWTCheckableClaim.NotBefore,
|
||||||
TJWTCheckableClaim.IssuedAt
|
TJWTCheckableClaim.IssuedAt
|
||||||
], 300))
|
], 300))
|
||||||
.AddMiddleware(TMVCJWTBlackListMiddleware.Create(lOnAcceptToken, lOnNewJWTToBlackList));
|
.AddMiddleware(
|
||||||
|
TMVCJWTBlackListMiddleware.Create(lOnAcceptToken, lOnNewJWTToBlackList)
|
||||||
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
unit SSEControllerU;
|
unit SSEControllerU;
|
||||||
|
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
@ -33,7 +33,9 @@ end;
|
|||||||
|
|
||||||
procedure TMyController.DoSum(const a, b: Integer);
|
procedure TMyController.DoSum(const a, b: Integer);
|
||||||
begin
|
begin
|
||||||
Render((Context.CustomIntfObject as ICalculator).DoCalc(a,b).ToString);
|
var lSvc := Context.CustomIntfObject as ICalculator;
|
||||||
|
|
||||||
|
Render(lSvc.DoCalc(a,b).ToString);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -71,6 +71,8 @@ type
|
|||||||
AContext: TWebContext;
|
AContext: TWebContext;
|
||||||
const AHandled: Boolean);
|
const AHandled: Boolean);
|
||||||
public
|
public
|
||||||
|
constructor Create(
|
||||||
|
const DefaultConnectionDefName: string); overload; virtual;
|
||||||
constructor Create(
|
constructor Create(
|
||||||
const DefaultConnectionDefName: string;
|
const DefaultConnectionDefName: string;
|
||||||
const ConnectionDefFileName: string{ = 'FDConnectionDefs.ini'}); overload; virtual;
|
const ConnectionDefFileName: string{ = 'FDConnectionDefs.ini'}); overload; virtual;
|
||||||
@ -96,10 +98,7 @@ var
|
|||||||
constructor TMVCActiveRecordMiddleware.Create(const DefaultConnectionDefName: string;
|
constructor TMVCActiveRecordMiddleware.Create(const DefaultConnectionDefName: string;
|
||||||
const ConnectionDefFileName: string);
|
const ConnectionDefFileName: string);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
Create(DefaultConnectionDefName, [], [], ConnectionDefFileName);
|
||||||
fConnectionLoaded := False;
|
|
||||||
fDefaultConnectionDefName := DefaultConnectionDefName;
|
|
||||||
fConnectionDefFileName := ConnectionDefFileName;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TMVCActiveRecordMiddleware.Create(
|
constructor TMVCActiveRecordMiddleware.Create(
|
||||||
@ -107,6 +106,7 @@ constructor TMVCActiveRecordMiddleware.Create(
|
|||||||
const AdditionalARConnectionNames, AdditionalConnectionDefNames: TArray<String>;
|
const AdditionalARConnectionNames, AdditionalConnectionDefNames: TArray<String>;
|
||||||
const ConnectionDefFileName: string);
|
const ConnectionDefFileName: string);
|
||||||
begin
|
begin
|
||||||
|
inherited Create;
|
||||||
fConnectionLoaded := False;
|
fConnectionLoaded := False;
|
||||||
fDefaultConnectionDefName := DefaultConnectionDefName;
|
fDefaultConnectionDefName := DefaultConnectionDefName;
|
||||||
fConnectionDefFileName := ConnectionDefFileName;
|
fConnectionDefFileName := ConnectionDefFileName;
|
||||||
@ -114,6 +114,12 @@ begin
|
|||||||
fAdditionalConnectionDefNames := AdditionalConnectionDefNames;
|
fAdditionalConnectionDefNames := AdditionalConnectionDefNames;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
constructor TMVCActiveRecordMiddleware.Create(
|
||||||
|
const DefaultConnectionDefName: string);
|
||||||
|
begin
|
||||||
|
Create(DefaultConnectionDefName, 'FDConnectionDefs.ini');
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMVCActiveRecordMiddleware.EnsureConnection;
|
procedure TMVCActiveRecordMiddleware.EnsureConnection;
|
||||||
var
|
var
|
||||||
I: Integer;
|
I: Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user