public ActionResult ManagePopularLinks() { PopularLinkModel vm = new PopularLinkModel(); vm.plinks = _adminRepository.GetAllPopularLinks(); return View(vm); }
public ActionResult SavePopularLink(PopularLink popularlink) { if (Request.Form["PopularLinkId"] == "0") { _adminRepository.AddPopularLink(popularlink); } else { _adminRepository.UpdatePopularLink(popularlink); } PopularLinkModel obj = new PopularLinkModel(); obj.plinks = _adminRepository.GetAllPopularLinks (); return View("ManagePopularLinks", obj); }
public ActionResult EditPopularLink(int id) { PopularLinkModel vm = new PopularLinkModel(); vm.plink = _adminRepository.GetPopularLinkById(id); return View("NewPopularLink", vm); }