G
Guest
Hi,
I'm using the MS timetracker app as a basis for an application I am building.
I have at present two classes, Site and SitesCollection, similar to the timeentry and timeentrycollection classes. These classes use the ms sqlhelper class as a data access layer.
I've now created a web form that uses the site and sitescollection classes to build a collection of site objects from the database and display them in a datagrid. I have also provided fields to allow for adding sites to the db and allowed users to edit inline and delete by choosing a checkbox and hitting a delete button.
My question is around how I would now provide the same maintenance page for a different set of data. Sites contain pages, so I am allowing the user to choose a site from the grid to display the related pages in the same manner as for sites.
I'm thinking the best way is to now create a page and pagescollection class and then follow the same principle with datagrid, inputs, buttons etc as for the sites. I'm concerned though that I will be repeating code that could in some way be re-used.
Am I approaching this correctly or is there a better way to go about this sort of problem?
Any suggestions greatly appreciated.
Thanks
K
I'm using the MS timetracker app as a basis for an application I am building.
I have at present two classes, Site and SitesCollection, similar to the timeentry and timeentrycollection classes. These classes use the ms sqlhelper class as a data access layer.
I've now created a web form that uses the site and sitescollection classes to build a collection of site objects from the database and display them in a datagrid. I have also provided fields to allow for adding sites to the db and allowed users to edit inline and delete by choosing a checkbox and hitting a delete button.
My question is around how I would now provide the same maintenance page for a different set of data. Sites contain pages, so I am allowing the user to choose a site from the grid to display the related pages in the same manner as for sites.
I'm thinking the best way is to now create a page and pagescollection class and then follow the same principle with datagrid, inputs, buttons etc as for the sites. I'm concerned though that I will be repeating code that could in some way be re-used.
Am I approaching this correctly or is there a better way to go about this sort of problem?
Any suggestions greatly appreciated.
Thanks
K