Ejemplo n.º 1
0
        public ActionResult AssignLeader(int tid)
        {
            int tl_id;

            foreach (string key in Request.Form.AllKeys)
            {
                //Debug.WriteLine("Keys : : : " + key);
                //Debug.WriteLine("Value : : : " + Request[key]);
                var test = Request[key];
                if (key == "TourLeader" && Request[key] != "")
                {
                    tl_id = Convert.ToInt32(Request[key]);
                    DBTourLeader.AssignTourleader(tid, tl_id);
                }
            }

            Tour tourinfo = DBTour.GetTourDetailsById(tid);
            List <TourLeader> leader_list = new List <TourLeader>();

            leader_list = DBTourLeader.GetAvailableTourLeaders(tid, tourinfo.TourPackageId);

            ViewBag.tl_list = leader_list;
            ViewBag.tid     = tid;
            ViewBag.message = "Tour Leader successfully assigned!";

            return(View("Details", tourinfo));
            //return RedirectToAction("TourList");
        }
Ejemplo n.º 2
0
        // GET: Tour
        public ActionResult TourList()
        {
            List <Tour> tourlist = new List <Tour>();

            tourlist = DBTour.GetTourList();
            return(View(tourlist));
        }
Ejemplo n.º 3
0
        public ActionResult Details(int tid)
        {
            Tour tourinfo = DBTour.GetTourDetailsById(tid);
            List <TourLeader> leader_list = new List <TourLeader>();

            leader_list = DBTourLeader.GetAvailableTourLeaders(tid, tourinfo.TourPackageId);

            ViewBag.tl_list = leader_list;
            ViewBag.tid     = tid;

            return(View(tourinfo));
        }