protected void DoPause(bool pause) { ApiControl tc = Config.GetApIEngine(); try { string sIDs = GetCheckedValues(Config.MainCheckboxName); string [] s = sIDs.Split(new char [] { ',' }); int l; for (l = 0; l < s.Length; l++) { if (s[l] != String.Empty) { if (pause) { tc.UpdateSelectedTournamentsStatus(2, Utils.GetInt(s[l])); } else { tc.UpdateSelectedTournamentsStatus(1, Utils.GetInt(s[l])); } } } } finally { BindGrid(); tc = null; } }