Esempio n. 1
0
        /// <summary>
        /// 根据用户权限获取用户可以上传图片的数量
        /// </summary>
        /// <param name="cusRank"></param>
        /// <returns></returns>
        public static int GetNumOfUpImageByCustomerRank(AppEnum.CustomerRank cusRank)
        {
            AppEnum.TopicCustomerRight topicCusRight = GetTopicCustomerRight(cusRank);
            int outNum = 0;

            switch (topicCusRight)
            {
            case AppEnum.TopicCustomerRight.A1:
                outNum = 1;
                break;

            case AppEnum.TopicCustomerRight.B2:
                outNum = 3;
                break;

            case AppEnum.TopicCustomerRight.C3:
                outNum = 5;
                break;
            }
            return(outNum);
        }
Esempio n. 2
0
        /// <summary>
        /// MAP评论系统中客户的对应权限
        /// </summary>
        /// <param name="cRank"></param>
        /// <returns></returns>
        public static AppEnum.TopicCustomerRight GetTopicCustomerRight(AppEnum.CustomerRank cRank)
        {
            AppEnum.TopicCustomerRight oRes = AppEnum.TopicCustomerRight.A1;
            switch (cRank)
            {
            case AppEnum.CustomerRank.OneStar:
            case AppEnum.CustomerRank.TwoStar:
            case AppEnum.CustomerRank.ThreeStar:
                oRes = AppEnum.TopicCustomerRight.A1;
                break;

            case AppEnum.CustomerRank.FourStar:
            case AppEnum.CustomerRank.FiveStar:
            case AppEnum.CustomerRank.Golden:
                oRes = AppEnum.TopicCustomerRight.B2;
                break;

            case AppEnum.CustomerRank.Diamond:
            case AppEnum.CustomerRank.VIP:
                oRes = AppEnum.TopicCustomerRight.C3;
                break;
            }
            return(oRes);
        }