Ejemplo n.º 1
0
        public IActionResult CheckOut(IFormCollection controls)
        {
            var id = Convert.ToInt32(controls["Id"]);

            try
            {
                ChildCare.DailyCheckOut(id);
                return(RedirectToAction(nameof(Index)));
            }
            catch (FormatException)
            {
                _toastNotification.AddErrorToastMessage("CheckOut not completed!");
                ViewBag.ErrorMessage = "Invalid Child Id!";
                var person = ChildCare.DailyCheckOut(id);
                return(View(person));
            }
        }
Ejemplo n.º 2
0
        public IActionResult CheckOut(int?id)
        {
            var person = ChildCare.DailyCheckOut(id.Value);

            return(View(person));
        }