Пример #1
0
        public ActionResult Delete(int id, FormCollection collection)
        {
            Interview cl = Service.GetById(id);

            Service.Delete(cl);
            Service.Commit();

            return(RedirectToAction("Index"));
        }
Пример #2
0
        public IActionResult Delete(string id)
        {
            var interview = _iInterviewService.GetById(id);
            var count     = 1;

            if (interview == null)
            {
                throw new Exception("该面试邀请不存在");
            }
            try
            {
                // save
                _iInterviewService.Delete(id);
                return(Output(new DeleteOrUpdateResponse
                {
                    id = id
                }, count));
            }
            catch (AppException ex)
            {
                // return error message if there was an exception
                return(BadRequest(new { message = ex.Message }));
            }
        }