Commit 03eef406 by 钟博

自定义列都改为文本类型

parent 557e86ba
......@@ -1781,7 +1781,7 @@ public HandsonTable QueryHandsCustom(string tableName)
{
var custom = perforReport.QueryCustomColumn(tableName);
var isExist = perforReport.QueryIsAllotId(tableName);
if (custom == null || isExist==false)
if (custom == null || isExist == false)
return null;
var dicCustom = new List<string>();
......@@ -1799,6 +1799,14 @@ public HandsonTable QueryHandsCustom(string tableName)
Visible = 1
}).ToList());
if (result.Columns != null && result.Columns.Any())
{
foreach (var column in result.Columns)
{
column.Type = "text";
}
}
return result;
}
......@@ -1806,13 +1814,13 @@ public HandsonTable QueryHandsCustom(string tableName)
public bool SaveCustomTable(SaveCustomData request)
{
var custom = perforReport.QueryCustomColumn(request.TableName);
var dicCustom = new Dictionary<string, object>();
for (int i = 0; i < custom.Count(); i++)
{
var dic = ((IDictionary<string, object>)custom.ElementAt(i)).Values;
dicCustom.Add(dic.ElementAt(0).ToString(),dic.ElementAt(1).ToString());
}
dicCustom.Add(dic.ElementAt(0).ToString(), dic.ElementAt(1).ToString());
}
var dicData = CreateCustomRow(request.AllotId, request, dicCustom);
......@@ -1837,7 +1845,7 @@ public CustomResponse QueryCustom(CustomPagingRequest request)
var heads = perforReport.QueryCustomColumn(request.TableName);
var isExist = perforReport.QueryIsAllotId(request.TableName);
if (isExist==false || heads==null)
if (isExist == false || heads == null)
{
result.isNorm = false;
return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment