Beispiel #1
0
        public async Task <ActionResult> BatchCreate(int?id)
        {
            Logger.Trace("BatchCreate::Get::{0}", id);

            var query = new BatchExpenseEditorFormQuery(fundId: id);
            var form  = await mediator.SendAsync(query);

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

            return(View(form));
        }
Beispiel #2
0
        public async Task <ActionResult> BatchEdit(int?id)
        {
            Logger.Trace("Edit::Get::{0}", id);

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

            var query = new BatchExpenseEditorFormQuery(batchId: id);
            var form  = await mediator.SendAsync(query);

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

            return(View(form));
        }