示例#1
0
        public ActionResult TourPackageDetails(long id)
        {
            dbTour.RaiseHitCount(id);
            dalMstTourPackageActivity  dbAct = new dalMstTourPackageActivity();
            dalTourPackageMap          dbMap = new dalTourPackageMap();
            MstPackageGeneralViewModel obj   = new MstPackageGeneralViewModel();

            obj.MstTourPhotoList    = dbPhoto.MstTourPackagePhotoList(id);
            obj.MstTourActivityList = dbAct.MstTourPackageActivityList(id);
            obj.MstTourPackage      = dbTour.MstTourPackageView(id);
            obj.MstTourMap          = dbMap.GetTourMapByID(id);
            return(View("TourPackageDetails", obj));
        }
示例#2
0
        private string MakeMailBody(long id)
        {
            StringBuilder      mailbody = new StringBuilder();
            dalMstTourPackage  dbTour   = new dalMstTourPackage();
            MstTourPackageView pack     = new MstTourPackageView();

            pack = dbTour.MstTourPackageView(id);
            dalMstTourPackageActivity dbActivity         = new dalMstTourPackageActivity();
            IEnumerable <MstTourPackageActivityView> act = new List <MstTourPackageActivityView>();

            act = dbActivity.MstTourPackageActivityList(id);
            mailbody.Append("<h4>Package Details</h4>");
            mailbody.Append("Package Name: " + pack.PackageName + "<br/>Duration: " + pack.TotalDays + " Days / " + (pack.TotalDays - 1) + " Nights<br/>");
            mailbody.Append("Package Routing: " + pack.PackageRouting + "<br/>Package Description: " + pack.PackageRemarks);
            mailbody.Append("<h4>Tour Package Activities</h4>");
            mailbody.Append("<table style='width:700px;' border= '1'>");
            mailbody.Append("<tr>");
            mailbody.Append("<th style='border: 1px solid black'>Day List</th>");
            mailbody.Append("<th style='border: 1px solid black'>Activity</th>");
            mailbody.Append("<th style='border: 1px solid black'>Overnight Destination</th>");
            mailbody.Append("</tr>");
            foreach (var item in act)
            {
                mailbody.Append("<tr>");
                mailbody.Append("<td style='text-align:center;'>Day " + item.DayNo + "</td>");
                mailbody.Append("<td style='text-align:center;'>" + item.ActivityTitle + "</td>");
                mailbody.Append("<td style='text-align:center;'>" + item.DestinationName + "</td>");
                mailbody.Append("</tr>");
            }
            mailbody.Append("</table>");
            return(mailbody.ToString());
        }
示例#3
0
        public ActionResult Export(long id, long packid)
        {
            dalMstTourPackageActivity dbAct  = new dalMstTourPackageActivity();
            dalMstTourPackage         dbTour = new dalMstTourPackage();
            dalTourPackageBooking     dbBook = new dalTourPackageBooking();
            MstBookingExportModel     obj    = new MstBookingExportModel();

            obj.MstTourActivityList      = dbAct.MstTourPackageActivityList(packid);
            obj.MstTourPackages          = dbTour.MstTourPackageView(packid);
            obj.MstTourBooking           = dbBook.GetBookingByID(id);
            ViewBag.WordDocumentFilename = obj.MstTourPackages.PackageName;
            return(View("Export", obj));
        }
示例#4
0
        public ActionResult TourPackageFullDetails(long id)
        {
            MstTourPackageFullDetailsViewModel obj = new MstTourPackageFullDetailsViewModel();
            int TotalRow;
            int PageNo = 1, PageSize = 10;

            obj.MstTourPackages     = dbTour.MstTourPackageView(id);
            obj.MstTourActivityList = dbActivity.MstTourPackageActivityList(id);
            obj.MstTourPhotoList    = dbPhoto.GetTourPackagePhotoPaged(PageNo, PageSize, out TotalRow, id);
            obj.PagingInfo          = new PagingInfo {
                CurrentPage = PageNo, ItemsPerPage = PageSize, TotalItems = TotalRow
            };
            if (obj.MstTourActivityList.Count() == 0 || obj.MstTourPhotoList.Count() == 0 || obj.MstTourPackages == null)
            {
                TempData["ErrMsg"] = 8;
                return(RedirectToAction("List"));
            }
            return(View("TourFullDetails", obj));
        }