Ejemplo n.º 1
0
        protected virtual void DisplayUsedBy(Theme theme)
        {
            try
            {
                lstUsedBy.DataSource = null;
                if (theme != null)
                {
                    if (theme.Id == UserThemeRepository.MainThemeId)
                    {
                        lstUsedBy.Items.Add("Application Forms");
                    }
                    else
                    {
                        lstUsedBy.DisplayMember = "Name";
                        lstUsedBy.DataSource    = ViewStates.Where(v => v.ThemeId == theme.Id).ToList();
                    }
                }

                lstUsedBy.SelectedIndex = -1;
            }
            catch (Exception ex)
            {
                ExceptionHandler("Error displaying UsedBy list", ex);
            }
        }