Example #1
0
        /// <summary>
        /// 撤销版主
        /// </summary>
        /// <param name="moderatorId">版主编号</param>
        /// <returns></returns>
        public static string RevokeModerator(string moderatorId)
        {
            Moderator moderator = new Moderator()
            {
                ModeratorId = moderatorId
            };

            if (moderator.IsError)
            {
                return(moderator.GetErrorMsg());
            }
            if (IMS.Delete(moderatorId) > 0)
            {
                return("撤销成功");
            }
            else
            {
                return("撤销失败");
            }
        }
Example #2
0
        /// <summary>
        /// 撤销版主
        /// </summary>
        /// <param name="memberId">会员编号</param>
        /// <param name="divisionId">版块编号</param>
        /// <returns></returns>
        public static string RevokeModerator(string memberId, string divisionId)
        {
            Moderator moderator = new Moderator()
            {
                MemberId   = memberId,
                DivisionId = divisionId
            };

            if (moderator.IsError)
            {
                return(moderator.GetErrorMsg());
            }
            if (IMS.Delete(memberId, divisionId) > 0)
            {
                return("撤销成功");
            }
            else
            {
                return("撤销失败");
            }
        }
Example #3
0
 /// <summary>
 /// 设置版主
 /// </summary>
 /// <param name="moderator">Moderator实体类</param>
 /// <returns></returns>
 public static string SetModerator(Moderator moderator)
 {
     if (moderator.IsError)
     {
         return(moderator.GetErrorMsg());
     }
     if (isExist(moderator.ModeratorId))
     {
         return("版主编号已存在");
     }
     if (MemberManagement.IsExist(moderator.MemberId))
     {
         return("该会员账号不存在");
     }
     if (IMS.Insert(moderator) == 1)
     {
         return("设置版主成功");
     }
     else
     {
         return("设置版主失败");
     }
 }