public ActionResult EventDetails(string id, DateTime date) { BTourGuideOp tourOp = new BTourGuideOp(); AEvent tourEvent = tourOp.GetEvent(id, date); ATour tour = tourOp.GetTourByID(id); EventDetails ed = new EventDetails(); ed.eventInfo = tourEvent; ed.tourInfo = tour; return View(ed); }
public FileContentResult GetImage(string tourid) { BTourGuideOp tourOp = new BTourGuideOp(); ATour tour = tourOp.GetTourByID(tourid); if (tour != null && tour.ImageData!=null) { return File(tour.ImageData, tour.ImageMimeType); } else { return null; } }
public ActionResult AddEvent(string id) { BTourGuideOp tourOp = new BTourGuideOp(); ATour tour = tourOp.GetTourByID(id); AEvent tourEvent = new AEvent(); tourEvent.TourName = tour.TourName; tourEvent.TourDate = DateTime.Now; tourEvent.TourOriginalDate = DateTime.Now; tourEvent.TourGuide = ""; tourEvent.TourID = tour.TourID; tourEvent.IsOn = false; EventDetails eventDetails = new EventDetails(); eventDetails.tourInfo = tour; eventDetails.eventInfo = tourEvent; return View(eventDetails); }
public ActionResult TourDescription(string id, string keyword) { ViewBag.keyword = keyword; ViewBag.id = id; BTourGuideOp tourOp = new BTourGuideOp(); ATour tour = tourOp.GetTourByID(id); return View(tour); }