Problemas básico CSLA

Dataportal.Create failed
You need to override the DataPortal_Create method.

Overriding AddNewCore
When you override AddNewCore, is anyone raising the AddingNew event?
In your collection class, are you overriding AddNewCore?  It should look similar to this:

Problem get Datagrid to work
In your collection class, are you overriding AddNewCore?  It should look similar to this:
protected override AddNewCore() {
TimeCardEntry entry;

entry = TimeCardEntry.NewTimeCardEntry();
OnAddingNew( new AddingNewEventArgs( entry ) );

Add( entry );

return entry;
}

Address Line Disappearing on Datagrid
I found the problem.  Because my ID for my object is the Primary Key from a table in Ms SQL2005, I didn’t put a value in for the Object Id.  So every new object had an Id of zero (0).  So when ever you were on a new line and you went into edit mode and cancelled it, the code would remove every object with an Id of zero because that Id matched the object that was created for the line that you started editing.

por Vitor Silva



Leave a Reply