mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
Added submodules + fix from Andrea Ciotti
This commit is contained in:
parent
47e8e05095
commit
f09f12038f
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[submodule "lib\\loggerpro"]
|
||||||
|
path = lib\\loggerpro
|
||||||
|
url = https://github.com/danieleteti/loggerpro.git
|
||||||
|
[submodule "lib\\dmustache"]
|
||||||
|
path = lib\\dmustache
|
||||||
|
url = https://github.com/synopse/dmustache.git
|
1
lib/dmustache
Submodule
1
lib/dmustache
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit bf2d1a881f9e6c91a5239209b16593c1d8e75de8
|
1
lib/loggerpro
Submodule
1
lib/loggerpro
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 583c1a319f0dacaf52bf3a86bfaab633071458ea
|
@ -278,6 +278,7 @@ var
|
|||||||
Value: TValue;
|
Value: TValue;
|
||||||
FoundAttribute: boolean;
|
FoundAttribute: boolean;
|
||||||
FoundTransientAttribute: boolean;
|
FoundTransientAttribute: boolean;
|
||||||
|
LField: TField;
|
||||||
begin
|
begin
|
||||||
_dict := TDictionary<string, string>.Create();
|
_dict := TDictionary<string, string>.Create();
|
||||||
_keys := TDictionary<string, boolean>.Create();
|
_keys := TDictionary<string, boolean>.Create();
|
||||||
@ -307,21 +308,28 @@ begin
|
|||||||
end;
|
end;
|
||||||
for _field in _fields do
|
for _field in _fields do
|
||||||
begin
|
begin
|
||||||
|
|
||||||
if not _dict.TryGetValue(_field.Name, field_name) then
|
if not _dict.TryGetValue(_field.Name, field_name) then
|
||||||
Continue;
|
Continue;
|
||||||
|
|
||||||
|
LField := ADataSet.FindField(field_name);
|
||||||
|
|
||||||
|
if not Assigned(LField) then
|
||||||
|
Continue;
|
||||||
|
|
||||||
case _field.PropertyType.TypeKind of
|
case _field.PropertyType.TypeKind of
|
||||||
tkEnumeration: // tristan
|
tkEnumeration: // tristan
|
||||||
begin
|
begin
|
||||||
if _field.PropertyType.Handle = TypeInfo(boolean) then
|
if _field.PropertyType.Handle = TypeInfo(boolean) then
|
||||||
begin
|
begin
|
||||||
case ADataSet.FieldByName(field_name).DataType of
|
case LField.DataType of
|
||||||
ftInteger, ftSmallint, ftLargeint:
|
ftInteger, ftSmallint, ftLargeint:
|
||||||
begin
|
begin
|
||||||
Value := (ADataSet.FieldByName(field_name).AsInteger = 1);
|
Value := (LField.AsInteger = 1);
|
||||||
end;
|
end;
|
||||||
ftBoolean:
|
ftBoolean:
|
||||||
begin
|
begin
|
||||||
Value := ADataSet.FieldByName(field_name).AsBoolean;
|
Value := LField.AsBoolean;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
Continue;
|
Continue;
|
||||||
@ -329,15 +337,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
tkInteger:
|
tkInteger:
|
||||||
Value := ADataSet.FieldByName(field_name).AsInteger;
|
Value := LField.AsInteger;
|
||||||
tkInt64:
|
tkInt64:
|
||||||
Value := ADataSet.FieldByName(field_name).AsLargeInt;
|
Value := LField.AsLargeInt;
|
||||||
tkFloat:
|
tkFloat:
|
||||||
Value := ADataSet.FieldByName(field_name).AsFloat;
|
Value := LField.AsFloat;
|
||||||
tkString:
|
tkString:
|
||||||
Value := ADataSet.FieldByName(field_name).AsString;
|
Value := LField.AsString;
|
||||||
tkUString, tkWChar, tkLString, tkWString:
|
tkUString, tkWChar, tkLString, tkWString:
|
||||||
Value := ADataSet.FieldByName(field_name).AsWideString;
|
Value := LField.AsWideString;
|
||||||
else
|
else
|
||||||
Continue;
|
Continue;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user