Ejemplo n.º 1
0
        // GET: Stores/Details/5
        public ActionResult Details(int?id)
        {
            if (!id.HasValue)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var input = new GetStoresInput {
                Id = id.Value
            };
            var output = _storeAppService.GetStore(input);

            if (!output.Stores.Any())
            {
                return(HttpNotFound());
            }

            return(View(output.Stores.First()));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <PartialViewResult> UpsertStoreModal(long?id)
        {
            StoreViewModel model = new StoreViewModel(new StoreDto());

            if (id.HasValue)
            {
                var dto = await _appService.GetStore(id.Value);

                model = new StoreViewModel(dto);
            }
            return(PartialView("_UpsertStoreModal", model));
        }