Example #1
0
        /// <summary>
        /// 在管理员尚未审核之前,用户重新上传
        /// </summary>
        /// <param name="user"></param>
        /// <param name="ip"></param>
        public void UpdateLastUpload(User user, string ip)
        {
            UserErrorPic x = UserErrorPic.find("UserId=" + user.Id + " order by Id desc").first();

            x.Created = DateTime.Now;
            x.Ip      = ip;
            x.update();
        }
Example #2
0
        public String GetLastReviewMsg(User user)
        {
            UserErrorPic x = UserErrorPic.find("UserId=" + user.Id + " and ReviewMsg<>'' order by Id desc").first();

            if (x == null)
            {
                return(null);
            }
            return(x.ReviewMsg);
        }
Example #3
0
        /// <summary>
        /// 管理员审核通过
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="reviewMsg"></param>
        public void ApproveOk(String ids, String reviewMsg)
        {
            List <User> userList = getUserList(ids);

            foreach (User user in userList)
            {
                user.IsPicError = 0;
                user.update();

                UserErrorPic x = UserErrorPic.find("UserId=" + user.Id + " order by Id desc").first();
                x.ReviewMsg = reviewMsg;
                x.IsPass    = 1;
                x.update();
            }
        }
Example #4
0
        public int GetStatus(User user)
        {
            UserErrorPic x = UserErrorPic.find("UserId=" + user.Id + " order by Id desc").first();

            if (x == null)
            {
                return(UserErrorPic.StatusFirstUpload);
            }
            if (strUtil.HasText(x.ReviewMsg))
            {
                if (x.IsPass == 0)
                {
                    return(UserErrorPic.StatusWaitingUpload);
                }
                else
                {
                    return(UserErrorPic.StatusOk);
                }
            }
            return(UserErrorPic.StatusWaitingApprove);
        }
Example #5
0
 public UserErrorPic GetLastLog(User user)
 {
     return(UserErrorPic.find("UserId=" + user.Id + " and ReviewMsg<>'' order by Id desc").first());
 }