Beispiel #1
0
        public async Task <IActionResult> Assign(AssignUserViewModel model)
        {
            if (ModelState.IsValid)
            {
                var resume = await _resumeManager.FindByIdAsync(model.Id);

                if (resume == null)
                {
                    return(NotFound(model.Id));
                }
                await _resumeManager.AssignUserAsync(resume, model.OwnerUserId);

                Notifier.Success("你已成功重新分配了简历!");

                ////通知负责人
                //var notification = new NotifyEntry()
                //{
                //    Content = $"我分配了一条简历记录给你,<a href=\"/Resume/View/{resume.Id}\">查看简历</a>",
                //    Receivers = new List<Guid>()
                //    {
                //         resume.HandledBy
                //    }
                //};
                //await Notifier.NotifyAsync(notification);

                return(RedirectToAction(nameof(List)));
            }
            return(await BuildAssignDisplayAsync(model));
        }
Beispiel #2
0
        public async Task <IActionResult> Assign(AssignUserViewModel model)
        {
            if (ModelState.IsValid)
            {
                var resume = await _resumeManager.FindByIdAsync(model.Id);

                if (resume == null)
                {
                    return(NotFound(model.Id));
                }
                await _resumeManager.AssignUserAsync(resume, model.OwnerUserId);

                Notifier.Success("你已成功重新分配了简历!");


                return(RedirectToAction(nameof(List)));
            }
            return(await BuildAssignDisplayAsync(model));
        }