Exemplo n.º 1
0
        public async Task <IActionResult> Audit(CreateAuditViewModel model)
        {
            var resume = await _resumeManager.FindByIdAsync(model.ResumeId);

            if (resume == null)
            {
                return(NotFound(model.ResumeId));
            }

            var auditRecord = Mapper.Map <ResumeAuditRecord>(model);
            await _resumeManager.AuditAsync(resume, model.Passed, UserIdentifier.UserId.Value, auditRecord);

            Notifier.Success("你已成功提交了审核信息!");

            //通知负责人
            //if (resume.AuditStatus == AuditStatus.Complete)
            //{
            //    var notification = new NotifyEntry()
            //    {
            //        Content = $"我审核通过了一条简历记录,<a href=\"/Resume/View/{resume.Id}\">查看简历</a>",
            //        Receivers = new List<Guid>()
            //        {
            //            resume.CreatedBy
            //        }
            //    };
            //    await Notifier.NotifyAsync(notification);
            //}


            return(RedirectToAction(nameof(List)));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Audit(CreateAuditViewModel model)
        {
            var resume = await _resumeManager.FindByIdAsync(model.ResumeId);

            if (resume == null)
            {
                return(NotFound(model.ResumeId));
            }

            var auditRecord = Mapper.Map <ResumeAuditRecord>(model);
            await _resumeManager.AuditAsync(resume, model.Passed, UserIdentifier.UserId.Value, auditRecord);

            Notifier.Success("你已成功提交了审核信息!");


            return(RedirectToAction(nameof(List)));
        }