private void button2_Click(object sender, EventArgs e) { frmEditClientForm editClient = new frmEditClientForm(); try { this.Hide(); editClient.ShowDialog(); } catch { this.Hide(); editClient = new frmEditClientForm(); editClient.ShowDialog(); } }
private void PbEditPencil_Click(object sender, EventArgs e) { try { frmEditClientForm editClient = new frmEditClientForm(); //load edit client screen editClient.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Unexpected error occured while running."); } }