Hi Tawanda,
Are there specific areas that you need help with?
In short, this is the pattern you should follow to allow for details:
1. Write a procedure or query, like sprocBlogEntryDeleteSingleItem, that deletes a BlogEntry based on its ID. Similar to sprocBlogEntrySelectSingleItem in terms of parameters.
2. Write a delete method that accepts an ID (an Integer) in the BlogManagerDB class that executes this delete statement and passes in the BlogEntry ID.
3. Write a method in the BlogManager class that accepts an ID and forwards it to the BlogManagerDB class. Wrap the code in a role check, similar to SaveBlogEntry.
4. Add a button to the blog list or detail page. Hide the button when you're not an administrator. This button could be an exact copy of the Edit button / link
5. Write some code in the Click handler that retrieves the ID and then calls the Delete method in the BlogManager class which calls the BlogManagerDB class which in turn fires the query / stored procedure.
Does this help? If not, let me know what areas you need help with.
BTW: nice to see my blog in a real world web site..... Great idea to use the Access providers. They weren't around when we wrote the book. Otherwise, I would have used them, removing the need to write my own security mechanism for Access.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out
this post.