Exemplo n.º 1
0
        public ActionResult ViewNofication_OS(int acid, int NotificationId)
        {
            LoginUserDetails objLoginUserDetails = (LoginUserDetails)InsiderTrading.Common.Common.GetSessionValue((string)ConstEnum.SessionValue.UserDetails);

            NotificationModel objNotificationModel = new NotificationModel();

            NotificationDTO objNotificationDTO = new NotificationDTO();

            List <PopulateComboDTO> lstList = new List <PopulateComboDTO>();

            try
            {
                lstList = FillComboValues(ConstEnum.ComboType.ListOfCode, Convert.ToInt32(ConstEnum.CodeGroup.CommunicationModes).ToString(), Convert.ToInt32(ConstEnum.Code.CommunicationCategory).ToString(), null, null, null, true);
                ViewBag.ModeCodeList = lstList;
                if (NotificationId > 0)
                {
                    using (var objNotificationSL = new NotificationSL_OS())
                    {
                        objNotificationDTO = objNotificationSL.GetDetails_OS(objLoginUserDetails.CompanyDBConnectionString, NotificationId);
                    }
                    InsiderTrading.Common.Common.CopyObjectPropertyByName(objNotificationDTO, objNotificationModel);
                    objNotificationModel.Contents = objNotificationModel.Contents.Replace("\\r\\n", "<br/>");
                    if (objNotificationModel.Signature != null)
                    {
                        objNotificationModel.Signature = objNotificationModel.Signature.Replace("\\r\\n", "<br/>");
                    }
                }
                ViewBag.ModeCodeId          = objNotificationDTO.ModeCodeId;
                ViewBag.NotificationQueueId = NotificationId;
                ViewBag.UserId = objLoginUserDetails.LoggedInUserID;

                //ViewBag.CommunicationMode_id = objCommunicationRuleMasterModel.CommunicationModeCodeId;
                return(View("ViewNofication_OS", objNotificationModel));
            }
            catch (Exception exp)
            {
                //NotificationModel objNotificationModel = new NotificationModel();
                string sErrMessage = Common.Common.getResource(exp.InnerException.Data[0].ToString());
                ModelState.AddModelError("Error", sErrMessage);
                return(View("ViewNofication_OS", objNotificationModel));
            }
        }
Exemplo n.º 2
0
        public ActionResult DashboardNotification_OS()
        {
            LoginUserDetails objLoginUserDetails = (LoginUserDetails)InsiderTrading.Common.Common.GetSessionValue((string)ConstEnum.SessionValue.UserDetails);

            NotificationModel objNotificationModel = new NotificationModel();

            objLoginUserDetails.ShowNotificationPopup = false;
            Common.Common.SetSessionValue(ConstEnum.SessionValue.UserDetails, objLoginUserDetails);
            List <NotificationDTO> lstList = new List <NotificationDTO>();

            try
            {
                CheckAppliedModule();
                ViewBag.NoRecord_OS = false;
                using (var objNotificationSL_OS = new NotificationSL_OS())
                {
                    lstList = objNotificationSL_OS.GetDashboardNotificationList(objLoginUserDetails.CompanyDBConnectionString, objLoginUserDetails.LoggedInUserID);
                }
                if (lstList.Count > 0)
                {
                    ViewBag.UserId = objLoginUserDetails.LoggedInUserID;
                    ViewBag.NotificationDictionary_OS = lstList;
                    return(PartialView("DashboardNotificationIndex_OS"));
                }
                else
                {
                    ViewBag.NoRecord_OS = true;
                    return(PartialView("DashboardNotificationIndex_OS"));
                }
            }
            catch (Exception exp)
            {
                string sErrMessage = Common.Common.getResource(exp.InnerException.Data[0].ToString());
                ModelState.AddModelError("Error", sErrMessage);
                ViewBag.UserId = objLoginUserDetails.LoggedInUserID;
                FillGrid(ConstEnum.GridType.DashBboardNotificationList, Convert.ToString(objLoginUserDetails.LoggedInUserID), Convert.ToString(Common.ConstEnum.Code.CommunicationModeForEmail), null, null, null);

                return(PartialView("DashboardNotificationIndex_OS"));
            }
        }