Esempio n. 1
0
        private void cboCustomerID_SelectedIndexChanged(object sender, EventArgs e)
        {
            Load_cboPetID();
            var item = this.cboCustomerID.GetItemText(this.cboCustomerID.SelectedItem);

            try
            {
                txtCustomerName.Text = bus_cus.Display_Customer(item).Rows[0]["NAME"].ToString();
                Birthday.Value       = DateTime.Parse(bus_cus.Display_Customer(item).Rows[0]["BIRTHDAY"].ToString());
                txtGender.Text       = bus_cus.Display_Customer(item).Rows[0]["GENDER"].ToString();
                txtAddress.Text      = bus_cus.Display_Customer(item).Rows[0]["ADDRESS"].ToString();
                txtEmail.Text        = bus_cus.Display_Customer(item).Rows[0]["EMAIL"].ToString();
                txtPhonenumber.Text  = bus_cus.Display_Customer(item).Rows[0]["PHONE_NUMBER"].ToString();
                ResetValues_Pet();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }