예제 #1
0
        public ActionResult GetPolicyFromCategory(string Category)
        {
            PolicyDatabase pd = new PolicyDatabase();
            List<Policy> policies = new List<Policy>();

            policies = pd.GetPolicyByCategory(Category);

            return View(policies);
        }
예제 #2
0
        public ActionResult PolicyForm(PolicyToAddVM vm)
        {
            if (ModelState.IsValid)
            {
                PolicyDatabase pd = new PolicyDatabase();

                pd.AddPolicy(vm.PolicyToAdd);

                return RedirectToAction("ManagePolicy");
            }

            return View(vm);
        }
예제 #3
0
        public ActionResult ViewPolicyDetails(string title)
        {
            var repo = new PolicyDatabase();
            var policy = repo.GetByTitle(title);

            return View(policy);
        }
예제 #4
0
        public ActionResult RemovePolicy(string title)
        {
            PolicyDatabase pd = new PolicyDatabase();

            pd.DeletePolicy(title);

            return RedirectToAction("ManagePolicy");
        }