Page numbers fixed, Register with roles not shown to guests

This commit is contained in:
Dimitar Byalkov
2023-05-05 00:35:35 +02:00
parent eea8cf9aac
commit 81109f3d6c
4 changed files with 25 additions and 8 deletions

View File

@@ -18,8 +18,13 @@ namespace WebApp.Pages
{
p = 1;
}
if (c == null || c < 1)
{
c = 10;
}
ViewData.Add("announcements", AnnouncementManager.GetAnnouncementsByPage(p - 1, c));
ViewData.Add("page", p);
ViewData.Add("count", c);
ViewData.Add("allCount", AnnouncementManager.GetAllAnnouncements().Count());
}
}