Пример #1
2
 internal double withDraw(User user)
 {
     return this.withDrawCommand.execute(user);
 }
Пример #2
0
        static void Main(string[] args)
        {
            User user = new User("Li", 0);

            Console.WriteLine("用户查询余额:{0}", user.checkBalance());

            Console.WriteLine("用户存款1000元,查询余额:{0}", user.deposit(1000));

            Console.WriteLine("用户取款300元,查询余额:{0}", user.withDraw(300));

            Console.WriteLine("用户充电100个字,查询余额:{0}", user.charge(100));

            Console.ReadLine();
        }
Пример #3
0
 internal double charge(User user)
 {
     return this.chargeCommand.execute(user);
 }
Пример #4
0
 public double deposit(User user)
 {
     return this.depositCommand.execute(user);
 }
Пример #5
0
 public double checkBalance(User user)
 {
     return this.checkBalanceCommand.execute(user);
 }
Пример #6
0
 public override double execute(User user)
 {
     return base.dbCore.charge(user.Name, user.Digit);
 }
Пример #7
0
 public abstract double execute(User user);
 public override double execute(User user)
 {
     return base.dbCore.withdraw(user.Name,user.Money);
 }
 public override double execute(User user)
 {
     return base.dbCore.deposit(user.Name, user.Money);
 }
 public override double execute(User user)
 {
     return base.dbCore.checkBalance(user.Name);
 }