Beispiel #1
0
        public static Notifications GetNotifications(NotificationDO notificationDO)
        {
            Notifications notifications = new Notifications()
            {
                notificationID      = notificationDO.ID,
                notificationmessage = notificationDO.Notificationmessage,
                notificationType    = notificationDO.NotificationType,
                count              = notificationDO.Count,
                notificationDate   = notificationDO.NotificationDate,
                notificationTypeID = notificationDO.NotificationTypeID,
            };

            return(notifications);
        }
Beispiel #2
0
        public static NotificationDO GetNotificationsDO(Notifications notification)
        {
            NotificationDO notificationDO = new NotificationDO()
            {
                ID = notification.notificationID,
                Notificationmessage = notification.notificationmessage,
                NotificationType    = notification.notificationType,
                Count              = notification.count,
                NotificationDate   = notification.notificationDate,
                NotificationTypeID = notification.notificationTypeID,
            };

            return(notificationDO);
        }
        public int DeleteNotifications(Notifications notification)
        {
            int result = 0;

            try
            {
                NotificationDO optionsDO = Converter.GetNotificationsDO(notification);
                result = notificationRepository.DeleteEntity(optionsDO.ID);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Exception Occured in DeleteOptions method due to " + ex.Message);
            }
            return(result);
        }