///// <summary>
        ///// 获取资源类型
        ///// </summary>
        ///// <returns></returns>
        //protected List<ResourceTypeOption> GetResType()
        //{
        //    List<ResourceTypeOption> ResTypeList = new List<ResourceTypeOption>();
        //    ResTypeList.Add(ResourceTypeOption.Soft);
        //    ResTypeList.Add(ResourceTypeOption.Theme);
        //    ResTypeList.Add(ResourceTypeOption.Ring);
        //    ResTypeList.Add(ResourceTypeOption.Picture);
        //    ResTypeList.Add(ResourceTypeOption.CopyrightedSoft);
        //    ResTypeList.Add(ResourceTypeOption.EZine);
        //    ResTypeList.Add(ResourceTypeOption.EBook);
        //    ResTypeList.Add(ResourceTypeOption.Music);
        //    ResTypeList.Add(ResourceTypeOption.Video);
        //    ResTypeList.Add(ResourceTypeOption.College91);
        //    ResTypeList.Add(ResourceTypeOption.ItuneApp);
        //    ResTypeList.Add(ResourceTypeOption.ItuneFreeApp);
        //    ResTypeList.Add(ResourceTypeOption.WinPhone);
        //    ResTypeList.Add(ResourceTypeOption.General);
        //    ResTypeList.Add(ResourceTypeOption.Ad);
        //    ResTypeList.Add(ResourceTypeOption.PandaHomeChannelSoft);
        //    ResTypeList.Add(ResourceTypeOption.PandaHomeThemeModule);
        //    return ResTypeList;
        //}

        /// <summary>
        /// 获取资源类型html
        /// </summary>
        protected string GetResTypeHtml(int defaultvalue = -1)
        {
            StringBuilder sb = new StringBuilder();

            net91com.Reports.UserRights.URLoginService loginService = new net91com.Reports.UserRights.URLoginService();

            foreach (net91com.Reports.UserRights.ResourceType resType in loginService.GetResourceTypes())
            {
                if (resType.TypeID == defaultvalue)
                {
                    sb.AppendFormat("<option value='{0}' selected='selected'>{1}</option>", resType.TypeID, resType.TypeName);
                }
                else
                {
                    sb.AppendFormat("<option value='{0}'>{1}</option>", resType.TypeID, resType.TypeName);
                }
            }

            return(sb.ToString());
        }
        /// <summary>
        /// 获取对应所选渠道下的,所有用户信息
        /// </summary>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        /// <param name="softid"></param>
        /// <param name="platformid"></param>
        /// <param name="period"></param>
        /// <param name="selectchanneltype"></param>
        /// <param name="selectchannelvalue"></param>
        /// <param name="cachetime"></param>
        /// <returns></returns>
        public List <SoftUser> GetSoftUserChanelListCache(DateTime begin, DateTime end, int softid, int platformid,
                                                          net91com.Stat.Core.PeriodOptions period,
                                                          ChannelTypeOptions selectchanneltype, int selectchannelvalue,
                                                          string channleName, bool useModules,
                                                          net91com.Reports.UserRights.URLoginService loginService,
                                                          CacheTimeOption cachetime)
        {
            string cacheKey = BuildCacheKey("GetSoftUserChanelListCache", begin, end, softid, platformid, period,
                                            selectchanneltype, selectchannelvalue, useModules,
                                            loginService == null
                                                    ? ""
                                                    : ((loginService.LoginUser.AccountType ==
                                                        UserTypeOptions.Channel ||
                                                        loginService.LoginUser.AccountType ==
                                                        UserTypeOptions.ChannelPartner)
                                                           ? loginService.LoginUser.ID.ToString()
                                                           : ""));

            return(CacheHelper.Get <List <SoftUser> >(cacheKey, CacheTimeOption.TenMinutes,
                                                      () => GetSoftUserChanelList(begin, end, softid, platformid, period, selectchanneltype,
                                                                                  selectchannelvalue, channleName, useModules, loginService)));
        }
        protected string GetResTypeHtml(List <int> lst)
        {
            StringBuilder sb = new StringBuilder();

            net91com.Reports.UserRights.URLoginService loginService = new net91com.Reports.UserRights.URLoginService();
            bool flag = true;

            foreach (net91com.Reports.UserRights.ResourceType resType in loginService.GetResourceTypes())
            {
                if (lst.Contains(resType.TypeID))
                {
                    if (flag)
                    {
                        sb.AppendFormat("<option value='{0}' selected='selected'>{1}</option>", resType.TypeID, resType.TypeName);
                        flag = false;
                    }
                    else
                    {
                        sb.AppendFormat("<option value='{0}'>{1}</option>", resType.TypeID, resType.TypeName);
                    }
                }
            }
            return(sb.ToString());
        }