Пример #1
0
        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"));
        }
Пример #2
0
        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));
        }
Пример #3
0
        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"));
        }