Exemplo n.º 1
0
        public IActionResult CheckIn()
        {
            User currentUser = authProvider.GetCurrentUser();

            if (currentUser == null)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                if (visitDAL.HasOpenVisit(currentUser.Id))
                {
                    visitDAL.CheckOut(currentUser.Id);
                }
                else
                {
                    visitDAL.CheckIn(currentUser.Id);
                }
            }
            return(RedirectToAction("Index"));
        }
 public IActionResult CheckOut(MemberToBeCheckInOut model)
 {
     visitDAL.CheckOut(model.UserId);
     return(View("Index", new Message($"{model.UserEmail} is checked out")));
 }