コード例 #1
0
        public async Task <ActionResult> Resume(int?id)
        {
            if (ModelState.IsValid)
            {
                var userid = User.Identity.GetUserId();
                var user   = await UserManager.FindByIdAsync(userid);

                if (user == null)
                {
                    return(View("Error", new[] { "找不到用户" }));
                }
                var leave = await LeaveManager.FindEntityByIdAsync(id ?? 0);

                if (leave == null)
                {
                    return(View("Error", new[] { "找不到该项" }));
                }
                LeaveManager.ResumeApply(leave.Id);
                //var teacher = leave.Checks.First(e => e.CheckOrder == 0).CheckTeacher;
                //teacher.TeacherInfo.ResumeApplies
            }
            return(RedirectToAction("Index"));
        }