예제 #1
0
        public async Task <ActionResult> DeleteConfirm(Guid id)
        {
            try
            {
                await APIHelpers.DeleteAsync <bool>("api/Candidate/Delete/" + id);

                TempData["sucess"] = CandidateResources.delete;
                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                return(View());
            }
        }
        public async Task <ActionResult> DeleteConfirm(Guid id)
        {
            try
            {
                await APIHelpers.DeleteAsync <Interviews>("api/Interview/Delete/" + id);

                TempData["sucess"] = InterviewResources.delete;
                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                TempData["error"] = CommonResources.error;
                return(RedirectToAction("AccessDenied", "Error"));
            }
        }
예제 #3
0
        public async Task <ActionResult> DeleteConfirm(Guid id)
        {
            try
            {
                // TODO: Add delete logic here
                await APIHelpers.DeleteAsync <TemplatesType>("api/TemplateType/Delete/" + id);

                TempData["sucess"] = TemplateTypeResources.delete;
                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                TempData["error"] = CommonResources.error;
                return(RedirectToAction("AccessDenied", "Error"));
            }
        }
        public async Task <ActionResult> DeleteConfirm(string id)
        {
            try
            {
                // TODO: Add delete logic here
                await APIHelpers.DeleteAsync <Departments>("api/Department/Delete/" + id);

                TempData["sucess"] = DepartmentResources.delete;
                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                TempData["error"] = CommonResources.error;
                return(RedirectToAction("AccessDenied", "Error"));
            }
        }
예제 #5
0
        public async Task <ActionResult> DeleteConfirm(string id)
        {
            try
            {
                // TODO: Add delete logic here
                var data = await APIHelpers.GetAsync <Employee>("api/Employee/Get/" + id);

                await UserManager.DeleteAsync(UserManager.Users.Where(_ => _.Id == data.UserId.ToString()).SingleOrDefault());

                await APIHelpers.DeleteAsync <bool>("api/Employee/Delete/" + id);

                TempData["sucess"] = EmployeeResources.delete;
                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                TempData["error"] = CommonResources.error;
                return(RedirectToAction("AccessDenied", "Error"));
            }
        }