예제 #1
0
        /// <summary>
        /// Generates the channel information.
        /// </summary>
        /// <param name="channel">The channel.</param>
        private void GenerateChannelInformation(RssChannel channel)
        {
            if (this.Parameters.ClassName.StartsWith("List_"))
            {
                string strListId = this.Parameters.ClassName.Replace("List_", string.Empty);
                int    listId    = int.Parse(strListId);

                if (!ListInfoBus.CanRead(listId))
                {
                    throw new Mediachase.Ibn.AccessDeniedException();
                }

                GenerateListChannelInformation(channel);
            }
        }
예제 #2
0
        public bool IsEnable(object Sender, object Element)
        {
            bool retval = false;

            if (Element is CommandParameters)
            {
                CommandParameters cp = (CommandParameters)Element;
                if (cp.CommandArguments != null && cp.CommandArguments.ContainsKey(CommandParameters.CommandParametersKey))
                {
                    string param = cp.CommandArguments[CommandParameters.CommandParametersKey];

                    int id = -1;
                    int.TryParse(param, out id);

                    if (id > 0)
                    {
                        retval = ListInfoBus.CanRead(id);
                    }
                }
            }
            return(retval);
        }