Skip to content

Commit 55a9b94

Browse files
FromStringCollection with context can be deleted now (httpcontext current is accessible in.net core)
1 parent 5861ffd commit 55a9b94

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

dotnet/src/dotnetframework/GxClasses/Domain/GxCollections.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,14 @@ public GxSimpleCollection<string> ToStringCollection(int digits, int decimals)
806806
}
807807
public void FromStringCollection(GxSimpleCollection<string> value)
808808
{
809-
if (typeof(T) == typeof(string))
809+
if (typeof(T) == typeof(DateTime))
810+
{
811+
foreach (string item in value)
812+
{
813+
Add(DateTimeUtil.CToT2(item));
814+
}
815+
}
816+
else if(typeof(T) == typeof(string))
810817
{
811818
foreach (string item in value)
812819
{
@@ -819,17 +826,10 @@ public void FromStringCollection(GxSimpleCollection<string> value)
819826
}
820827
}
821828
}
829+
//To delete
822830
public void FromStringCollection(GxSimpleCollection<string> value, IGxContext context)
823831
{
824-
if (typeof(T) == typeof(DateTime))
825-
{
826-
foreach (string item in value)
827-
{
828-
Add(DateTimeUtil.CToT2(item, context));
829-
}
830-
}
831-
else
832-
FromStringCollection(value);
832+
FromStringCollection(value);
833833
}
834834

835835

0 commit comments

Comments
 (0)