Beispiel #1
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);
        }