private void update_button_Click(object sender, EventArgs e) { Client client = new Client(); client.name = clientNametextbox.Text; client.mobileNo = clientMobileNo.Text; client.address = clientAddresstextbox.Text; try { if (MessageBox.Show("Are you sure?", "Update Client", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { Account_BO account_Bo = new Account_BO(); account_Bo.updateClient(client); DataSet ds = account_Bo.getAllClient(); clientMetroGrid.DataSource = ds.Tables[0]; clientMobileNo.Clear(); clientNametextbox.Clear(); clientAddresstextbox.Clear(); } } catch { } }