Пример #1
0
        public BasketTargets.RootModel RecalculateBasketTargets(BasketTargets.RootModel model)
        {
            var deserializedModel = this.btDeserializer.DeserializeRoot(model);
            var ticket            = new CalculationTicket();
            var serializedModel   = this.btSerializer.SerializeRoot(deserializedModel, ticket);

            return(serializedModel);
        }
Пример #2
0
        public IEnumerable <IssueModel> SaveBasketTargets(BasketTargets.RootModel model, string username)
        {
            var deserializedModel = this.btDeserializer.DeserializeRoot(model);
            var ticket            = new CalculationTicket();
            var issues            = this.facade.ApplyBpstModelIfValid(deserializedModel, username, ticket);
            var serializedIssues  = this.serializer.SerializeValidationIssues(issues);

            return(serializedIssues);
        }