// on ok protected override void OnOK(object sender, EventArgs args) { Assert.ArgumentNotNull(sender, "sender"); Assert.ArgumentNotNull((object)args, "args"); ListString listString = new ListString(WebUtil.GetFormValue("sortorder")); if (listString.Count == 0) // no changes made { base.OnOK(sender, args); } else { if (IsDBsort(listString.ToString())) { SortContentOptions sortContentOptions = SortContentOptions.Parse(); ProcessDbOrder(sortContentOptions.Item.Children[0], listString); // save sort order of db view data } else // sort input view items { ListString source = listString; this.Sort(source.Select <string, ID>(x => ShortID.DecodeID(x))); SheerResponse.SetDialogValue("1"); } base.OnOK(sender, args); } }
public IEnumerable <Language> GetLanguages() { return(_list.Select(LanguageManager.GetLanguage)); }
protected virtual IEnumerable <Tag> GetSelectedItems() { ListString itemsIds = new ListString(Value, ','); return(itemsIds.Select(itemId => new Tag(itemId, DateTime.MaxValue, 0)).Where(item => item != null)); }