コード例 #1
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());
            }
        }
コード例 #2
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();
            }
        }