Hello,
I use LLBLgen V3.5
I have a question regarding databinding of checkbox, boolean values and null values.
I have bound an entity to a bindingsource on a winform. On this form als a few members are bound to a check box. Let's say one of my Entity boolean members has the name "CleanTimeStampFromFileName"
Default the member is bound to the CheckState property of a checkbox, but you also have the Checked property where you can bind to.
Question 1: In case of LLBL Gen generated entity and my CleanTimeStampFromFileName member of a boolean type, which of the above to use?
Question 2: When i create a NEW entity, and bind this to the screen, then the boolean properties of the entity are "Null" (via the entity.Fiels[index].CurrentValue you can see it is NULL but -> when i get the boolean member say entity.CleanTimeStampFromFileName -> i see "False". when inserting i get and SQL exception, column can not be null. where do i fix this behavior -> if the user didn't checked it then it is default "false". What's your advice..
Question 3:
I use injection for validation, and in my ValidateEntity function i check on the entity.CleanTimeStampFromFileName and not the entity.Fiels[index].CurrentValue so no validation message was thrown, what is the best practice on these kind of validation checks? which on to use.
i mean i can fix this issues, but i find it hard to digest what the "best practices" are for this situations. Hope you guys can shine a light on this one
Regards,
Joey