Esempio n. 1
0
        public async Task <QuoteAgentSetRes> SetQRFAgentDetails(QUOTEAgentSetReq objQRFAgentSetReq, string ticket)
        {
            QuoteAgentSetRes objQuoteAgentSetRes = new QuoteAgentSetRes();

            objQuoteAgentSetRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceAgent:SetQRFAgentDetails"), objQRFAgentSetReq, typeof(QuoteAgentSetRes), ticket);

            return(objQuoteAgentSetRes);
        }
Esempio n. 2
0
 public IActionResult QuoteAgentInformation(QuoteAgentInfoViewModel model)
 {
     try
     {
         //string SubStep = "";
         NewQuoteViewModel modelQuote   = new NewQuoteViewModel();
         SalesQuoteLibrary quoteLibrary = new SalesQuoteLibrary(_configuration);
         if (ModelState.IsValid)
         {
             IRequestCookieCollection objCookies = HttpContext.Request.Cookies;
             var sessionData = string.IsNullOrEmpty(HttpContext.Request.Cookies["VoyagerUser_Id"]) ? HttpContext.Session.GetComplexData <List <ProductAttributeDetails> >(SessionName) : null;
             QuoteAgentSetRes objAgentResponse = quoteLibrary.SetQRFAgentDetails(_configuration, token, model, objCookies, sessionData);
             if (objAgentResponse.ResponseStatus.Status.ToLower() == "success")
             {
                 modelQuote.QRFID    = objAgentResponse.QRFID;
                 TempData["success"] = "QRF details saved successfully";
                 //SubStep = "DateRange";
                 //if (!string.IsNullOrEmpty(SubStep) && SubStep == "DateRange")
                 TempData["QuoteSaved"] = true;
             }
             else
             {
                 TempData["error"] = objAgentResponse.ResponseStatus.Status;
                 if (string.IsNullOrEmpty(modelQuote.QRFID))
                 {
                     modelQuote.QRFID = model.QRFID;
                 }
             }
         }
         return(RedirectToAction("NewQuote", new { modelQuote.QRFID }));
     }
     catch (Exception ex)
     {
         return(RedirectToAction("NewQuote", new { model.QRFID }));
     }
 }