public ActionResult deleteClaim(int id) { //the admin can delete a claim IserviceClaim spcl = new serviceClaim(); spcl.Delete(spcl.GetById(id)); spcl.Commit(); return(RedirectToAction("Claims")); }
public ActionResult Claims() { //atef is supposed to fix the template for this one //the admin can see the list of claims ordred by date //the admin can delete a claim check the next action result IserviceClaim spcl = new serviceClaim(); List <Claim> cl = new List <Claim>(); cl = spcl.GetAll().OrderBy(x => x.claimdate).ToList(); return(View(cl)); }
public ActionResult Contact(Claim claim) { IserviceClaim spcl = new serviceClaim(); if (ModelState.IsValid) { claim.claimdate = DateTime.Today.Date; claim.seen = false; spcl.Add(claim); spcl.Commit(); } return(RedirectToAction("index")); }