예제 #1
0
        public ActionResult Whale_Watching_Excursion()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Whale_Watching_Excursion";
            return(View(objModel));
        }
예제 #2
0
        public ActionResult Into_The_Hills()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Into_The_Hills";
            return(View(objModel));
        }
예제 #3
0
        public ActionResult South_Coast_Adventure()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "South_Coast_Adventure";
            return(View(objModel));
        }
예제 #4
0
        public ActionResult Island_Highlights()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Island_Highlights";
            return(View(objModel));
        }
예제 #5
0
        public ActionResult Heritage_Sri_Lanka()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Heritage_Sri_Lanka";
            return(View(objModel));
        }
예제 #6
0
        public ActionResult Colombo_Loving()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Colombo_Loving";
            return(View(objModel));
        }
예제 #7
0
        public ActionResult Exotic_Sri_Lanka()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Exotic_Sri_Lanka";
            return(View(objModel));
        }
예제 #8
0
        public ActionResult Maldives_Tours()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Maldives_Tours";
            return(View(objModel));
        }
예제 #9
0
        public ActionResult Island_Paradise()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Island_Paradise";
            return(View(objModel));
        }
예제 #10
0
        public ActionResult Central_Highlands()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Central_Highlands";
            return(View(objModel));
        }
예제 #11
0
        public ActionResult Hill_Country_Comfort()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Hill_Country_Comfort";
            return(View(objModel));
        }
예제 #12
0
        public ActionResult Island_Quick_Fix()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Island_Quick_Fix";
            return(View(objModel));
        }
예제 #13
0
        public ActionResult Yala_Day_Excursion()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Yala_Day_Excursion";
            return(View(objModel));
        }
예제 #14
0
        public ActionResult Fly_Swim_Shop()
        {
            InquiryModel objModel = new InquiryModel();

            objModel.TourName = "Fly_Swim_Shop";
            return(View(objModel));
        }
예제 #15
0
        public ActionResult addNewInquiry(String noticeId, String Question)  //  ask a question about tender
        {
            InquiryModel inq = new InquiryModel
            {
                NoticeId = int.Parse(noticeId),
                Question = Question,
                User     = (String)Session["username"],
                Answered = false
            };

            DBContext.GetInstance().createInquiry(inq);       //  create DB
            return(Json(null, JsonRequestBehavior.AllowGet)); //  allow ajax
        }
예제 #16
0
        // GET: Inquiry
        public async Task <ActionResult> Ask()
        {
            var Q = await GetRandom();

            if (Q == null)
            {
                Session["SuggestionState"] = SuggestionState.QuestionAnswered;
                return(RedirectToAction("One", "Proposition"));
            }
            else
            {
                InquiryModel I = new InquiryModel
                {
                    QuestionId  = Q.Id,
                    Text        = Q.Text,
                    Description = Q.Description,
                    Type        = Q.Type
                };
                return(View(I));
            }
        }
예제 #17
0
        public ActionResult SendInquiry(InquiryModel objModel)
        {
            try
            {
                IPGConfig ipg = _context.IPGConfigs.Where(w => w.ConventionCode == "JWCON").FirstOrDefault();

                EmailModel em = new EmailModel();
                em.FullName    = objModel.FullName;
                em.EmailTo     = ipg.EmailTo;
                em.ClientEmail = objModel.Email;
                em.ContactNo   = objModel.ContactNo;
                em.Message     = objModel.Message;
                em.TourName    = objModel.TourName.Replace("_", " ");
                em.EmailCC     = ipg.EmailCC;
                em.EmailBCC    = ipg.EmailBCC;

                em.SendInquiry(em, "Inquiry");

                EmailModel clientCopy = new EmailModel();
                clientCopy.FullName    = objModel.FullName;
                em.EmailTo             = objModel.Email;
                clientCopy.ClientEmail = objModel.Email;
                clientCopy.ContactNo   = objModel.ContactNo;
                clientCopy.Message     = objModel.Message;
                clientCopy.TourName    = objModel.TourName.Replace("_", " ");
                clientCopy.EmailCC     = ipg.EmailCC;
                clientCopy.EmailBCC    = ipg.EmailBCC;
                clientCopy.EmailTo     = objModel.Email;

                clientCopy.SendInquiry(clientCopy, "InquiryCustomer");

                return(RedirectToAction("TourSummary", "Tours"));
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
예제 #18
0
        public async Task <ActionResult> Ask(/*[Bind(Include = "QuestionId,SuggestionId")]*/ InquiryModel inquiry)
        {
            if (User.Identity.IsAuthenticated)
            {
                if (ModelState.IsValid)
                {
                    DB.UserQuestions.Add(new UserQuestion()
                    {
                        QuestionId = inquiry.QuestionId,
                        UserId     = (await GetUser()).Id,
                        Response   = inquiry.Answer
                    }
                                         );
                    DB.SaveChanges();

                    Session["SuggestionState"] = SuggestionState.QuestionAnswered;
                    return(RedirectToAction("One", "Proposition"));
                }
            }

            return(RedirectToAction("Index", "Home"));
        }