private void BTNDelete_Click(object sender, EventArgs e) { CustomersForm c = new CustomersForm() { IsDailog = true }; DialogResult r = c.ShowDialog(); if (c.DialogResult == DialogResult.OK) { TXTCustomerName.Text = c.CustomerFirstName + " " + c.CustomerLastName; CBMobileNo.Text = c.CustomerMobileNo; } c.Dispose(); CKNewCustomer.Checked = true; }
private void BTNNewCustomer_Click(object sender, EventArgs e) { //TODO: when MobileNo is added to text , disable field change event CustomersForm c = new CustomersForm() { IsDailog = true }; DialogResult r = c.ShowDialog(); if (c.DialogResult == DialogResult.OK) { TXTFirstName.Text = c.CustomerFirstName; TXTLastName.Text = c.CustomerLastName; CBMobileNo.Items.Add(c.CustomerMobileNo); CBMobileNo.Text = c.CustomerMobileNo; } c.Dispose(); }