The source code from Wrox website has some errors. I can't delete / approve entries. I fixed it as follows.
- In SqlDataProvider.cs, line 98:
Code:
return (IDataReader)SqlHelper.ExecuteReader(connectionString, GetFullyQualifiedName("GetAprovedEntries"), moduleId);
It must be :
Code:
return (IDataReader)SqlHelper.ExecuteReader(connectionString, GetFullyQualifiedName("GetApprovedEntries"), moduleId);
- In EditGuestbookCS.ascx.cs, from line 32 to line 37:
Code:
if (isApprove)
oController.ApproveGuestbookEntry(oSignModuleId, entryId);
else
oController.DeleteGuestbookEntry(oSignModuleId, entryId);
ModuleController.SynchronizeModule(oSignModuleId);
It must be
Code:
if (isApprove)
oController.ApproveGuestbookEntry(oSignModuleId + 1, entryId);
else
oController.DeleteGuestbookEntry(oSignModuleId + 1, entryId);
ModuleController.SynchronizeModule(oSignModuleId + 1);
But i can't understand why i must add 1 to oSignModuleId ? and why the moduleID of the setting "WroxModules_Guestbook_SignModule" different from the moduleID of the setting "WROX_Guestbook_AllowAnon" in table dbo.ModuleSettings?