Beispiel #1
0
        private void btnCustomerSearch_Click(object sender, EventArgs e)
        {
            ResetMessages();
            int     id      = int.Parse(txtFindCustomer.Text);
            DataSet flights = customerController.SearchCustomer(id);

            dgCustomer.DataSource = flights.Tables[0];
            try
            {
                txtName.Text       = flights.Tables[0].Rows[0][0].ToString();
                txtCustomerId.Text = flights.Tables[0].Rows[0][5].ToString();
            }
            catch (Exception ex)
            {
                lblMessageCustomer.Text = ex.Message;
            }
        }