Exemplo n.º 1
0
 public ActionResult Edit(int id)
 {
     HomepicClient hc = new HomepicClient();
     HomepicViewModel hvm = new HomepicViewModel();
     hvm.pic = hc.find(id);
     return View("Edit",hvm);
 }
Exemplo n.º 2
0
 // GET: Homepic
 public ActionResult Index()
 {
     HomepicClient hc = new HomepicClient();
     ViewBag.listHomepics = hc.findAll();
     return View();
 }
Exemplo n.º 3
0
 public ActionResult Edit(HomepicViewModel hvm)
 {
     HomepicClient hc = new HomepicClient();
     hc.Edit(hvm.pic);
     return RedirectToAction("Index");
 }
Exemplo n.º 4
0
 public ActionResult Delete(int id)
 {
     HomepicClient hc = new HomepicClient();
     hc.Delelte(id);
     return RedirectToAction("Index");
 }