コード例 #1
0
 public ActionResult Edit(string id)
 {
     GoodServiceClient gsc = new GoodServiceClient();
     GoodViewModel gvm = new GoodViewModel();
     gvm.Good = gsc.find(id);
     return View("Edit", gvm);
 }
コード例 #2
0
 //
 // GET: /Good/
 public ActionResult Index()
 {
     GoodServiceClient gsc = new GoodServiceClient();
     ViewBag.listOfGoods = gsc.findAll();
     return View();
 }
コード例 #3
0
 public ActionResult Edit(GoodViewModel gvm)
 {
     GoodServiceClient gsc = new GoodServiceClient();
     gsc.edit(gvm.Good);
     return RedirectToAction("Index");
 }
コード例 #4
0
 public ActionResult Delete(string id)
 {
     GoodServiceClient gsc = new GoodServiceClient();
     gsc.delete(gsc.find(id));
     return RedirectToAction("Index");
 }