Exemplo n.º 1
0
        public bool DeleteResumeComment(ResumeComment resumeComment)
        {
            db.ResumeCommentSet.Remove(resumeComment);
            var deleted = db.SaveChanges();

            return(deleted > 0);
        }
        public string Create(string resumeId, string postName, string interviewDate, string interviewFeedback)
        {
            if (string.IsNullOrWhiteSpace(resumeId) ||
                string.IsNullOrWhiteSpace(postName) ||
                string.IsNullOrWhiteSpace(interviewDate) ||
                string.IsNullOrWhiteSpace(interviewFeedback))
            {
                return("{\"result\":false}");
            }

            ResumeComment comment = new ResumeComment();

            comment.Id                = Guid.NewGuid().ToString();
            comment.ResumeId          = resumeId;
            comment.PostName          = postName;
            comment.InterviewDate     = interviewDate;
            comment.InterviewFeedBack = interviewFeedback;
            comment.FeedBackTime      = DateTime.Now.ToString("yyyy-MM-dd hh-mm-ss");
            comment.UserName          = User.Identity.Name;

            bool result = bll.SaveResumeComment(comment);

            if (result)
            {
                return("{\"result\":true}");
            }
            else
            {
                return("{\"result\":false}");
            }
        }
Exemplo n.º 3
0
        public bool SaveResumeComment(ResumeComment resumeComment)
        {
            db.ResumeCommentSet.Add(resumeComment);
            var saved = db.SaveChanges();

            return(saved > 0);
        }