Esempio n. 1
0
        public NewQuoteViewModel GetRoutingDetails(string QRFID)
        {
            NewQuoteViewModel model = new NewQuoteViewModel();

            try
            {
                model.mdlQuoteRoutingViewModel       = new QuoteRoutingViewModel();
                model.mdlQuoteRoutingViewModel.QRFID = QRFID;

                SalesQRFMapping salesQRFMapping = new SalesQRFMapping(_configuration);

                RoutingGetReq routingGetReq = new RoutingGetReq();
                routingGetReq.QRFID = QRFID;

                SalesProviders objSalesProvider = new SalesProviders(_configuration);
                RoutingGetRes  routingGetRes    = objSalesProvider.getQRFRoutingDetails(routingGetReq, token).Result;

                model.mdlQuoteRoutingViewModel = salesQRFMapping.QRFRoutingGet(routingGetRes, token);
            }
            catch (Exception ex)
            {
                throw;
            }
            return(model);
        }
Esempio n. 2
0
        public IActionResult GetFOC(string QRFID)
        {
            NewQuoteViewModel model = new NewQuoteViewModel();

            try
            {
                bool GetStatus = false;
                SalesQuoteLibrary quoteLibrary = new SalesQuoteLibrary(_configuration);
                if (!string.IsNullOrEmpty(QRFID))
                {
                    model.QRFID = QRFID;
                    model.mdlQuoteFOCViewModel.QRFID       = QRFID;
                    model.mdlQuoteFOCViewModel.StandardFoc = true;
                    GetStatus = quoteLibrary.GetFOCDetails(_configuration, token, ref model);
                    if (model.mdlQuoteFOCViewModel.QuoteFOCDetails != null && model.mdlQuoteFOCViewModel.QuoteFOCDetails.Count < 1)
                    {
                        model.mdlQuoteFOCViewModel.QuoteFOCDetails.Add(new QuoteFOCDetails {
                            DateRange = "ALL", PaxSlab = "ALL", FOCSingle = 0, FOCTwin = 0, FOCDouble = 0, FOCTriple = 0
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
            return(PartialView("_QuoteFOC", model.mdlQuoteFOCViewModel));
        }
Esempio n. 3
0
        public IActionResult GetMargin(string QRFID, bool IsCostingMargin = false)
        {
            NewQuoteViewModel model = GetMarginDetails(QRFID, IsCostingMargin);

            TempData["IsCostingMargin"] = IsCostingMargin;
            return(PartialView("_QuoteMargins", model.mdlQuoteMarginViewModel));
        }
Esempio n. 4
0
        public TourInfoHeaderViewModel GetSalesTourInfoHeader(ref NewQuoteViewModel modelQuote, string token)
        {
            SalesQuoteLibrary quoteLibrary = new SalesQuoteLibrary(_configuration);

            salesQuoteLibrary.GetQRFAgentByQRFId(_configuration, token, ref modelQuote);
            return(modelQuote.TourInfoHeaderViewModel);
        }
Esempio n. 5
0
        public IActionResult Guesstimate()
        {
            if (UserRoles.Contains("Product Accountant"))
            {
            }
            else if (!UserRoles.Contains("Costing Officer"))
            {
                return(View("Unauthorize"));
            }
            string QRFID = Request.Query["QRFId"];

            GuesstimateViewModel model = new GuesstimateViewModel();

            model.MenuViewModel.QRFID    = QRFID;
            model.MenuViewModel.MenuName = "Guesstimate";

            #region Get Costing Officer Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel();
            modelQuote.QRFID                    = QRFID;
            model.COHeaderViewModel             = cOCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            model.MenuViewModel.EnquiryPipeline = modelQuote.mdlMenuViewModel.EnquiryPipeline;
            #endregion

            return(View(model));
        }
        public IActionResult IntercityTransfer()
        {
            try
            {
                string QRFID = Request.Query["QRFId"].ToString();
                IntercityTransferViewModel model = new IntercityTransferViewModel {
                    QRFID = QRFID
                };
                model.MenuViewModel.QRFID = QRFID;

                SalesQuoteLibrary quoteLibrary = new SalesQuoteLibrary(_configuration);
                NewQuoteViewModel modelQuote   = new NewQuoteViewModel {
                    QRFID = model.MenuViewModel.QRFID
                };
                bool GetStatus = quoteLibrary.GetQRFAgentByQRFId(_configuration, token, ref modelQuote);
                if (GetStatus)
                {
                    model.TourInfoHeaderViewModel = modelQuote.TourInfoHeaderViewModel;
                }

                return(View(model));
            }
            catch (Exception)
            {
                throw;
                return(View());
            }
        }
Esempio n. 7
0
        public IActionResult Proposal()
        {
            string QRFID     = Request.Query["QRFId"];
            bool   GetStatus = false;

            ProposalViewModel model = new ProposalViewModel();

            model.MenuViewModel.QRFID    = QRFID;
            model.MenuViewModel.MenuName = "Proposal";
            model.CurrentDate            = DateTime.Now.ToString("dd MMM yyyy");
            string username = "";

            username       = HttpContext.Request.Cookies["UserName"] ?? ckUserName;
            model.UserName = username;

            #region Get Costing Officer Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel();
            modelQuote.QRFID                    = QRFID;
            model.COHeaderViewModel             = cOCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            model.MenuViewModel.EnquiryPipeline = modelQuote.mdlMenuViewModel.EnquiryPipeline;
            #endregion

            ProposalLibrary proposalLibrary = new ProposalLibrary(_configuration);

            CompanyOfficerGetRes officerGetRes = new CompanyOfficerGetRes();
            CompanyOfficerGetReq officerGetReq = new CompanyOfficerGetReq();
            officerGetReq.CompanyId = ckUserCompanyId;
            officerGetReq.UserRole  = "Product Accountant";
            officerGetRes           = agentProviders.GetCompanyOfficers(officerGetReq, token).Result;

            model.OfficerList = officerGetRes.ContactDetails;
            var salespipelineres = agentProviders.GetAutomatedSalesPipelineRoles(new SettingsAutomatedGetReq {
                CompanyId = ckUserCompanyId, QRFId = QRFID, UserRole = officerGetReq.UserRole
            }, token).Result;
            if (!string.IsNullOrEmpty(salespipelineres?.ResponseStatus?.Status))
            {
                model.Officer = salespipelineres.UserEmailId;
            }
            #region PriceBreakUp
            if (!string.IsNullOrEmpty(QRFID))
            {
                model.QRFID = QRFID;
                GetStatus   = proposalLibrary.GetProposalPriceBreakupByQRFId(_configuration, token, ref model, QRFID);
            }

            ProposalGetReq request  = new ProposalGetReq();
            ProposalGetRes response = new ProposalGetRes();
            request.QRFID = QRFID;
            response      = coProviders.GetProposal(request, token).Result;
            if (response != null)
            {
                model.ProposalId = response.Proposal.ProposalId;
                model.ProposalPriceBreakupViewModel.PriceBreakUp = response.Proposal.PriceBreakup;
            }

            #endregion
            return(View(model));
        }
Esempio n. 8
0
        public IActionResult GenerateProposal()
        {
            try
            {
                string QRFID      = Request.Query["QRFId"];
                string urlInitial = HttpContext.Request.Scheme + "://" + HttpContext.Request.Host.Value;
                string PageURL    = urlInitial + "/ProposalDocument/ProposalDocument?QRFId=" + QRFID;
                string HeaderURL  = urlInitial + "/ProposalDocument/_ProposalDocumentHeader?QRFId=" + QRFID;
                string FooterUrl  = urlInitial + "/ProposalDocument/_ProposalDocumentFooter?QRFId=" + QRFID;
                if (!string.IsNullOrEmpty(QRFID))
                {
                    NewQuoteViewModel modelQuote = new NewQuoteViewModel {
                        QRFID = QRFID
                    };
                    COCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);

                    string filename    = FormatFileName(modelQuote.COHeaderViewModel.TourName) + ".pdf";
                    string PDFPath     = _configuration.GetValue <string>("SystemSettings:ProposalDocumentFilePath");
                    string FullPDFPath = Path.Combine(PDFPath, filename);
                    if (!Directory.Exists(PDFPath))
                    {
                        Directory.CreateDirectory(PDFPath);
                    }

                    PdfConvert._configuration = _configuration;
                    PdfConvert.GenerateDocument(PageURL, HeaderURL, FooterUrl, FullPDFPath, token, HttpContext.Request.Cookies);

                    if (filename == null)
                    {
                        return(Content("filename not present"));
                    }

                    #region Update ValidForAcceptance field in mQuote and mQRFPrice collection
                    ResponseStatus objResponseStatus = COCommonLibrary.UpdateValidForAcceptance(_configuration, token, QRFID, ckUserEmailId);
                    #endregion

                    var memory = new MemoryStream();
                    using (var stream = new FileStream(FullPDFPath, FileMode.Open))
                    {
                        stream.CopyTo(memory);
                    }
                    memory.Position = 0;
                    return(File(memory, PdfConvert.GetContentType(FullPDFPath), Path.GetFileName(FullPDFPath)));
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception ex)
            {
                throw;
                return(null);
            }
        }
Esempio n. 9
0
        public IActionResult ProposalReview(string QRFID)
        {
            NewQuoteViewModel modelQuote = new NewQuoteViewModel {
                QRFID = QRFID
            };
            string VirtualPath = _configuration.GetValue <string>("SystemSettings:ProposalFilesVirtualPath");

            cOCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            string pdfPath = "/" + VirtualPath + "/" + ProposalDocumentController.FormatFileName(modelQuote.COHeaderViewModel.TourName) + ".pdf";

            return(PartialView("_ProposalReview", pdfPath));
        }
Esempio n. 10
0
        public ItineraryViewModel GetSalesOfficerHeraderInfo(string QRFID, string MenuName)
        {
            model = new ItineraryViewModel();
            model.MenuViewModel.QRFID    = QRFID;
            model.MenuViewModel.MenuName = MenuName;

            #region Get Costing Officer Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel();
            modelQuote.QRFID                    = QRFID;
            model.COHeaderViewModel             = cOCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            model.MenuViewModel.EnquiryPipeline = modelQuote.mdlMenuViewModel.EnquiryPipeline;
            #endregion
            return(model);
        }
Esempio n. 11
0
        public IActionResult CostingOfficerHeader()
        {
            string            QRFID = Request.Query["QRFId"];
            ProposalViewModel model = new ProposalViewModel();

            #region Get Costing Officer Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel();
            modelQuote.QRFID        = QRFID;
            model.COHeaderViewModel = cOCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            ViewData.Add("EnquiryPipeline", modelQuote.mdlMenuViewModel.EnquiryPipeline);
            #endregion

            return(PartialView("_CostingOfficerHeader", model.COHeaderViewModel));
        }
Esempio n. 12
0
        public IActionResult Itinerary(string QRFID)
        {
            ItineraryViewModel model = new ItineraryViewModel();

            model.MenuViewModel.QRFID    = QRFID;
            model.MenuViewModel.MenuName = "Itinerary";

            #region Get Costing Officer Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel();
            modelQuote.QRFID                    = QRFID;
            model.COHeaderViewModel             = cOCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            model.MenuViewModel.EnquiryPipeline = modelQuote.mdlMenuViewModel.EnquiryPipeline;
            #endregion
            return(View(model));
        }
Esempio n. 13
0
        public IActionResult QRFSummary(string filterByDay = null, string filterByServiceType = null)
        {
            try
            {
                string QRFID = Request.Query["QRFId"];
                QRFSummaryViewModel model = new QRFSummaryViewModel();
                model.QRFID = QRFID;
                model.MenuViewModel.QRFID    = QRFID;
                model.MenuViewModel.MenuName = "Summary";
                model.CurrentDate            = DateTime.Now.ToString("dd MMM yyyy");
                bool   GetStatus = false;
                string username  = "";
                IRequestCookieCollection objCookies = HttpContext.Request.Cookies;
                objCookies.TryGetValue("UserName", out username);
                username       = string.IsNullOrEmpty(username) ? ckUserName : username;
                model.UserName = username;
                #region Get Quote Info By QRFId
                NewQuoteViewModel modelQuote = new NewQuoteViewModel();
                modelQuote.QRFID = QRFID;
                SalesQuoteLibrary quoteLibrary = new SalesQuoteLibrary(_configuration);
                GetStatus = quoteLibrary.GetQRFAgentByQRFId(_configuration, token, ref modelQuote);
                if (GetStatus)
                {
                    model.TourInfoHeaderViewModel = modelQuote.TourInfoHeaderViewModel;
                }

                CompanyOfficerGetRes officerGetRes = new CompanyOfficerGetRes();
                CompanyOfficerGetReq officerGetReq = new CompanyOfficerGetReq();
                officerGetReq.CompanyId = ckUserCompanyId;
                officerGetReq.UserRole  = "Costing Officer";
                officerGetRes           = agentProviders.GetCompanyOfficers(officerGetReq, token).Result;

                model.OfficerList = officerGetRes.ContactDetails;
                var salespipelineres = agentProviders.GetAutomatedSalesPipelineRoles(new SettingsAutomatedGetReq {
                    CompanyId = ckUserCompanyId, QRFId = QRFID, UserRole = officerGetReq.UserRole
                }, token).Result;
                if (!string.IsNullOrEmpty(salespipelineres?.ResponseStatus?.Status))
                {
                    model.Officer = salespipelineres.UserEmailId;
                }
                #endregion
                return(View(model));
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Esempio n. 14
0
        //[Route("Quote/Accomodation")]
        public IActionResult Accomodation()
        {
            string QRFID = Request.Query["QRFId"].ToString();
            string PositionId = Request.Query["PositionId"].ToString();
            bool IsClone = Convert.ToBoolean(Request.Query["IsClone"]);
            string SuccessMessage = Request.Query["SuccessMessage"].ToString();
            string ErrorMessage = Request.Query["ErrorMessage"].ToString();

            ViewBag.MenuName = "Accomodation";
            model = new AccomodationViewModel();
            model.MenuViewModel.QRFID = QRFID;
            model.MenuViewModel.PositionId = PositionId;

            #region Get Quote Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel();
            modelQuote.QRFID = model.MenuViewModel.QRFID;
            model.TourInfoHeaderViewModel = posLibrary.GetSalesTourInfoHeader(ref modelQuote, token);
            #endregion

            positionGetReq = new PositionGetReq();
            positionGetReq.QRFID = QRFID;
            positionGetReq.PositionId = PositionId;
            positionGetReq.ProductType.Add(new ProductType { ProdType = "Hotel" });
            positionGetReq.IsClone = IsClone;

            positionGetRes = positionProviders.GetPosition(positionGetReq, token).Result;

            model = accomoMapping.AccomodationGet(positionGetRes, ref model, token);

            if (!(string.IsNullOrEmpty(SuccessMessage)))
                TempData["success"] = SuccessMessage;

            if (!(string.IsNullOrEmpty(ErrorMessage)))
                TempData["error"] = ErrorMessage;

            if (string.IsNullOrEmpty(PositionId))
            {
                if (string.IsNullOrEmpty(SuccessMessage) && string.IsNullOrEmpty(ErrorMessage))
                    return View(model);
                else
                    return PartialView("_Accomodation", model);
            }
            else
                return PartialView("_Accomodation", model);
        }
Esempio n. 15
0
        public IActionResult Costsheet()
        {
            if (UserRoles.Contains("Product Accountant"))
            {
            }
            else if (!UserRoles.Contains("Costing Officer"))
            {
                return(View("Unauthorize"));
            }

            string QRFID = Convert.ToString(Request.Query["QRFId"]);

            CostsheetViewModel model = new CostsheetViewModel();

            model.MenuViewModel.QRFID    = QRFID;
            model.MenuViewModel.MenuName = "Costsheet";

            #region Get Costing Officer Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel();
            modelQuote.QRFID                    = QRFID;
            model.COHeaderViewModel             = cOCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            model.MenuViewModel.EnquiryPipeline = modelQuote.mdlMenuViewModel.EnquiryPipeline;
            #endregion

            #region Dropdown Binding
            QRFDepartureDateGetReq objDepartureDatesReq = new QRFDepartureDateGetReq()
            {
                QRFID = QRFID, date = (DateTime?)null
            };
            QRFDepartureDateGetRes objDepartureDatesRes = coProviders.GetDepartureDatesForCostingByQRF_Id(objDepartureDatesReq, token).Result;
            model.ConsolidatedSummaryViewModel.DepartureDatesList = (objDepartureDatesRes.DepartureDates).Select(a => new AttributeValues {
                AttributeValue_Id = a.Departure_Id.ToString(), Value = Convert.ToDateTime(a.Date).ToString("dd MMM yy")
            }).ToList();
            #endregion

            #region Get Costsheet by QRFId
            CostsheetGetReq request  = new CostsheetGetReq();
            CostsheetGetRes response = new CostsheetGetRes();
            request.QRFID = QRFID;
            response      = coProviders.GetCostsheet(request, token).Result;
            model.ConsolidatedSummaryViewModel.CostsheetVersion = response.CostsheetVersion;
            #endregion

            return(View(model));
        }
Esempio n. 16
0
        public IActionResult Commercials()
        {
            string QRFID = Request.Query["QRFId"];

            CommercialsViewModel model = new CommercialsViewModel();

            model.MenuViewModel.QRFID    = QRFID;
            model.MenuViewModel.MenuName = "Commercials";

            #region Get Costing Officer Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel();
            modelQuote.QRFID                    = QRFID;
            model.COHeaderViewModel             = cOCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            model.MenuViewModel.EnquiryPipeline = modelQuote.mdlMenuViewModel.EnquiryPipeline;
            #endregion

            return(View(model));
        }
Esempio n. 17
0
        public COHeaderViewModel GetProposalDocumentHeaderDetails(string QRFID, HttpRequest request, HttpResponse response, string token)
        {
            COHeaderViewModel model = new COHeaderViewModel();
            //if (string.IsNullOrEmpty(request.Cookies["TourName"]))
            //{
            QuoteAgentGetReq objQRFAgentRequest = new QuoteAgentGetReq()
            {
                QRFID = QRFID
            };
            COProviders            objCOProvider  = new COProviders(_configuration);
            ProposalDocumentGetRes objProposalRes = objCOProvider.GetProposalDocumentHeaderDetails(objQRFAgentRequest, token).Result;
            NewQuoteViewModel      modelQuote     = new NewQuoteViewModel {
                QRFID = QRFID
            };

            model = GetCOTourInfoHeader(ref modelQuote, token);
            //model.SystemEmail = objProposalRes.SystemEmail;
            //model.SystemPhone = objProposalRes.SystemPhone;
            model.SystemEmail   = model.SalesPerson ?? "";
            model.SystemPhone   = model.SalesPersonMobile ?? "";
            model.SystemWebsite = objProposalRes.SystemWebsite ?? "";

            //response.Cookies.Append("SystemEmail", objProposalRes.SystemEmail);
            //response.Cookies.Append("SystemPhone", objProposalRes.SystemPhone);
            //response.Cookies.Append("SystemWebsite", objProposalRes.SystemWebsite);
            //response.Cookies.Append("TravelDate", model.TravelDate.ToString());
            //response.Cookies.Append("TourName", model.TourName);
            //response.Cookies.Append("ContactPerson", model.ContactPerson);
            //response.Cookies.Append("AgentName", model.AgentName);
            //response.Cookies.Append("PaxCount", model.Pax.ToString());
            //}
            //else
            //{
            //    model.SystemEmail = request.Cookies["SystemEmail"];
            //    model.SystemPhone = request.Cookies["SystemPhone"];
            //    model.SystemWebsite = request.Cookies["SystemWebsite"];
            //    model.TravelDate = Convert.ToDateTime(request.Cookies["TravelDate"]);
            //    model.TourName = request.Cookies["TourName"];
            //    model.ContactPerson = request.Cookies["ContactPerson"];
            //    model.AgentName = request.Cookies["AgentName"];
            //    model.Pax = Convert.ToInt32(request.Cookies["PaxCount"]);
            //}
            return(model);
        }
Esempio n. 18
0
        public IActionResult GetDateRange(string QRFId)
        {
            NewQuoteViewModel model = new NewQuoteViewModel();

            try
            {
                #region Departure Dates
                model.mdlQuoteDateRangeViewModel.TravelDateType = "SpecificDates";
                model.mdlQuoteDateRangeViewModel.QuoteSpecificDateViewModel.Add(new QuoteSpecificDateViewModel()
                {
                    DepartureId = -1, SelectedDate = DateTime.Today.ToString("dd MMM yyyy"), NoOfDepartures = 1, PaxPerDeparture = 1, Warning = "", IsDeleted = false
                });
                JsonResult json = GetDepartureDatesForQRFId(QRFId, null);
                DepartureDateGetResponse departureDateRes = new DepartureDateGetResponse {
                    DepartureDates = (List <DepartureDates>)json.Value
                };
                if (departureDateRes != null && departureDateRes.DepartureDates != null && departureDateRes.DepartureDates.Count > 0)
                {
                    //model.mdlQuoteDateRangeViewModel.QuoteSpecificDateViewModel.Clear();
                    model.mdlQuoteDateRangeViewModel.QuoteSpecificDateViewModel.AddRange(departureDateRes.DepartureDates
                                                                                         .Select(a => new QuoteSpecificDateViewModel
                    {
                        DepartureId     = a.Departure_Id,
                        IsDeleted       = a.IsDeleted,
                        NoOfDepartures  = a.NoOfDep,
                        PaxPerDeparture = a.PaxPerDep,
                        SelectedDate    = a.Date == null ? "" : Convert.ToDateTime(a.Date).ToString("dd MMM yyyy"),
                        Warning         = a.Warning
                    }));
                }
                #endregion

                model.QRFID = model.QRFID;
                model.mdlQuoteDateRangeViewModel.QuoteSpecificDateViewModel = model.mdlQuoteDateRangeViewModel.QuoteSpecificDateViewModel;
                model.mdlQuoteDateRangeViewModel.TravelDateType             = model.mdlQuoteDateRangeViewModel.TravelDateType;
            }
            catch (Exception ex)
            {
                throw;
            }
            return(PartialView("_QuoteDateRange", model.mdlQuoteDateRangeViewModel));
        }
Esempio n. 19
0
        public IActionResult Proposal(string QRFID)
        {
            ProposalViewModel model = new ProposalViewModel();

            model.MenuViewModel.QRFID    = QRFID;
            model.MenuViewModel.MenuName = "Proposal";

            bool GetStatus = false;

            #region Get Costing Officer Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel();
            modelQuote.QRFID                            = QRFID;
            model.COHeaderViewModel                     = cOCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            model.MenuViewModel.EnquiryPipeline         = modelQuote.mdlMenuViewModel.EnquiryPipeline;
            model.AgentApprovalHeaderButtons            = new AgentApprovalHeaderButtons();
            model.AgentApprovalHeaderButtons.QRFID      = QRFID;
            model.AgentApprovalHeaderButtons.QRFPriceID = model.COHeaderViewModel.QRFPriceID;
            #endregion

            ProposalLibrary proposalLibrary = new ProposalLibrary(_configuration);

            #region PriceBreakUp
            if (!string.IsNullOrEmpty(QRFID))
            {
                model.QRFID = QRFID;
                GetStatus   = proposalLibrary.GetProposalPriceBreakupByQRFId(_configuration, token, ref model, QRFID);
            }

            ProposalGetReq request  = new ProposalGetReq();
            ProposalGetRes response = new ProposalGetRes();
            request.QRFID = QRFID;
            response      = coProviders.GetProposal(request, token).Result;
            if (response != null)
            {
                model.ProposalId = response.Proposal.ProposalId;
                model.ProposalPriceBreakupViewModel.PriceBreakUp = response.Proposal.PriceBreakup;
            }
            #endregion

            return(View("Proposal/Proposal", model));
        }
Esempio n. 20
0
        public IActionResult GetPaxRange(string QRFID)
        {
            NewQuoteViewModel model = new NewQuoteViewModel();

            try
            {
                bool GetStatus = false;
                SalesQuoteLibrary quoteLibrary = new SalesQuoteLibrary(_configuration);
                if (!string.IsNullOrEmpty(QRFID))
                {
                    model.QRFID = QRFID;
                    model.mdlQuoteDateRangeViewModel.QRFID = QRFID;
                    GetStatus = quoteLibrary.GetQRFPaxSlabDetails(_configuration, token, ref model);
                }
            }
            catch (Exception ex)
            {
                throw;
            }
            return(PartialView("_QuotePaxRange", model.mdlQuotePaxRangeViewModel));
        }
Esempio n. 21
0
        public NewQuoteViewModel GetMarginDetails(string QRFID, bool IsCostingMargin = false)
        {
            NewQuoteViewModel model = new NewQuoteViewModel();

            try
            {
                SalesProviders objSalesProvider = new SalesProviders(_configuration);
                model.mdlQuoteMarginViewModel = new QuoteMarginViewModel();
                MarginGetRes marginGetRes = objSalesProvider.GetQRFMarginDetailsByQRFID(new MarginGetReq {
                    QRFID = QRFID, IsCostingMargin = IsCostingMargin
                }, token).Result;

                SalesMarginMapping salesMarginMapping = new SalesMarginMapping();
                model.mdlQuoteMarginViewModel = salesMarginMapping.QRFMarginGet(marginGetRes);
                model.QRFID = QRFID;
            }
            catch (Exception ex)
            {
                throw;
            }
            return(model);
        }
Esempio n. 22
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 }));
     }
 }
        public IActionResult Accomodation()
        {
            string QRFID = Request.Query["QRFId"].ToString();
            AccomodationAmendmentVM model = new AccomodationAmendmentVM();

            model.MenuViewModel.QRFID    = QRFID;
            model.MenuViewModel.MenuName = "Accomodation";

            #region Get Costing Officer Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel {
                QRFID = QRFID
            };
            model.COHeaderViewModel = coCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            //model.MenuViewModel.EnquiryPipeline = modelQuote.mdlMenuViewModel.EnquiryPipeline;
            #endregion

            ProductProviders      productProviders = new ProductProviders(_configuration);
            ProductSRPHotelGetRes response         = productProviders.GetProductSRPHotelDetails(new ProductSRPHotelGetReq()
            {
                QRFID = QRFID
            }, token).Result;
            model.ProductSRPRouteInfo = response.ProductSRPRouteInfo;
            return(View(model));
        }
Esempio n. 24
0
 public IActionResult NewQuote(NewQuoteViewModel model)
 {
     return(View(model));
 }
Esempio n. 25
0
        public IActionResult ViewHotelsByBooking()
        {
            HotelsViewBookingViewModel model = new HotelsViewBookingViewModel();

            try
            {
                string BookingNo = Request.Query["BookingNo"].ToString();

                #region Get Hotel Booking details by booking number
                HotelsByBookingGetRes response = hotelsProviders.GetProductHotelDetails(new ProductSRPHotelGetReq()
                {
                    QRFID = BookingNo
                }, token).Result;
                model.Bookings = response.Bookings;

                model.Bookings.Positions.ForEach(b =>
                {
                    //b.AlternateServices = b.AlternateServices.OrderBy(a => a.Product_Name).ToList();
                    b.BookingRoomsAndPrices = b.BookingRoomsAndPrices.Where(a => a.Req_Count > 0).OrderBy(a =>
                                                                                                          a.RoomName.Contains("SINGLE") ? "A" : a.RoomName.Contains("DOUBLE") ? "B" :
                                                                                                          a.RoomName.Contains("TWIN") ? "C" : a.RoomName.Contains("TRIPLE") ? "D" :
                                                                                                          a.RoomName.Contains("QUAD") ? "E" : a.RoomName.Contains("TSU") ? "F" :
                                                                                                          a.PersonType.ToLower().Contains("child + bed") ? "G" : a.PersonType.ToLower().Contains("child - bed") ? "H" :
                                                                                                          a.RoomName.ToLower().Contains("infant") ? "I" : "J").ThenBy(a => a.RoomName).ThenBy(a => a.PersonType).ThenBy(a => a.Req_Count).ToList();
                });

                //Sorting by availablity status with order available, waitlist, pending, unavailable and twin room rate ascending
                model.Bookings.Positions.ForEach(b =>
                {
                    if (b.AlternateServices != null && b.AlternateServices.Count > 0)
                    {
                        b.AlternateServices.ForEach(c => c.Availability_Status = (c.Availability_Status == null ? "" : c.Availability_Status));

                        b.AlternateServices = b.AlternateServices.OrderBy(a =>
                                                                          a.Availability_Status.ToUpper() == "AVAILABLE" ? "A" : a.Availability_Status.ToUpper() == "WAITLIST" ? "D" :
                                                                          a.Availability_Status.ToUpper() == "PENDING" ? "F" : a.Availability_Status.ToUpper() == "UNAVAILABLE" ? "I" : "M")
                                              .ThenBy(a => a.Availability_Status).ThenBy(a => a.PPTwin_Rate).ToList();
                    }
                    else
                    {
                        b.AlternateServices = new List <AlternateServices>();
                    }
                });

                List <BookingProductsSRPInfo> list = new List <BookingProductsSRPInfo>();
                model.SRPViewModelList.AddRange(response.Bookings.Positions.Select(a => new BookingProductsSRPInfo
                {
                    PositionId           = a.Position_Id,
                    ProductsSRPViewModel = new ProductsSRPViewModel
                    {
                        PageName          = "hotel",
                        ProductSRPDetails = response.ProductSRPDetails.Where(b => b.VoyagerProduct_Id == a.Product_Id).ToList()
                    }
                }).ToList());

                #endregion

                #region Get Costing Officer Tour Info Header By QRFId
                NewQuoteViewModel modelQuote = new NewQuoteViewModel {
                    QRFID = response.Bookings.QRFID
                };
                model.COHeaderViewModel = coCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
                model.COHeaderViewModel.BookingNumber = BookingNo;
                #endregion

                #region Status dropdownlist binding

                var name = new List <string>();
                var attr = new List <Attributes>();
                foreach (var p in model.Bookings.Positions)
                {
                    var altservices = model.Bookings.Positions.Where(a => a.Position_Id == p.Position_Id).FirstOrDefault().AlternateServices.Select(x => new Attributes {
                        Attribute_Id = p.Position_Id, AttributeName = x.Availability_Status
                    }).Distinct().ToList();
                    name = altservices.Select(x => x.AttributeName).Distinct().ToList();
                    foreach (var alt in name)
                    {
                        attr.Add(new Attributes {
                            AttributeName = alt, Attribute_Id = p.Position_Id
                        });
                    }
                }
                attr.RemoveAll(x => string.IsNullOrWhiteSpace(x.AttributeName));
                model.Status = attr.OrderBy(x => x.AttributeName == "AVAILABLE" ? "A" : x.AttributeName == "WAITLIST" ? "D" :
                                            x.AttributeName == "PENDING" ? "F" : x.AttributeName == "UNAVAILABLE" ? "I" : "M").ToList();

                #endregion

                if (string.IsNullOrEmpty(model.COHeaderViewModel.QRFID))
                {
                    model.COHeaderViewModel.TourName       = model.Bookings.BookingNumber + " : " + model.Bookings.CustRef;
                    model.COHeaderViewModel.NoOfNights     = Convert.ToInt16(model.Bookings.Duration);
                    model.COHeaderViewModel.NoOfDays       = model.COHeaderViewModel.NoOfNights + 1;
                    model.COHeaderViewModel.TravelDate     = model.Bookings.STARTDATE;
                    model.COHeaderViewModel.SalesPerson    = model.Bookings.StaffDetails.Staff_SalesUser_Name;
                    model.COHeaderViewModel.CostingOfficer = model.Bookings.StaffDetails.Staff_SalesUser_Name;
                    model.COHeaderViewModel.Pax            = model.Bookings.BookingPax.Where(a => a.PERSTYPE == "ADULT").Select(b => b.PERSONS).FirstOrDefault();
                }
                else
                {
                    model.COHeaderViewModel.TourName = model.Bookings.BookingNumber + " : " + model.COHeaderViewModel.TourName;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            #region replacing image urls from resources to ImageResources
            foreach (var SRPViewModel in model.SRPViewModelList)
            {
                if (SRPViewModel.ProductsSRPViewModel != null)
                {
                    foreach (var ProductSRP in SRPViewModel.ProductsSRPViewModel.ProductSRPDetails)
                    {
                        if (ProductSRP.HotelImageURL != null)
                        {
                            ProductSRP.HotelImageURL = ProductSRP.HotelImageURL.Replace("resources/", "ImageResources/");
                        }
                    }
                }
            }
            #endregion
            return(View(model));
        }
Esempio n. 26
0
        public IActionResult GetRouting(string QRFId)
        {
            NewQuoteViewModel model = GetRoutingDetails(QRFId);

            return(PartialView("_QuoteRouting", model.mdlQuoteRoutingViewModel));
        }
Esempio n. 27
0
        public IActionResult GetItineraryData(string QRFID, string filterByDay = null, string filterByServiceType = null, string PageName = "QRFSummary")
        {
            try
            {
                QRFSummaryViewModel model = new QRFSummaryViewModel();
                model.PageName = PageName;

                #region Get Quote Info By QRFId
                NewQuoteViewModel modelQuote = new NewQuoteViewModel();
                modelQuote.QRFID = QRFID;
                SalesQuoteLibrary quoteLibrary = new SalesQuoteLibrary(_configuration);
                bool GetStatus = false;
                GetStatus = quoteLibrary.GetQRFAgentByQRFId(_configuration, token, ref modelQuote);
                if (GetStatus)
                {
                    model.TourInfoHeaderViewModel = modelQuote.TourInfoHeaderViewModel;
                }
                #endregion

                #region Get Itinerary Details by QRFId
                itineraryGetReq       = new ItineraryGetReq();
                itineraryGetReq.QRFID = QRFID;
                itineraryGetRes       = coProviders.GetItinerary(itineraryGetReq, token).Result;
                model.Itinerary       = itineraryGetRes.Itinerary;
                #endregion

                #region Filter Dropdown Bindings
                model.DayList         = GetDays(model.Itinerary.ItineraryDays);
                model.ServiceTypeList = GetProductTypes(model.Itinerary.ItineraryDays);
                #endregion

                if (filterByDay == "Day")
                {
                    filterByDay = null;
                }

                if (filterByServiceType == "Service Type")
                {
                    filterByServiceType = null;
                }

                if (!string.IsNullOrEmpty(filterByDay))
                {
                    model.Itinerary.ItineraryDays = model.Itinerary.ItineraryDays.Where(x => x.Day == filterByDay).ToList();
                }

                if (!string.IsNullOrEmpty(filterByServiceType))
                {
                    for (int i = 0; i < model.Itinerary.ItineraryDays.Count; i++)
                    {
                        model.Itinerary.ItineraryDays[i].ItineraryDescription = model.Itinerary.ItineraryDays[i].ItineraryDescription.Where(x => x.ProductType == filterByServiceType).ToList();
                    }
                }
                model.Days     = filterByDay;
                model.Services = filterByServiceType;
                return(PartialView("_QRFSummary", model));
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Esempio n. 28
0
        public IActionResult GetItinerary(string QRFID, string filterByDay = null, string filterByServiceType = null, long filterByDeparture = 0, long filterByPaxSlab = 0)
        {
            try
            {
                ItineraryViewModel model = new ItineraryViewModel();

                #region Get Quote Info By QRFId
                NewQuoteViewModel modelQuote = new NewQuoteViewModel();
                modelQuote.QRFID = QRFID;
                SalesQuoteLibrary quoteLibrary = new SalesQuoteLibrary(_configuration);
                bool GetStatus = false;
                GetStatus = quoteLibrary.GetQRFAgentByQRFId(_configuration, token, ref modelQuote);
                if (GetStatus)
                {
                    model.TourInfoHeaderViewModel       = modelQuote.TourInfoHeaderViewModel;
                    model.MenuViewModel.EnquiryPipeline = modelQuote.mdlMenuViewModel.EnquiryPipeline;
                }
                #endregion

                #region Get Itinerary Details by QRFId
                itineraryGetReq          = new ItineraryGetReq();
                itineraryGetReq.QRFID    = QRFID;
                itineraryGetReq.editUser = ckUserEmailId;
                itineraryGetRes          = coProviders.GetItineraryDetails(itineraryGetReq, token).Result;
                model.Itinerary          = itineraryGetRes.Itinerary;
                #endregion

                #region Get Costsheet by QRFId
                NewQuoteViewModel modelQuote1 = new NewQuoteViewModel();
                bool GetStatus1 = false;
                SalesQuoteLibrary quoteLibrary1 = new SalesQuoteLibrary(_configuration);
                if (!string.IsNullOrEmpty(QRFID))
                {
                    modelQuote1.QRFID = QRFID;
                    GetStatus1        = quoteLibrary1.GetQRFPaxSlabDetails(_configuration, token, ref modelQuote1);
                }
                SalesProviders          objSalesProvider     = new SalesProviders(_configuration);
                DepartureDateGetRequest objDepartureDatesReq = new DepartureDateGetRequest()
                {
                    QRFID = QRFID, date = (DateTime?)null
                };
                DepartureDateGetResponse objDepartureDatesRes = objSalesProvider.GetDepartureDatesForQRFId(objDepartureDatesReq, token).Result;
                model.PaxSlabList = (modelQuote1.mdlQuotePaxRangeViewModel.QuotePaxSlabDetails).Select(a => new AttributeValues {
                    AttributeValue_Id = a.PaxSlabId.ToString(), Value = a.PaxSlabFrom + "-" + a.PaxSlabTo
                }).ToList();
                model.DepartureDatesList = (objDepartureDatesRes.DepartureDates).Select(a => new AttributeValues {
                    AttributeValue_Id = a.Departure_Id.ToString(), Value = Convert.ToDateTime(a.Date).ToString("dd MMM yy")
                }).ToList();
                long            defaultPaxSlabId = Convert.ToInt32(model.PaxSlabList[0].AttributeValue_Id);
                CostsheetGetReq request          = new CostsheetGetReq();
                CostsheetGetRes response         = new CostsheetGetRes();
                request.QRFID       = QRFID;
                request.DepartureId = filterByDeparture == 0 ? objDepartureDatesRes.DepartureDates[0].Departure_Id : filterByDeparture;
                request.PaxSlabId   = filterByPaxSlab == 0 ? defaultPaxSlabId : filterByPaxSlab;
                response            = coProviders.GetCostsheet(request, token).Result;
                #endregion

                #region Price Per Person Binding
                List <ItineraryDaysInfo>    lstDays      = itineraryGetRes.Itinerary.ItineraryDays.ToList();
                List <QRFPkgAndNonPkgPrice> lstPositions = new List <QRFPkgAndNonPkgPrice>();

                foreach (var a in lstDays)
                {
                    List <ItineraryDescriptionInfo> lstdes = a.ItineraryDescription.Where(x => x.KeepAs.ToUpper() != "INCLUDED").ToList();
                    foreach (var k in response.QrfNonPackagePrice.Where(y => y.RoomName.ToUpper() == "ADULT"))
                    {
                        foreach (var l in lstdes)
                        {
                            if (l.PositionId == k.PositionId)
                            {
                                lstPositions.Add(new QRFPkgAndNonPkgPrice {
                                    QRFCurrency = string.IsNullOrEmpty(k.QRFCurrency) ? "" : k.QRFCurrency.Substring(0, 3).ToUpper(), SellPrice = k.SellPrice, PositionId = k.PositionId, PositionKeepAs = k.PositionKeepAs, PaxSlabId = k.PaxSlab_Id, ProductName = k.ProductName, RoomName = k.RoomName
                                });
                            }
                        }
                    }
                }

                model.ListNonQrfPkgPositions = lstPositions;
                #endregion

                #region Filter Dropdown Bindings
                model.DayList         = GetDays(itineraryGetRes.Itinerary.ItineraryDays);
                model.ServiceTypeList = GetProductTypes(model.Itinerary.ItineraryDays);
                #endregion

                #region Date Binding
                if (filterByDay == "Day")
                {
                    filterByDay = null;
                }

                if (filterByServiceType == "Service Type")
                {
                    filterByServiceType = null;
                }

                if (!string.IsNullOrEmpty(filterByDay))
                {
                    model.Itinerary.ItineraryDays = model.Itinerary.ItineraryDays.Where(x => x.Day == filterByDay).ToList();
                }

                if (!string.IsNullOrEmpty(filterByServiceType))
                {
                    for (int i = 0; i < model.Itinerary.ItineraryDays.Count; i++)
                    {
                        model.Itinerary.ItineraryDays[i].ItineraryDescription = model.Itinerary.ItineraryDays[i].ItineraryDescription.Where(x => x.ProductType == filterByServiceType).ToList();
                    }
                }
                model.Days          = filterByDay;
                model.Services      = filterByServiceType;
                model.DepartureDate = filterByDeparture;
                model.PaxSlab       = filterByPaxSlab;
                #endregion

                return(PartialView("_Itinerary", model));
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Esempio n. 29
0
        public IActionResult Others()
        {
            OthersViewModel model = new OthersViewModel();

            try
            {
                string ReturnView  = "";
                string QRFID       = Request.Query["QRFId"].ToString();
                string SaveType    = Request.Query["SaveType"].ToString();
                string PositionId  = Request.Query["PositionId"];
                string ProductType = Request.Query["ProductType"];
                bool   IsClone     = Convert.ToBoolean(Request.Query["IsClone"]);
                model.OthersLocalGuide.QRFID   = QRFID;
                model.MenuViewModel.QRFID      = QRFID;
                model.MenuViewModel.PositionId = PositionId;
                if (ProductType.ToLower() == "guide")
                {
                    model.MenuViewModel.MenuName = "LocalGuide";
                }
                PositionGetReq positionGetReq = new PositionGetReq {
                    QRFID = QRFID, IsClone = IsClone
                };
                if (!string.IsNullOrEmpty(PositionId) && PositionId.Substring(0, 8) != "00000000")
                {
                    positionGetReq.PositionId = PositionId;
                }
                else
                {
                    if (string.IsNullOrEmpty(ProductType) || ProductType.ToLower() == "guide")
                    {
                        positionGetReq.ProductType.Add(new ProductType {
                            ProdType = "Guide"
                        });
                        positionGetReq.ProductType.Add(new ProductType {
                            ProdType = "Assistant"
                        });
                    }
                    else if (!string.IsNullOrWhiteSpace(ProductType) && (ProductType.ToLower() == "other" || ProductType.ToLower() == "fee"))
                    {
                        positionGetReq.ProductType.Add(new ProductType {
                            ProdType = "Other"
                        });
                        positionGetReq.ProductType.Add(new ProductType {
                            ProdType = "Fee"
                        });
                    }
                    else
                    {
                        positionGetReq.ProductType.Add(new ProductType {
                            ProdType = ProductType
                        });
                    }
                }

                PositionGetRes positionGetRes = positionProviders.GetPosition(positionGetReq, token).Result;

                SalesQuoteLibrary quoteLibrary = new SalesQuoteLibrary(_configuration);
                NewQuoteViewModel modelQuote   = new NewQuoteViewModel {
                    QRFID = model.MenuViewModel.QRFID
                };
                bool GetStatus = quoteLibrary.GetQRFAgentByQRFId(_configuration, token, ref modelQuote);
                if (GetStatus)
                {
                    model.TourInfoHeaderViewModel = modelQuote.TourInfoHeaderViewModel;
                }

                positionMapping.OthersLocalGuideGet(positionGetRes, ref model, token);

                switch (string.IsNullOrEmpty(ProductType) ? "" : ProductType.ToLower())
                {
                case "guide": ReturnView = "_OthersLocalGuide"; break;

                case "visa": ReturnView = "_OthersVisa"; break;

                case "insurance": ReturnView = "_OthersInsurance"; break;

                case "other": ReturnView = "_OthersMiscellaneous"; break;

                default: ReturnView = "_OthersLocalGuide"; break;
                }

                if (string.IsNullOrEmpty(PositionId) || PositionId.Substring(0, 8) == "00000000")
                {
                    if (!string.IsNullOrEmpty(SaveType) && SaveType.ToLower() == "full")
                    {
                        model.OthersLocalGuide.SaveType = "success";
                        return(PartialView(ReturnView, model.OthersLocalGuide));
                    }
                    else
                    {
                        return(View(model));
                    }
                }
                else
                {
                    return(PartialView(ReturnView, model.OthersLocalGuide));
                }
            }
            catch (Exception ex)
            {
                return(View(model));
            }
        }
Esempio n. 30
0
        public IActionResult GetUsersByRole(string SalesPerson, string CostingOfficer, string ProdAccountant, string FileHandler, string QRFID, string ModuleName, string BookingNumber)
        {
            try
            {
                UserDetailsViewModel model    = new UserDetailsViewModel();
                UserByRoleGetRes     response = new UserByRoleGetRes();
                UserByRoleGetReq     request  = new UserByRoleGetReq();
                request.RoleName = new List <string>()
                {
                    "Sales Officer", "Costing Officer", "Product Accountant", "Groups", "Operations_Management"
                };

                response = loginProviders.GetUsersByRole(request, token).Result;

                model.SalesOfficerList      = response.Users.Where(a => a.UserRole == "Sales Officer").ToList();
                model.CostingOfficerList    = response.Users.Where(a => a.UserRole == "Costing Officer").ToList();
                model.ProductAccountantList = response.Users.Where(a => a.UserRole == "Product Accountant").ToList();
                //model.FileHandlerList = response.Users.Where(a => a.UserRole == "Groups" || a.UserRole == "Operations_Management").Distinct().ToList();
                //model.FileHandlerList.ForEach(a => { a.UserRole = ""; a.UserRoleId = ""; });
                //model.FileHandlerList = model.FileHandlerList.Distinct().ToList();

                var FileHandlerList = response.Users.Where(a => a.UserRole == "Groups" || a.UserRole == "Operations_Management").Select(a => a.Email).Distinct().ToList();
                FileHandlerList.ForEach(a => model.FileHandlerList.Add(new UserDetails()
                {
                    Email = a
                }));

                model.SalesOfficer      = SalesPerson;
                model.CostingOfficer    = CostingOfficer;
                model.ProductAccountant = ProdAccountant;
                model.FileHandler       = FileHandler;

                CompanyOfficerGetRes officerGetRes = new CompanyOfficerGetRes();
                CompanyOfficerGetReq officerGetReq = new CompanyOfficerGetReq();
                if (ModuleName == "ops")
                {
                    ProductSRPHotelGetReq BookingReq = new ProductSRPHotelGetReq()
                    {
                        QRFID = BookingNumber
                    };
                    OpsBookingSummaryGetRes BookingRes = operationsProviders.GetOpsBookingSummary(BookingReq, token).Result;
                    if (BookingRes != null)
                    {
                        model.ContactPersonID   = BookingRes.OpsBookingSummaryDetails.ContactId;
                        model.EmailAddress      = BookingRes.OpsBookingSummaryDetails.ContactEmail;
                        model.MobileNo          = BookingRes.OpsBookingSummaryDetails.ContactTel;
                        officerGetReq.CompanyId = BookingRes.OpsBookingSummaryDetails.AgentId;
                    }
                }
                else
                {
                    NewQuoteViewModel quoteModel = new NewQuoteViewModel();
                    quoteModel.QRFID = QRFID;
                    cOCommonLibrary.GetCOTourInfoHeader(ref quoteModel, token);
                    model.ContactPersonID   = quoteModel.COHeaderViewModel.ContactPersonID;
                    model.EmailAddress      = quoteModel.COHeaderViewModel.EmailAddress;
                    model.MobileNo          = quoteModel.COHeaderViewModel.MobileNo;
                    officerGetReq.CompanyId = quoteModel.COHeaderViewModel.AgentID;
                }

                officerGetReq.UserRole  = "";
                officerGetRes           = agentProviders.GetCompanyContacts(officerGetReq, token).Result;
                model.ContactPersonList = officerGetRes.ContactDetails;
                model.ContactPersonList.ForEach(a => a.FIRSTNAME = a.CommonTitle + " " + a.FIRSTNAME + " " + a.LastNAME);

                return(PartialView("_ChangeUserForQuote", model));
            }
            catch (Exception ex)
            {
                return(View());
            }
        }