110 likes | 207 Views
Team 07. Enterprise .NET 1 CA - presentation. SingAir AirLine Reservation System Introduction. enable online internet users for booking and cancellation of airtickets
E N D
Team 07 Enterprise .NET 1 CA - presentation
SingAirAirLine Reservation System Introduction • enable online internet users for booking and cancellation of airtickets • provide functionalities for SingAir staffs to perform maintenance such as flight schedules, Airport information and reporting etc… • Features provided by SingAir Airline Reservation Sytem … • Logon • Maintenance of Customer details & flight Schedule ( CURD) • Booking Fight & Track booking • Cancel Flight • Ariport Management Sub-System (using MVC ) • Reporting module…
Airport Management Sub-SystemMVC - Implementation Views( CRUD) Model ( Airport) used by Façade Airport Controller
AirportControllerImpl • public class AirportController : Controller • { • public ActionResult Index() • { : } • public ActionResultMessageBox() • { return View(); } • public ActionResult Details(int id) • { Airport airport = GetFlightFacade().GetAirport(id); • return View(airport); } • public ActionResult Create() • { Airport airport = new Airport(); • return View(airport); } • [HttpPost] public ActionResult Create(FormCollection collection) • { try { Airport airport = new Airport(); • UpdateModel(airport); • GetFlightFacade().CreateAirport(airport); • return RedirectToAction("/Index"); } • catch { return View(); } • } • public ActionResult Edit(intairportId) • { Airport airport = GetFlightFacade().GetAirport(airportId); • return View(airport); }
AirportControllerImpl – Cont’d • [HttpPost] • public ActionResult Edit(intairportId, FormCollection collection) • { try • { Airport airport = GetFlightFacade().GetAirport(airportId); • UpdateModel(airport); • GetFlightFacade().UpdateAirport(airport); return RedirectToAction("/Index"); } • catch { • return View(); • } • } • /// Get FlightFacade • protected FlightFacadeGetFlightFacade() • {//Single place To change easily in future • return FlightFacade.GetInstance(); • }