美文网首页
1209_已添加了具有相同键的项

1209_已添加了具有相同键的项

作者: Asa_Guo | 来源:发表于2017-04-19 09:35 被阅读0次
“HemoSystemClient.ConstantModel”的类型初始值设定项引发异常。
   在 HemoSystemClient.ConstantModel.GetDataGridStyle(String typeName)
   在 HemoSystemClient.CustomDataGridView.CustomGridView.GenerateColumnByGridStyle() 位置 D:\RjyxProgram\HemoSystem\HemoSystemClient\CustomDataGridView\CustomGridView.cs:行号 437
   在 HemoSystemClient.CustomDataGridView.CustomGridView.<Init>b__15_0(Object sender, EventArgs e) 位置 D:\RjyxProgram\HemoSystem\HemoSystemClient\CustomDataGridView\CustomGridView.cs:行号 169
   在 System.Windows.Forms.DataGridView.OnDataSourceChanged(EventArgs e)
   在 System.Windows.Forms.DataGridView.set_DataSource(Object value)
   在 HemoSystemClient.Modules.UserLoginHistoryModule..ctor() 位置 D:\RjyxProgram\HemoSystem\HemoSystemClient\Modules\Privilege\UserLoginHistoryModule.cs:行号 105
   在 HemoSystemClient.MainForm..ctor() 位置 D:\RjyxProgram\HemoSystem\HemoSystemClient\MainForm.cs:行号 41
   在 HemoSystemClient.Program.RunProgram() 位置 D:\RjyxProgram\HemoSystem\HemoSystemClient\Program.cs:行号 63
--------------------------------------------------------------------
已添加了具有相同键的项。
   在 System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   在 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   在 System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   在 HemoSystemClient.ConstantModel.AddDataGridStyleMap(Dictionary`2 gridStyleMap) 位置 D:\RjyxProgram\HemoSystem\HemoSystemClient\ConstantModels.cs:行号 290
   在 HemoSystemClient.ConstantModel..cctor() 位置 D:\RjyxProgram\HemoSystem\HemoSystemClient\ConstantModels.cs:行号 279

原因:nameof(HL7RMYYZyBqyz) 不是 本类对象。字典集。

public partial class HL7RMYYZyBlnr
    {
        public byte[] RV { get; set; }

        public static Dictionary<String, DataGridStyle> DataGridStyleMap = new Dictionary<string, DataGridStyle>()
        {
            {nameof(HL7RMYYZyBqyz) + "." + nameof(Blnr), new DataGridStyle{ ColumnTitle = "病历内容" , DisplayIndex = 10} },
        };
    }

相关文章

网友评论

      本文标题:1209_已添加了具有相同键的项

      本文链接:https://www.haomeiwen.com/subject/frdemttx.html