Exemplo n.º 1
0
        // GET: FlightTravelClasses/Delete/5
        public ActionResult DeleteClass(int id)
        {
            FlightTravelClass flightTravelClass = FlightBL.GetDetailsClass(id);

            ViewBag.ClassId = new SelectList(FlightBL.GetTravelClass(), "ClassId", "ClassName");
            FlightTravelClassModel delete = AutoMapper.Mapper.Map <FlightTravelClass, FlightTravelClassModel>(flightTravelClass);     //Auto Mapper entity to model

            return(View(delete));
        }
Exemplo n.º 2
0
        // GET: FlightTravelClasses/Edit/5
        public ActionResult EditClass(int id)
        {
            FlightTravelClass         flightTravelClass = FlightBL.GetDetailsClass(id);
            IEnumerable <TravelClass> travelClass       = FlightBL.GetTravelClass();

            ViewBag.ClassId = new SelectList(travelClass, "ClassId", "ClassName");
            FlightTravelClassModel flightTravelClassModel = AutoMapper.Mapper.Map <FlightTravelClass, FlightTravelClassModel>(flightTravelClass);       //Auto Mapper entity to model

            return(View(flightTravelClassModel));
        }