Exemplo n.º 1
0
        private void SelectMessages()
        {
            var showAll = false;

            if (!string.IsNullOrEmpty(Request.QueryString["ShowMessages"]))
            {
                showAll = Convert.ToByte(Request.QueryString["ShowMessages"]).Equals(1);
            }

            if (showAll || ShowMessages)
            {
                SelectAllMessages();
            }
            else
            {
                foreach (var id in MessagesIds.Where(id => lbMessages.Items.FindByValue(id) != null))
                {
                    lbMessages.Items.FindByValue(id).Selected = true;
                }
            }
        }
Exemplo n.º 2
0
 private IEnumerable <string> GetSelectedMessagesCodes(IEnumerable <string> messages)
 {
     return(MessagesIds.Count > 0 ? MessagesIds.Select(m => m) : messages);
 }