This component software that will be used by other .NET components in a Microsoft platform multilayered domain-specific business application. When it is called by certain other components, the DLL will display a webform [selection_form] showing a list. When the user selects one row from the list, the webform returns [return_string] to the calling function.
(byval table_name as str, byval connection_string as str, Optional byval field_name as str)
Textbox [searchtxtbox], button [btn_searchresults], button [btn_searchstore], button [btn_ok], listbox [selectionlist], button [btn_close]
1-OnLoad, the form builds an sql string. If the field_name is empty string, then the sql string includes all the fields and rows of table_name. If field_name is not empty string, then the sql string returns all the rows of table_name including only the id field and field_name.
2-OnLoad, the form retrieves the query result of the sql string and use the returned table/rows to populate the listbox
3-OnOpen, The form displays the results to the user
4-If the user enters a string in the searchtxtbox and hits searchresults, the form will filter the listbox for the string entered using the like operator.
5-If the user enters a string in the searchtxtbox and hits searchstore, the form will re-query the datastore using a *like* operator selecting in the field_name or all fields depending on whether field_name is empty string or not.
6-If the user selects a row, the return string becomes equal to the field_name value. If the field_name is empty string, the return_string is equal to an xml string equal to the selected row.
7-If the user clicks [ok], the return_string is sent back to the caller function.
8-Each control has a text-tip explaining its function.
• The solution must work for any database schema and whatever data types contained in the table.
• The validation of inputs must be taken into account.
• All exceptions like (database is off, processing time out, etc) must be handled properly by code.
• Logging of errors should be done by writing off to a specific file configured in the web.config.
• Whenever required, any application block or component from Microsoft Enterprise Library 5.0 should be used.
• Must be delivered bug-free.