public CentreDashboardViewModel(
     CentreDashboardInformation dashboardInformation,
     string userIpAddress,
     int unacknowledgedNotificationsCount
     )
 {
     CentreDetails = new DashboardCentreDetailsViewModel(
         dashboardInformation.Centre,
         userIpAddress,
         dashboardInformation.CentreRank
         );
     FirstName = string.IsNullOrWhiteSpace(dashboardInformation.FirstName)
         ? "User"
         : dashboardInformation.FirstName;
     CourseCategory              = dashboardInformation.CategoryName ?? "all";
     NumberOfDelegates           = dashboardInformation.DelegateCount;
     NumberOfCourses             = dashboardInformation.CourseCount;
     NumberOfAdmins              = dashboardInformation.AdminCount;
     NumberOfSupportTickets      = dashboardInformation.SupportTicketCount;
     ViewNotificationsButtonText = "View " + unacknowledgedNotificationsCount + " notification" +
                                   DisplayStringHelper.GetPluralitySuffix(unacknowledgedNotificationsCount);
 }
示例#2
0
 public CentreDashboardViewModel(
     Centre centre,
     string?firstName,
     string?categoryName,
     string userIpAddress,
     int delegates,
     int courses,
     int admins,
     int supportTickets,
     int?centreRank,
     int unacknowledgedNotificationsCount
     )
 {
     CentreDetails               = new DashboardCentreDetailsViewModel(centre, userIpAddress, centreRank);
     FirstName                   = string.IsNullOrWhiteSpace(firstName) ? "User" : firstName;
     CourseCategory              = categoryName ?? "all";
     NumberOfDelegates           = delegates;
     NumberOfCourses             = courses;
     NumberOfAdmins              = admins;
     NumberOfSupportTickets      = supportTickets;
     ViewNotificationsButtonText = "View " + unacknowledgedNotificationsCount + " notification" +
                                   DisplayStringHelper.GetPluralitySuffix(unacknowledgedNotificationsCount);
 }