// // 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)); }
// // 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); }
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()); } }
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(); } }