Exemple #1
0
        public IActionResult CheckIn(IFormCollection controls)
        {
            var id = Convert.ToInt32(controls["Id"]);

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

            return(View(person));
        }