Ejemplo n.º 1
0
 private void btnAddNewCustomer_Click(object sender, EventArgs e)
 {
     ResetMessages();
     try
     {
         string   name     = txtName.Text;
         int      flightId = int.Parse(cbFlightId.Text);
         Customer customer = new Customer(name, flightId);
         customerController.RegisterCustomer(customer);
         UpdateCustomerGrid();
         lblMessageCustomer.Text = "New Customer Added";
     }catch (Exception ex)
     {
         lblMessageCustomer.Text = ex.Message;
     }
 }