Пример #1
0
        public DTOLoginResult IsCardNumberInvalidOrBlocked(long cardNumber)
        {
            FirstTimeCheck();
            var entity = _repositoryUserCard.GetByCardNumber(cardNumber);

            if (entity == null)
            {
                return new DTOLoginResult {
                           Sucess = false, Message = "Inexisting Card Number"
                }
            }
            ;
            else
            {
                if (entity.Blocked)
                {
                    return new DTOLoginResult {
                               Sucess = false, Blocked = true
                    }
                }
                ;
                else
                {
                    return new DTOLoginResult {
                               Sucess = true
                    }
                };
            }
        }
Пример #2
0
        public DTOOperationsReport GetAllOperations(long cardNumber)
        {
            var user = _repositoryUserCard.GetByCardNumber(cardNumber);

            return(new DTOOperationsReport
            {
                results = _repositoryOperation.GetAllFromUser(cardNumber),
                UserCard = user
            });
        }