Ejemplo n.º 1
0
 public IActionResult QuoteDateRange(QuoteDateRangeViewModel model)
 {
     try
     {
         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;
             model.QuoteSpecificDateViewModel = model.QuoteSpecificDateViewModel.Where(a => a.DepartureId > 0 || (a.DepartureId == 0 && a.IsDeleted == false)).ToList();
             DepartureDateSetResponse departureSetResponse = quoteLibrary.SetQRFDepartureDetails(_configuration, token, model, objCookies, sessionData);
             if (departureSetResponse.Status.ToLower() == "success")
             {
                 TempData["success"] = "Departure Dates saved successfully";
             }
             else
             {
                 TempData["error"] = departureSetResponse.Status;
             }
         }
         return(RedirectToAction("GetDateRange", new { model.QRFID }));
     }
     catch (Exception ex)
     {
         throw;
         return(RedirectToAction("GetDateRange", new { model.QRFID }));
     }
 }
Ejemplo n.º 2
0
        public async Task <DepartureDateSetResponse> SetQRFDepartureDetails(DepartureDateSetRequest objQRFDepartureSetReq, string ticket)
        {
            DepartureDateSetResponse objQuoteDepartureSetRes = new DepartureDateSetResponse();

            objQuoteDepartureSetRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceDeparture:SetDepartureDatesForQRFId"), objQRFDepartureSetReq, typeof(DepartureDateSetResponse), ticket);

            return(objQuoteDepartureSetRes);
        }