示例#1
0
        public bool DeleteBet(int betID, decimal amount, User user)
        {
            int  isAuthorized = betrep.DeleteBetValidation(user.UserID, betID);
            bool success;

            if (isAuthorized != 0)
            {
                success = betrep.Delete(betID);

                if (success == true)
                {
                    userservice = new UserService();
                    userservice.AddFunds(user, amount);
                }
            }
            else
            {
                success = false;
            }

            return(success);
        }