示例#1
0
 //
 // GET: /Store/Edit/5
 public ActionResult Edit(int id)
 {
     AESManagement.Models.StoreModel model = new Models.StoreModel();
     AESDataService.Store            store = new AESDataService.Store();
     using (AESDataService.DataServiceClient client = new AESDataService.DataServiceClient())
     {
         store         = client.getStoreInfo(id);
         model.StoreId = store.storeId;
         model.Name    = store.name;
         model.Street  = store.street;
         model.City    = store.city;
         model.State   = store.state;
         model.Zip     = store.zip;
     }
     return(View(model));
 }
示例#2
0
 //
 // GET: /Store/Edit/5
 public ActionResult Edit(int id)
 {
     AESManagement.Models.StoreModel model = new Models.StoreModel();
     AESDataService.Store store = new AESDataService.Store();
     using (AESDataService.DataServiceClient client = new AESDataService.DataServiceClient())
     {
         store = client.getStoreInfo(id);
         model.StoreId = store.storeId;
         model.Name = store.name;
         model.Street = store.street;
         model.City = store.city;
         model.State = store.state;
         model.Zip = store.zip;
     }
     return View(model);
 }
示例#3
0
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                AESDataService.Store store = new AESDataService.Store();
                using (AESDataService.DataServiceClient client = new AESDataService.DataServiceClient())
                {
                    store.name   = Request.Form["name"];
                    store.street = Request.Form["street"];
                    store.city   = Request.Form["city"];
                    store.state  = Request.Form["state"];
                    store.zip    = Request.Form["zip"];
                    client.updateStore(store);
                }

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
示例#4
0
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                AESDataService.Store store = new AESDataService.Store();
                using (AESDataService.DataServiceClient client = new AESDataService.DataServiceClient())
                {
                    store.name = Request.Form["name"];
                    store.street = Request.Form["street"];
                    store.city = Request.Form["city"];
                    store.state = Request.Form["state"];
                    store.zip = Request.Form["zip"];
                    client.updateStore(store);
                }

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }