private void TryLoadTag() { int id = TagId; if (id <= 0) { editorMode = TagEditorMode.Creation; tag = new BXContentTag(); } else { editorMode = TagEditorMode.Modification; BXContentTagQuery q = new BXContentTagQuery(); q.Filter = new BXContentTagFilterItem(BXContentTagField.Id, BXSqlFilterOperators.Equal, id); q.SelectLastUpdate = true; q.SelectTagCount = true; BXContentTagCollection tags = q.Execute(); tag = tags.Count != 0 ? tags[0] : null; if (tag == null) { _errorMessage = GetMessageRaw("Error.NotFound"); return; } } if (editorMode == TagEditorMode.Modification) Status.SelectedValue = tag.Status.ToString(); else { Name.Text = ""; Status.SelectedValue = "Approved"; } }