Exemplo n.º 1
0
            protected override IEnumerable <PersonCreditCard_ReadListOutput> ReadList()
            {
                IPersonCreditCardService svc = DI.Resolve <IPersonCreditCardService>();
                IEnumerable <PersonCreditCard_ReadListOutput> ccList = svc.ReadList(
                    salesOrder.CustomerObject.PersonIdProperty.Value.Value);

                if (svc is IDisposable)
                {
                    ((IDisposable)svc).Dispose();
                }
                return(ccList);
            }
Exemplo n.º 2
0
        protected virtual IEnumerable <PersonCreditCard_ReadListOutput> ReadList()
        {
            IPersonCreditCardService svcPersonCreditCard = DI.Resolve <IPersonCreditCardService>();
            object nullParamReadList = null; // TODO: make sure input parameters are defined as data object properties
            IEnumerable <PersonCreditCard_ReadListOutput> outReadList = svcPersonCreditCard.ReadList((int)nullParamReadList);

            if (svcPersonCreditCard is IDisposable)
            {
                ((IDisposable)svcPersonCreditCard).Dispose();
            }
            return(outReadList);
        }
Exemplo n.º 3
0
        public ActionResult ReadList([FromRoute] int _businessEntityId)
        {
            ActionResult response = null;

            try
            {
                if (ModelState.IsValid)
                {
                    Output <ICollection <PersonCreditCard_ReadListOutput> > output = svc.ReadList(_businessEntityId);
                    response = StatusCode((int)output.HttpStatus, output);
                    return(response);
                }
                else
                {
                    ModelValidation.AddModelErrors(currentErrors, ModelState);
                }
            }
            catch (Exception ex)
            {
                currentErrors.MergeWith(errorsParser.FromException(ex));
            }
            response = StatusCode((int)currentErrors.HttpStatus, new Output(currentErrors));
            return(response);
        }