Esempio n. 1
0
        // 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);
            }
        }
Esempio n. 2
0
 public IEnumerable <Language> GetLanguages()
 {
     return(_list.Select(LanguageManager.GetLanguage));
 }
Esempio n. 3
0
        protected virtual IEnumerable <Tag> GetSelectedItems()
        {
            ListString itemsIds = new ListString(Value, ',');

            return(itemsIds.Select(itemId => new Tag(itemId, DateTime.MaxValue, 0)).Where(item => item != null));
        }