Ejemplo n.º 1
0
        public ValidationResult ValidatePoints(string sessionId, params string[] memberNames)
        {
            var memberPoints = TokensStrategy.GetPoints(sessionId);

            if (this.Campaign.SelectToEntity() == null)
            {
                return(TfValidationResult.Compose("NotExists", memberNames));
            }
            if (this.Campaign.Entity.price > memberPoints)
            {
                return(TfValidationResult.Compose("InsufficientPoints", memberNames));
            }
            return(null);
        }
Ejemplo n.º 2
0
 public override void MapModel()
 {
     this.TotalPoints = TokensStrategy.GetPoints(this.SessionId);
 }