private void editCustomer_Click(object sender, EventArgs e) { if (mKH == string.Empty) { MessageBox.Show(" You do not choice any Customer To Edit"); } else { reset(); CustomerEdit cusEdit = new CustomerEdit(c); cusEdit.Show(); this.Visible = false; } }
private void btnEditCustomer_Click(object sender, EventArgs e) { Customer cus = new Customer() { Id = txtCustomerId.Text, Name = txtCustomerName.Text, Address = txtAddress.Text, Cmnd = txtCMND.Text, Phonenumber = txtPhone.Text }; CustomerEdit cusEdit = new CustomerEdit(cus); cusEdit.EditCompletedHandler += FormCustomerEdit_Completed; cusEdit.ShowDialog(); }