Beispiel #1
0
        /// <summary>
        /// 修改用户密码
        /// </summary>
        /// <param name="user">要修改的用户信息</param>
        /// <returns>操作结果</returns>
        public static int UpdateUserPassword(GeneralUser user)
        {
            int result = -1;

            //修改用户编号
            switch (user.RoleInfo.Id)
            {
            case UserRoleConst.Administrator:        //系统管理员
                result = GeneralUserService.UpdateGeneralUser(user);
                break;

            //更新一般用户信息
            case UserRoleConst.ChiefEditor:          //主编
                result = GeneralUserService.UpdateGeneralUser(user);
                break;

            case UserRoleConst.LayoutEditor:         //排版编辑
                result = GeneralUserService.UpdateGeneralUser(user);
                break;

            case UserRoleConst.ResponsibleEditor:    //责任编辑
                result = GeneralUserService.UpdateGeneralUser(user);
                break;

            case UserRoleConst.SubEditor:            //副主编
                result = GeneralUserService.UpdateGeneralUser(user);
                break;

            //更新特殊用户信息
            case UserRoleConst.Author:               //作者
                UserAuthor auther = user as UserAuthor;
                result = UserAuthorService.UpdateUserAuthor(auther);
                break;

            case UserRoleConst.Expert:               //专家
                UserExpert expert = user as UserExpert;
                result = UserExpertService.UpdateUserExpert(expert);
                break;
            }
            return(result);
        }
 /// <summary>
 /// 插入一个专家
 /// </summary>
 /// <param name="userExpert"></param>
 /// <returns></returns>
 public static int InsertUserExpert(UserExpert userExpert)
 {
     return(UserExpertService.InsertUserExpert(userExpert));
 }
Beispiel #3
0
 /////////////////////////////////////////////////////////////
 #region Blue
 /// <summary>
 /// 删除专家信息
 /// </summary>
 /// <param name="UserID"></param>
 /// <returns></returns>
 public static int DeleteUserExpert(int UserID)
 {
     return(UserExpertService.DeleteUserExpert(UserID));
 }