public ActionResult GetPolicyFromCategory(string Category) { PolicyDatabase pd = new PolicyDatabase(); List<Policy> policies = new List<Policy>(); policies = pd.GetPolicyByCategory(Category); return View(policies); }
public ActionResult PolicyForm(PolicyToAddVM vm) { if (ModelState.IsValid) { PolicyDatabase pd = new PolicyDatabase(); pd.AddPolicy(vm.PolicyToAdd); return RedirectToAction("ManagePolicy"); } return View(vm); }
public ActionResult ViewPolicyDetails(string title) { var repo = new PolicyDatabase(); var policy = repo.GetByTitle(title); return View(policy); }
public ActionResult RemovePolicy(string title) { PolicyDatabase pd = new PolicyDatabase(); pd.DeletePolicy(title); return RedirectToAction("ManagePolicy"); }