Exemplo n.º 1
0
        public async Task <ActionResult> Show(int id, TransactionsSearchPager searchPager)
        {
            Logger.Trace("Show::{0}", id);

            var query  = new RestitutionOrderDetailsQuery(orderId: id, searchPager: searchPager);
            var result = await mediator.SendAsync(query);

            if (result == null)
            {
                return(new HttpNotFoundResult("An order with id {0} was not found".FormatWith(id)));
            }

            return(View(result));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Show(int?id, TransactionsSearchPager searchPager)
        {
            Logger.Trace("Index::{0}", id);

            if (!id.HasValue)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var query  = new AccountDetailsQuery(accountId: id.Value, searchPager: searchPager);
            var result = await mediator.SendAsync(query);

            if (result == null)
            {
                return(new HttpNotFoundResult("An Account with id {0} was not found".FormatWith(id)));
            }

            return(View(result));
        }
 public RestitutionOrderDetailsQuery(int orderId, TransactionsSearchPager searchPager)
 {
     this.OrderId = orderId;
     this.Pager   = searchPager;
 }
Exemplo n.º 4
0
 public AccountDetailsQuery(int accountId, TransactionsSearchPager searchPager)
 {
     this.AccountId = accountId;
     this.Pager     = searchPager;
 }