示例#1
0
        public ActionResult UpdateRateOptionsNote(SentEmailItem data)
        {
            //var messageModelReload = new AppraisalConfirmationMessage();

            //var messageModel = new ErrorMessage();
            UserAccount loggedUser = null;

            try
            {
                if (HttpContext != null && HttpContext.Session != null && HttpContext.Session[SessionHelper.UserData] != null)
                {
                    loggedUser = ( UserAccount )HttpContext.Session[SessionHelper.UserData];
                }
                else
                {
                    // TODO: Handle if user don't have priviledges to see this log
                    throw new UnauthorizedAccessException("User is not authorized to access this method!");
                }
                ContactServiceFacade.UpdateSentEmailItemNote(data, loggedUser.UserAccountId);
            }
            catch (Exception exception)
            {
                TraceHelper.Error(TraceCategory.OrderAppraisal, "Failed to save appraisal order", exception);
            }

            return(Json(true));
        }
示例#2
0
        //
        // GET: /OpenRateOptionNotesPopupCommand/

/*
 *      public ActionResult Index()
 *      {
 *          return View();
 *      }
 */
        public override void Execute()
        {
            base.Execute();
            try
            {
                var emailId = 0;
                if (InputParameters.ContainsKey("SentMailId"))
                {
                    Int32.TryParse(InputParameters["SentMailId"].ToString().TrimEnd(), out emailId);
                }


                if (emailId == 0)
                {
                    throw new InvalidOperationException("Missing sent email Id!");
                }

                RateOptionViewModel model = new RateOptionViewModel();



                SentEmailItem bussinesContactViewModel = ContactServiceFacade.RetrieveSentEmailItemNote(emailId, base.User.UserAccountId);

                if (bussinesContactViewModel != null)
                {
                    model.SentEmailNote      = bussinesContactViewModel.Notes;
                    model.SentEmailIdCurrent = emailId;
                }

                ViewName = "Commands/_rateOptionsNotePopup";
                ViewData = model;
            }
            catch (Exception ex)
            {
                TraceHelper.Error(TraceCategory.LoanCenter, "There is some issues in method OpenBusinessContactPopupCommand.Execute(): " + ex.Message, ex);
                throw;
            }
        }