示例#1
0
        public bool GetMoney(decimal value)
        {
            if (!Authenticated)
            {
                throw new Exception("Forbidden");
            }

            if (value <= 0)
            {
                throw new Exception("Value is incorrect");
            }

            try
            {
                database.ChangeValue(bankAccount, 0 - value);
            }
            catch (Exception)
            {
                throw;
            }

            return(true);
        }