NotimplementedException в System.Core.dll
Я получаю сообщение об ошибке ниже в моем коде:
Необработанное исключение типа "System.NotImplementedException" произошло в>System.Core.dll
Дополнительная информация: метод или операция не реализована.
Это происходит, когда я пытаюсь установить источник данных в моем datagridview. Ошибка происходит в событии TextChanged в текстовом поле, где я пытаюсь отфильтровать сетку данных на основе входных данных.
Код в случае, как показано ниже:
IEnumerable<b2bHdr> filteredClaims = claims.Where(sc => sc.claimNumber.ToString().Contains(ntxtClaimNoSearch.Text));
dgvHdr.DataSource = filteredClaims;
dgvHdr.AutoResizeColumns();
if (filteredClaims.Count() > 0)
{
dgvDtl.DataSource = filteredClaims;
dgvDtl.DataMember = "b2bDetails";
dgvDtl.AutoResizeColumns();
}
else
{
dgvDtl.DataSource = null;
}
Ошибка происходит на линии dgvDtl.DataSource = filteredClaims
Я искал и не могу найти ничего подобного. Буду признателен за любую помощь в этом.
Определение для b2bhdr следующее:
[Table(Name = "tbl_B2BHdr")]
public class b2bHdr
{
private EntitySet<b2bDtl> _b2bDetails;
public b2bHdr()
{
this._b2bDetails = new EntitySet<b2bDtl>(OnDtlAdded, OnDtlremoved);
}
private void OnDtlAdded(b2bDtl addedDtl) { addedDtl.hdrRecord = this; }
private void OnDtlremoved(b2bDtl removedDtl) { removedDtl.hdrRecord = null; }
[Association(ThisKey = "bhID", Storage = "_b2bDetails", OtherKey = "bhID")]
public EntitySet<b2bDtl> b2bDetails
{
get { return this._b2bDetails; }
set { this._b2bDetails.Assign(value); }
}
[Column(IsPrimaryKey = true, IsDbGenerated = true)] public Int32 bhID { get; set; }
[Column] public Int32 cusID { get; set; }
[Column] public int? rtHID { get; set; }
[Column] public int? inhID { get; set; }
[Column] public DateTime invoiceDate { get; set; }
[Column] public DateTime? deliveryDate { get; set; }
[Column] public Int32 referenceNumber { get; set; }
[Column] public int? claimNumber { get; set; }
[Column] public int? CreditInvoice { get; set; }
[Column] public String CustomerName { get; set; }
[Column] public Byte Type { get; set; }
[Column] public Decimal InvoiceTotal { get; set; }
[Column] public Decimal TaxTotal { get; set; }
[Column] public Int32 TempID { get; set; }
[Column] public String Notes { get; set; }
[Column] public byte? status { get; set; }
[Column] public Byte Deleted { get; set; }
Ниже приведена отладочная информация об ошибке:
A first chance exception of type 'System.NotImplementedException' occurred in System.Core.dll
'sldatasys.exe' (Win32): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll'. Cannot find or open the PDB file.
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>sldatasys.exe</AppDomain><Exception><ExceptionType>System.NotImplementedException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The method or operation is not implemented.</Message><StackTrace> at System.Linq.Enumerable.Iterator`1.System.Collections.IEnumerator.Reset()
at System.Windows.Forms.ListBindingHelper.GetFirstItemByEnumerable(IEnumerable enumerable)
at System.Windows.Forms.ListBindingHelper.GetListItemPropertiesByEnumerable(IEnumerable enumerable)
at System.Windows.Forms.ListBindingHelper.GetListItemProperties(Object list)
at System.Windows.Forms.ListBindingHelper.GetListItemProperties(Object list, PropertyDescriptor[] listAccessors)
at System.Windows.Forms.BindingContext.EnsureListManager(Object dataSource, String dataMember)
at System.Windows.Forms.DataGridView.DataGridViewDataConnection.SetDataConnection(Object dataSource, String dataMember)
at System.Windows.Forms.DataGridView.set_DataSource(Object value)
at DairyProcessing.frmB2BView.btnClearClaimSearch_Click(Object sender, EventArgs e) in c:\Data\Projects\Stonelees Data Systems\Stonelees Data Systems\Forms\frmB2BView.cs:line 223
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)
at System.Windows.Forms.Button.WndProc(Message&amp; m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at DairyProcessing.Program.Main() in c:\Data\Projects\Stonelees Data Systems\Stonelees Data Systems\Program.cs:line 19</StackTrace><ExceptionString>System.NotImplementedException: The method or operation is not implemented.
at System.Linq.Enumerable.Iterator`1.System.Collections.IEnumerator.Reset()
at System.Windows.Forms.ListBindingHelper.GetFirstItemByEnumerable(IEnumerable enumerable)
at System.Windows.Forms.ListBindingHelper.GetListItemPropertiesByEnumerable(IEnumerable enumerable)
at System.Windows.Forms.ListBindingHelper.GetListItemProperties(Object list)
at System.Windows.Forms.ListBindingHelper.GetListItemProperties(Object list, PropertyDescriptor[] listAccessors)
at System.Windows.Forms.BindingContext.EnsureListManager(Object dataSource, String dataMember)
at System.Windows.Forms.DataGridView.DataGridViewDataConnection.SetDataConnection(Object dataSource, String dataMember)
at System.Windows.Forms.DataGridView.set_DataSource(Object value)
at DairyProcessing.frmB2BView.btnClearClaimSearch_Click(Object sender, EventArgs e) in c:\Data\Projects\Stonelees Data Systems\Stonelees Data Systems\Forms\frmB2BView.cs:line 223
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)
at System.Windows.Forms.Button.WndProc(Message&amp; m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at DairyProcessing.Program.Main() in c:\Data\Projects\Stonelees Data Systems\Stonelees Data Systems\Program.cs:line 19</ExceptionString></Exception></TraceRecord>
An unhandled exception of type 'System.NotImplementedException' occurred in System.Core.dll
Additional information: The method or operation is not implemented.