Exemplo n.º 1
0
        public ActionResult Reply(long id, long packid)
        {
            MstBookingReplyModel obj = new MstBookingReplyModel();

            obj.MstTourBook = dbBook.GetBookingByID(id);
            dalMstTourPackage          dbPack = new dalMstTourPackage();
            MstTourPackageDetailsModel pack   = new MstTourPackageDetailsModel();

            pack = dbPack.GetTourPackageDetailsByID(packid);
            ViewBag.PackageName = pack.PackageName;
            return(View(obj));
        }
Exemplo n.º 2
0
        public ActionResult Reply(MstBookingReplyModel paramdata)
        {
            System.Configuration.Configuration config   = WebConfigurationManager.OpenWebConfiguration(System.Web.HttpContext.Current.Request.ApplicationPath);
            MailSettingsSectionGroup           settings = (MailSettingsSectionGroup)config.GetSectionGroup("system.net/mailSettings");

            System.Net.NetworkCredential credential = new System.Net.NetworkCredential(settings.Smtp.Network.UserName, settings.Smtp.Network.Password);
            //Create the SMTP Client
            SmtpClient client = new SmtpClient();

            client.Host        = settings.Smtp.Network.Host;
            client.Credentials = credential;
            client.Timeout     = 300000;
            client.EnableSsl   = false;

            if (ModelState.IsValid)
            {
                MailMessage mail = new MailMessage();
                mail.From = new MailAddress(settings.Smtp.Network.UserName, "Brothers Tours & Travel");
                mail.To.Add(paramdata.MstTourBook.ClientEmailID);
                mail.Priority = MailPriority.High;
                mail.Subject  = paramdata.MstMail.Subject;
                mail.Body     = paramdata.MstMail.MessageBody;
                mail.ReplyToList.Add("*****@*****.**");
                try
                {
                    client.Send(mail);
                    paramdata.MstTourBook.Status = "Replied";
                    dbBook.Save(paramdata.MstTourBook);
                    TempData["ErrMsg"] = 1;
                    return(RedirectToAction("list"));
                }
                catch (Exception ex)
                {
                    TempData["ErrMsg"] = 0;
                    return(RedirectToAction("list"));
                }
            }
            paramdata.MstTourBook = dbBook.GetBookingByID(paramdata.MstTourBook.BookingID);
            MstTourPackageDetailsModel pack   = new MstTourPackageDetailsModel();
            dalMstTourPackage          dbPack = new dalMstTourPackage();

            pack = dbPack.GetTourPackageDetailsByID(paramdata.MstTourBook.PackageID);
            ViewBag.PackageName = pack.PackageName;
            return(View(paramdata));
        }
Exemplo n.º 3
0
        public ActionResult ManageTourActivities(long id)
        {
            MstTourPackageActivityModel obj     = new MstTourPackageActivityModel();
            dalMstDestination           objDest = new dalMstDestination();
            dalMstActivity act = new dalMstActivity();

            obj.MstActDropDownList  = act.MstActivityList;
            obj.MstTourPackage      = dbTour.GetTourPackageDetailsByID(id);
            obj.MstDestDropDownList = objDest.MstDestinationList;
            Dictionary <int, string> li = new Dictionary <int, string>();

            for (short j = dbActivity.GetDayNo(id); j < obj.MstTourPackage.TotalDays; j++)
            {
                li.Add((j + 1), "Day " + (j + 1));
            }
            SelectList list = new SelectList(li, "Key", "Value");

            ViewBag.Days = list;
            return(View("ManageTourActivities", obj));
        }