public ActionResult Index(int?id)
        {
            if (Convert.ToString(Session["key"]) != "doctor")
            {
                return(RedirectToAction("Login", "Home"));
            }

            // id = 5006;
            if (id != null)
            {
                System.Web.HttpContext.Current.Session.Add("key", "doctor");
                System.Web.HttpContext.Current.Session.Add("UserId", id);
                Login_Api la   = new Login_Api();
                var       name = la.GetUserName(id);

                System.Web.HttpContext.Current.Session.Add("UserName", name);
            }


            NotificationsModel notificationModel = new NotificationsModel();
            Admin_Api          adminApi          = new Admin_Api();

            notificationModel.UserRoleID = (int)Session["UserId"];//6003;
            var notifications = adminApi.GetAllNotificationsByRole(notificationModel);

            return(View("~/Views/Doctor/DoctorHome.cshtml", notificationModel));
        }
 public ActionResult ViewRoleNoti(string role)
 {
     if (role != null && role != "-Select")
     {
         if (Convert.ToString(Session["key"]) != "admin")
         {
             return(RedirectToAction("Login", "Home"));
         }
         Admin_Api          adminApi = new Admin_Api();
         NotificationsModel model    = new NotificationsModel();
         ViewBag.dropdownModel = null;
         model.UserRoleID      = Convert.ToInt32(role);
         var notis = adminApi.GetAllNotificationsByRole(model);
         ViewBag.dropdownModel = "true";
         return(View("~/Views/Administrator/AdminManageNotifications.cshtml", notis));
     }
     return(View("~/Views/Administrator/AdminManageNotifications.cshtml"));
 }