예제 #1
0
        public IActionResult UnDelete(int id)
        {
            try
            {
                UserSessionContext userSession   = new UserSessionContext(this.HttpContext);
                LessonBusiness     lessonManager = new LessonBusiness(DbContext);
                lessonManager.UnDeleteLesson(id, userSession.CurrentUser);

                this.ShowAlert("The lessons was successfully restored.", "sprite-accept");
            }
            catch (Exception ex)
            {
                this.AddError(ex.Message);
            }

            return(RedirectToAction("Index", new { pageAction = Enumerations.PageAction.Search }));
        }