hello, Chris, I can confirm the same problem. when I insert an entry into the db it is attached to module 377 on my server, but when I am trying to delete or approve it, the module ID is 376.
It would seem that the EditGuestbookCS/
VB is a different moduleID from the ViewGuestbookCS/
VB which is also different from the SignGuestbookCS/
VB
To solve I used a similar approach to what was used in ViewGuestbook to retrieve the modules. Here is the changes I made in (I have bolded the changes I made):
if ((Request.QueryString["EntryId"] != null))
{
object signModuleSetting = Settings["WroxModules_Guestbook_SignModule"];
int signModuleID = int.Parse(signModuleSetting.ToString());
entryId = Int32.Parse(Request.QueryString["EntryId"]);
bool isApprove = false;
if(Request.QueryString["approve"] !=null)
isApprove = true;
GuestbookCSController oController = new GuestbookCSController();
if (isApprove)
oController.ApproveGuestbookEntry(
signModuleID, entryId);
else
oController.DeleteGuestbookEntry(
signModuleID, entryId);
ModuleController.SynchronizeModule(this.ModuleId);
}
Does this look about right?