private void btnUpdate_Click(object sender, EventArgs e) { if (MessageBox.Show("Do you want to Update Creent Record ", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { AccountType.AccountCreationDataType _Savedata = new AccountType.AccountCreationDataType(); string respond = SetDataToCLass(out _Savedata); if (MyAccount.ExistAccountCreation(_Savedata.AccountID)) { if (respond == "True") { respond = MyAccount.UpdateAccountCreation(_Savedata); if (respond == "True") { MessageBox.Show("Record Saved Successfully", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information); LoadExistingAccount(); LoadExtAccountInHiaraky(); } else { MessageBox.Show(respond, "E r r o r", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } else { MessageBox.Show(respond, "E r r o r", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } else { MessageBox.Show("No account Number in the system, Use Save Button to Add new account delatails", "E r r o r", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } }