Пример #1
0
        // GET: Policies
        public ActionResult Index()
        {
            var repo = new PolicyRepository();
            repo.RootPath = Server.MapPath("~/");
            var pvm = new PoliciesByCategoryVM();
            pvm.AllPolicies = repo.GetAll();
            pvm.Polcatlist = repo.GetAllPolicyCategories();

            return View("Index", pvm);
        }
Пример #2
0
 public ActionResult Manage()
 {
     var repo = new PolicyRepository();
     repo.RootPath = Server.MapPath("~/");
     var policies = repo.GetAll();
     return View(policies);
 }
Пример #3
0
        public ActionResult PoliciesByCategory(PoliciesByCategoryVM pvm)
        {
            var repo = new PolicyRepository {RootPath = Server.MapPath("~/")};
            pvm.Policies = repo.GetAll().Where(p=>p.Category == pvm.Category).ToList();

            return View(pvm);
        }