i have very simple application of maintaining student information. application hv two table and two form .
1st table for student information having 4 field:-StuID, StuNam, StuAdd, StuScholashi
2nd table Student Payment Info having 4 field :-PayID,PayAmt,PayDat,ANd student making payment
both r related with student id (from 1st table) and student making payment(foreign key)
now i hv two form
1st form with text field shows student information
2nd form with text field shows payment history ...
and i have command button in both form like Add, Delete, Search,Modify and nevigation
now i have been told to do remove all common part from both form and put in 1 generic form so what ever will be remaining in both form is only related to dat perticular form only which will make then as custome control...so will be having 2 custome control
now whn at run time when user will place student-custome control in generic form and suppose click on add button adding of student should tac place..similarly for Payment-custome...addition of payment should tac place...
define interface, interface as in "Definition of the abstract methods" .e. a collection of function signatures
Now in each custom control implement these method (similar to polymorphism), so when I call DataDelete() in the generic form
it will call the appropriate delete method in the user control which is loaded at the time
Summary: we require
>1 common container form
>2 user controls
>1 interface
>user controls to implemnt the methods of the interface
>container control buttons will call the methods of the interface
>container control will have to maintain a reference to the control which is loaded at that time in it
so that it cn call the correct method
>container control will load the user control at run-time