Esempio n. 1
0
        public IActionResult clearNotification(ParamNotification data)
        {
            NotificationDL dal = new NotificationDL();

            var hasil = dal.clearNotification(data);

            return(Ok(hasil));
        }
Esempio n. 2
0
        public ActionResult Notification()
        {
            int            id = (int)Session["UserId"];
            var            EventSharedList = context.SharedContents.Include("Events").Include("Users").Where(x => x.SharedWithUserID == id).ToList();
            var            IdeaSharedList  = context.ShareIdeaContents.Include("Ideas").Include("Users").Where(x => x.SharedWithUserID == id).ToList();
            var            EventStory      = context.ShareEventStories.ToList();
            NotificationDL notification    = new NotificationDL();

            notification.ShareEvents       = EventSharedList;
            notification.ShareIdeas        = IdeaSharedList;
            notification.ShareEventStories = EventStory;
            return(View(notification));
        }
Esempio n. 3
0
        public IActionResult getNotificationList(ParamNotification data)
        {
            NotificationDL dal = new NotificationDL();

            NotificationAvailable hasil = new NotificationAvailable();

            /**
             * This params is for pagination function
             */
            if (!string.IsNullOrEmpty(data.limit) && data.limit != "string" && !string.IsNullOrEmpty(data.page) && data.page != "string")
            {
                data.page  = data.page;
                data.limit = data.limit;
            }
            else if (!string.IsNullOrEmpty(data.page) && data.page != "string" && string.IsNullOrEmpty(data.limit) && data.limit != "string")
            {
                data.page  = data.page;
                data.limit = "10";
            }
            else if (!string.IsNullOrEmpty(data.limit) && data.limit != "string" && string.IsNullOrEmpty(data.page) && data.page != "string")
            {
                data.page  = "1";
                data.limit = data.limit;
            }
            else
            {
                data.page  = "1";
                data.limit = "10";
            }

            IEnumerable <NotificationData> result = dal.getNotificationData(data);

            hasil.message = "Success";
            hasil.status  = "S";
            hasil.count   = result.Cast <Object>().Count();
            hasil.data    = new PagedList <NotificationData>(result.ToList(), Convert.ToInt32(data.page), Convert.ToInt32(data.limit));

            return(Ok(hasil));
        }
Esempio n. 4
0
 public void NotificationReadBL(string notificationId)
 {
     obj = new NotificationDL();
     obj.NotificationReadDL(notificationId);
 }
Esempio n. 5
0
 public DataTable GetUserIDBL(string PPRID)
 {
     obj = new NotificationDL();
     return(obj.GetUserIDDL(PPRID));
 }
Esempio n. 6
0
 public DataTable GetNodalIDBL(string MinistryID)
 {
     obj = new NotificationDL();
     return(obj.GetNodalIDDL(MinistryID));
 }
Esempio n. 7
0
 public void saveNotificationBL(string loginid = "0", string notification = "0", string sentto = "0", string PPRId = "0", string NotificationType = "0", string actionUrl = "#", string sentbyUrl = "#", string DocID = "0")
 {
     obj = new NotificationDL();
     obj.saveNotificationDL(loginid, notification, sentto, PPRId, NotificationType, actionUrl, sentbyUrl, DocID);
 }