Exemple #1
0
        public ActionResult CheckExpiredEventsPartial(FireAlarmModel model)
        {
            try
            {
                if (model.EncryptedCookie == null)
                {
                    model.EncryptedCookie = new UserBLL().GetEncryptedUserID(UserLoginData.GetSessionID(Session["UserLoggedIn"]));
                }

                var expiredList = noteBLL.CheckExpiredEventsBLL(model.EncryptedCookie);

                if (expiredList.Count() >= 1)
                {
                    return(Json(new { list = true, render = RenderViewToString("_FireAlarmDialog", expiredList) }));
                }

                return(Json(new { list = false }));
            }
            catch (Exception ex)
            {
                return(RedirectToAction("InternalServerError", "Error", new { error = ex.Message }));
            }
        }