Exemple #1
0
        public ActionResult Cancel(int id)
        {
            Visit visit = _repo.GetById(id);

            _visitManager.CancelVisit(visit);


            return(Json(new { status = true }));
        }
Exemple #2
0
        public ActionResult Cancel(int id)
        {
            Visit visit = _repo.GetById(id);

            try
            {
                _visitManager.CancelVisit(visit);
                return(Json(new { status = true }));
            }
            catch (ArgumentException ex)
            {
                return(Json(new { status = false, message = ex.Message }));
            }
        }