I'm encountering multiple errors while trying to compile my BO library and all the errors that get thrown by the compiler are all related, but I can't figure out the solution.
Basically, I have a child Department object to handle adding/deleting/updating a Department in a project. This Department object has three distinct child collections of Drawing, Category, and Qualification objects. The errors I'm encountering are showing up in the Update method in the collection object itself; in other words, for Drawing, it's showing up in the Update method for the Drawings object. Typical code is as follows:
private void Update(SqlTransaction tr, Department parent)
{
RaiseListChangedEvents = false;
foreach(Drawing deletedChild in DeletedList)
deletedChild.DeleteSelf(tr);
DeletedList.Clear();
foreach(Drawing child in this)
{
if (child.IsNew)
child.Insert(tr, parent);
else
child.Update(tr, parent);
}
RaiseListChangedEvents = true;
}
The errors are getting thrown in the child.Insert and child.Update steps. The error message I'm getting is:
Argument '2': Cannot convert from 'Library.Department' to 'Library.Drawings'
I've been staring at it for so long...switching from the Department object to the Drawings object to the individual Drawing objects...but I can't find what's causing this compile-time error to be thrown. Is there any specific place I should check?
Copyright (c) Marimer LLC