private void addCustomerButton_Click(object sender, EventArgs e) { using (var form = new AddCustomerForm()) { form.ShowDialog(); } }
private void bt_add_customer_Click(object sender, EventArgs e) { AddCustomerForm acf = new AddCustomerForm(); if (acf.ShowDialog() == DialogResult.OK) { dtshowcustomer_find.DataSource = CustomerController.loadAddedCustomer(); keycustomerText.Focus(); } }
private void button2_Click(object sender, EventArgs e) { AddCustomerForm acf = new AddCustomerForm(); if (acf.ShowDialog() == DialogResult.OK) { selected_customer = CustomerController.addedCustomer; showInfor(); } }
private void BtnAddCustomer_Click(object sender, EventArgs e) { if (!CustomerAdded) { _addCustomerForm = new AddCustomerForm(this); _addCustomerForm.ShowDialog(); } else { MessageBox.Show("Cliente já foi adicionado."); } }