المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Suggestions on how to model a simple validation program



C# Programming
08-26-2009, 05:07 PM
Good morning guys,

I need to write a program to validate the field values of several tables, and report which values don't comply with the validation.
So, let us suppose we need to validate only one field per each table.

The main procedure fetches all rows for that specific table/field, and calls a "validation function" to validate if that particular field for that table is valid.

We can end up with several validation functions which is OK since each validation is unique, but once I compiled the program, how can we plug a new validation functions to it?

The program will basically ask for 2 parameters: the table name and field name to validate, but how can we inject the "validation function" dynamically?

Open to ideas, suggestions http://www.barakasoft.com/script/Forums/Images/smiley_biggrin.gif

Thanks,
...Alex