Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on program flow
Message
From
22/04/2011 11:35:05
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
22/04/2011 09:06:03
Tom Eby
Horizon Transport
Indiana, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01508123
Message ID:
01508133
Views:
40
>Just another one of my newby questions.
>I am working on learning MM .NET and I have a question on if the results I am seeing is correct MM behavior or something is wrong.
>
>I created a new project using C#, latest MM 4.0 build, VS2010 and WPF windows with EF business objects.
>As part of the project I have turned on MM security.
>To start out simple I first got the Roles window that the MM project wizard added for me working. My issue is that when I am in the role window the only way I have been able to add a new role is to follow the following steps:
>1) on the list tab I click on the Add button
>2) then a window comes up that says "Do you want to save changes" with Yes/No/Cancel buttons.
>3) then even though I have made no changes I have to click the Yes button. clicking either the no or cancel button will not allow me to add a new role.
>4) next even though I haven't yet had a chance to do any edits the broken rule window comes up with the message a description is required.
>5) now it goes to the properties tab, with the description text box outlined in red.
>6) I can now enter the description and click the save button and the roll will be added.
>
>I seem to have no problems either editing or deleting an existing role, just adding one is giving me fits.
>
>Thanks for any help.
>Tom
>
>PS
>I found that if you have a table field flagged as not nullable and don't have a default value defined in the business objects constructor it generates an unhandled exception error. You might want to modify your business object generator to force a default value for any fields flagged as not nullable.

I can't speak to your above questions as I have not tried this (yet). However in your PS comment, I think that would be incorrect behavior. If a value is not nullable it needs to be populated but not necessarily with a default value. For instance what about a foreign key? You cannot put a default value in there, you must enforce a rule to cause the user (or application) to provide it. Are you getting the exception because you are trying to save a row without including a value for a column that is required?
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform