private void btnNewCustomer_Click(object sender, EventArgs e) { using (var form = new FrmNewCustomer()) { var result = form.ShowDialog(); if (result == DialogResult.OK) { ReloaDataSourceCustomer(); } } }
private void btnDetailCustomer_Click(object sender, EventArgs e) { Customer customer = (Customer)tlCustomer.GetDataRecordByNode(tlCustomer.FocusedNode); using (var form = new FrmNewCustomer(customer)) { var result = form.ShowDialog(); if (result == DialogResult.OK) { ReloaDataSourceCustomer(); } } }