当我加载页面时,我得到了一个具有相同键错误的项目。有什么解决方案可以解决这个问题吗?这是错误
一般信息
- - - - - - - - - - - - - - - - - - - - - - -
MachineName: WIN-SKEC08HPAEB FullName: InnoArk.APDMS.Common,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null AppDomainName:
/LM/W3SVC/2/ROOT-1-130120289473554687 ThreadIdentity: innoark
1) Exception Information
- - - - - - - - - - - - - - - - - - - - - - - Exception Type: System.ArgumentException Message: An item with the same key has
already been added. ParamName: NULL Data:
System.Collections.ListDictionaryInternal TargetSite: Void
ThrowArgumentException(System.ExceptionResource) HelpLink: NULL
Source: mscorlib
StackTrace Information
- - - - - - - - - - - - - - - - - - - - - - - at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue
value, Boolean add) at
System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at InnoArk.APDMS.WebApp.Controllers.SimulationController._List(Guid
GroupId, Guid bcTempId, String[] id, String[] volumeAnn, String[]
volumeAvg, String[] costAvg, String[] costAnn, String[] costIfAvg,
String[] costIfAnn, Boolean isEditBC, Boolean isBC, Boolean
isSimulate, Boolean isSave) in
D:\dev\APDMS\Trunk\InnoArk.APDMS.WebApp\Controllers\SimulationController.cs:line
2478
抱歉,这是来自第 2478 行的 SimulationController 的代码:
detailList = new Dictionary<string, object>();
detailList.Add("id", entityId[j]);
detailList.Add("volAnn", volAnn[j]);
detailList.Add("volAvg", volAvg[j]);
detailList.Add("volLatestAnn", volLatestAnn[j]);
detailList.Add("volLatestAvg", volLatestAvg[j]);
detailList.Add("cAnn", cAnn[j]);
detailList.Add("cAvg", cAvg[j]);
detailList.Add("cIfAnn", cIfAnn[j]);
detailList.Add("cIfAvg", cIfAvg[j]);
detailList.Add("code", code[j]);
detailList.Add("isLatest", isLatest[j]);
detailList.Add("isDirty", isDirty[j]);
detailList.Add("curr", curr[j] == null ? "" : curr[j]);
detailList.Add("noOfOrder", noOfOrder[j]);
detailList.Add("isFilter", isFilter[j]);
tempList2.Add(entityId[j].ToString(), detailList); << line : 2478
感谢您尝试回答我的问题?:)