private void btnUpdateAvailability_Click(object sender, EventArgs e) { int ID = int.Parse(txtIDUpdate1.Text); int availability = cmbUpdate1.Text == "Available" ? 1 : 0; SecurityLevel sl = new SecurityLevel(); sl.UpdateSecurityLevelAvailability(ID, availability); bs.DataSource = dataAccess.GetAllSecurityLevels(); bs.ResetBindings(true); }