Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business Object
Message
De
16/11/2011 07:27:29
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Business Object
Divers
Thread ID:
01529025
Message ID:
01529025
Vues:
76
Hello. I have a form with 1 primary business object. A user can type in a name and search for that name in the database. Lets say the user performs a search and 2 records are returned. The user then clicks the mmNew button to add a new record to the dataset. I then navigate to the new record and set the LastUpdateDate and LastUpdateUser column(in the click event of the mmNew button). For some reason those 2 fields in the first record of the dataset is being changed too. Even when I comment out the code so that I am not updating those 2 columns they're being changed. If I click the mmCancel button the application throws an error "This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row." The new row does get removed from the grid on the form. I only have this issue when the user performs a search before adding a new record.

I added a clear button that "Gets" an empty dataset. When clicked all records in the grid disapear. I click the mmNew button and it asks me if I want to save changes. There are no changes since the "BO" should be empty.

There's barely any code on this form and no code in the "Rules" of the BO. The only code I have in any of the "mm" buttons is in the mmNew button:

Me.grdEmployees.NavigateData(mmNavigate.Last)
Me._employee.Entity.LastUpdateDate = Date.Now
Me._employee.Entity.LastUpdateUser = Environment.UserName

Thanks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform