stevegray
4Penny.net
Points: 55409

3/7/2013 3:19:32 PM

.NET Development

When coding a .NET transactional form, we end up putting the same piece of code in those forms over and over - the form state code.

Every form is different, but generally we use three form states = CLEAN, POPULATED, and DIRTY. We'll use an 'Item' form for discussions sake

  1. Clean is for when the form is newly opened. Generally every field on the form is disabled except the main lookup field and maybe a lookup button.
  2. Populated is when the user has selected an item, but has not edited anything. Generally the item number field would be disabled, but the lookup button would not be, and all the form fields would be enabled
  3. Dirty is when the form has been edited an it needs to be saved. Both the item number field and the item lookup button are disabled, all remaining fields are enabled.

We also have code to clear every field on the form.

Last, we have code to add event handlers to each field, so that when the field is edited the form will become DIRTY.

 

4Penny.net
Version: Unknown or N/A
Section: .NET Development
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3