private void btnBlock_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Do you want to 'Block' this account?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (result == DialogResult.Yes) { //Block account query dbContext.BlockUserAccount(Convert.ToInt32(lblUserId.Text), 0); MessageBox.Show("User Account has been blocked successfully!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } }