Ejemplo n.º 1
0
        protected void OnButtonPressedAddFlight(object sender, EventArgs e)
        {
            string arrival   = DropDownListArrival.SelectedValue;
            string departure = DropDownListDeparture.SelectedValue;
            string priceStr  = TextBoxPrice.Text;

            if (arrival == "" || departure == "" || priceStr == "")
            {
                return;
            }
            if (arrival == departure)
            {
                return;
            }
            int price = Convert.ToInt32(priceStr);

            FlightsService service = Service.getInstanse().flightService;

            service.AddFlightPrice(departure, arrival, price);
            UpdateAllTable();
        }