Esempio n. 1
0
        /// <summary>
        /// returns all notifications on first load
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public ActionResult Index(int page = 0)     
        {
            int noOfRecords = 10;
            HomeViewModel dashboard = new HomeViewModel()
            {
                Notification = GetNotifications(page, noOfRecords),
                Count = GetNotifications(page, noOfRecords).Count()
            };

            if (Request.IsAjaxRequest())
            {
                if (dashboard.Count != 0)
                    return PartialView("Notification", dashboard);
                else
                    return null;
            }
            return View(dashboard);
        }
Esempio n. 2
0
 public PartialViewResult UserNotification(string id)
 {
     HomeViewModel dashboard = new HomeViewModel()
     {
         Notification = GetNotifications(id)
     };
     return PartialView("Notification", dashboard);
 }