Пример #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");
 }