Example #1
0
        public bool PosLogout(bool closeTill)
        {
            log.Debug("PosManager: Logout pos.");
            bool result = true;

            if (closeTill)
            {
                result = dbAccess.CSCTillsMoveRecords(ShiftDate, TillNo);
                if (result)
                {
                    result = dbAccess.CloseTill(TillNo);
                }
            }
            else
            {
                result = dbAccess.StopTill(TillNo);
            }
            if (result)
            {
                log.Debug("PosManager: Log out successfully.Clear loggedIn user data.");
                ClearLoggedInUserData();
            }
            else
            {
                log.Error("PosManager: Log out failed.");
            }

            return(result);
        }