private void PopulateNotifications() { notificationsList.Clear(); foreach (var notification in notificationBLL.GetAll()) { if (notification.Category == "Subscriber Notification") { notificationsList.Add(new ucNotificationMessages() { Category = notification.Category, Message = notification.Message, Date = notification.Date.ToShortDateString(), Icon = Resources.notificationsSubscribers }); } else if (notification.Category == "Material Notification") { notificationsList.Add(new ucNotificationMessages() { Category = notification.Category, Message = notification.Message, Date = notification.Date.ToShortDateString(), Icon = Resources.notificationsMaterials }); } } }