Пример #1
0
        /// <summary>
        /// Constructor to create a new recycle bin based on RecycleBinType
        /// Will automatically update internal nodeObjectType based on the RecycleBinType enum
        /// </summary>
        /// <param name="type"></param>
        public RecycleBin(RecycleBinType type)
            : base((int)type)
        {
            switch (type)
            {
            case RecycleBinType.Content:
                _nodeObjectType = Document._objectType;
                m_BinType       = RecycleBinType.Content;
                break;

            case RecycleBinType.Media:
                _nodeObjectType = Media._objectType;
                m_BinType       = RecycleBinType.Media;
                break;
            }
        }
Пример #2
0
        /// <summary>
        /// Constructor to create a new recycle bin based on RecycleBinType
        /// Will automatically update internal nodeObjectType based on the RecycleBinType enum
        /// </summary>
        /// <param name="type"></param>
        public RecycleBin(RecycleBinType type)
            : base((int)type)
        {
            switch (type)
            {
                case RecycleBinType.Content:
                    _nodeObjectType = Document._objectType;
                    m_BinType = RecycleBinType.Content;
                    break;
                case RecycleBinType.Media:
                    _nodeObjectType = Media._objectType;
                    m_BinType = RecycleBinType.Media;
                    break;

            }
        }
Пример #3
0
        public static int Count(RecycleBinType type)
        {
            Guid objectType = Document._objectType;

            switch (type)
            {
            case RecycleBinType.Content:
                objectType = Document._objectType;
                break;

            case RecycleBinType.Media:
                objectType = Media._objectType;
                break;
            }

            string sql = String.Format(RecycleBin.m_ChildCountSQL,
                                       (int)type);

            return(SqlHelper.ExecuteScalar <int>(sql, SqlHelper.CreateParameter("@nodeObjectType", objectType)));
        }
Пример #4
0
 public RecycleBin(Guid nodeObjectType, RecycleBinType type)
     : base((int)type)
 {
     _nodeObjectType = nodeObjectType;
     m_BinType       = type;
 }
Пример #5
0
        public static int Count(RecycleBinType type)
        {
            Guid objectType = Document._objectType;

            switch (type)
            {
                case RecycleBinType.Content:
                    objectType = Document._objectType;
                    break;
                case RecycleBinType.Media:
                    objectType = Media._objectType;
                    break;
            }

            string sql = String.Format(RecycleBin.m_ChildCountSQL,
                        (int) type);

            return SqlHelper.ExecuteScalar<int>(
                    sql,
                    SqlHelper.CreateParameter("@nodeObjectType", objectType));
        }
Пример #6
0
 public RecycleBin(Guid nodeObjectType, RecycleBinType type)
     : base((int)type)
 {
     _nodeObjectType = nodeObjectType;
     m_BinType = type;
 }