Пример #1
0
        public ValidationResult ValidateWallet(string sessionId, params string[] memberNames)
        {
            var wallet = MemberStrategy.GetMemberWallet(this.Member.id);

            if (this.TotalPrice > wallet.amount)
            {
                return(TfValidationResult.Compose("InsufficientCash", memberNames));
            }
            return(null);
        }
Пример #2
0
 public override void MapModel()
 {
     this.Wallets.Entity.member_id = this.Member.id;
     this.Amount = MemberStrategy.GetMemberWallet(this.Member.id)?.amount ?? 0;
 }