Пример #1
0
        public ActionResult Edit(int id)
        {
            var store = ProductStoreService.Find(id);

            if (store == null)
            {
                return(RedirectToAction("Index"));
            }
            ViewBag.ListState = DataHelper.ListEnumType <StateEnum>();
            var data = new ProductStoreModels
            {
                Id      = store.Id,
                Name    = store.Name,
                Phone   = store.Phone,
                Manager = store.Manager,
                Address = store.Address,
                State   = store.State
            };

            return(View("Edit", data));
        }