public ActionResult CalculateCost() { string id = Request["leaderList"]; int days = Convert.ToInt32(Request["day"]); TourLeadDTO t = TourLeadDAO.getTourLead(id); if (t != null && t.Type == "P") { TourLeadDTO p = TourLeadDAO.getPartTimeLeader(); int cost = p.CalculateCost(days); ViewBag.Type = "Part"; ViewBag.Leader = p; ViewBag.Cost = cost; ViewBag.day = days; ViewBag.flag = true; } else if (t != null && t.Type == "F") { TourLeadDTO f = TourLeadDAO.GetFullTimeLeader(); int cost = f.CalculateCost(days); ViewBag.Type = "Full"; ViewBag.Leader = f; ViewBag.Cost = cost; ViewBag.day = days; ViewBag.flag = true; } else if (t == null) { ViewBag.flag = false; ViewBag.Message = "Please Enter a Valid TourLeader Id."; } return(View()); }
public ActionResult GetTour() { string Id = Request["TourList"]; TourDTO t = TourDAO.getTour(Id); ViewBag.Tour = t; List <TourLeadDTO> LeadList = TourLeadDAO.getTourLeadList(t); ViewBag.Leads = LeadList; return(View()); }