예제 #1
0
        public ActionResult Details(Guid claimId)
        {
            var claimModel = _claimService.GetById(claimId);
            var viewModel  = new UnderwriterClaimViewModel(claimModel);

            return(View(viewModel));
        }
예제 #2
0
        // GET: Claim/Details/5
        public ActionResult Details(int id)
        {
            /* var userId = (int)Session["idu"];
             * String Phone2 = userService.GetById(userId).login;
             * String mail = userService.GetById(userId).email;
             * ViewBag.home = mail;
             * ViewBag.phone = Phone2;*/
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Claim c;

            c = ClaimsService.GetById((int)id);
            if (c == null)
            {
                return(HttpNotFound());
            }
            ClaimModel cm = new ClaimModel()
            {
                ComplaintId = c.ComplaintId,

                Name        = c.Name,
                Description = c.Description,
                ClaimDate   = c.ClaimDate,
                ParentId    = c.ParentId,
                ClaimType   = c.ClaimType,
                status      = c.status
            };

            return(View(cm));
        }
예제 #3
0
        // GET: Claim/Details/5
        public ActionResult Details(int id)
        {
            //debut code khawla
            IUserService service   = new UserService();
            user         u         = service.GetById(User.Identity.GetUserId());
            string       firstName = u.firstName;
            string       lastName  = u.lastName;
            string       email     = u.Email;

            ViewBag.userFirstName = firstName;
            ViewBag.userLastName  = lastName;
            ViewBag.userMail      = email;
            ViewBag.sexe          = u.sexe.ToLower();
            //fin code khawla
            claim comm = cls.GetById(id);

            return(View(comm));
        }
예제 #4
0
        public ActionResult Edit(Guid id)
        {
            var claim = _claimService.GetById(id);
            //if (claim == null) return new HttpNotFoundResult("Claim Does Not Exist");
            var model = new EditClaimViewModel(claim);


            return(View(model));
        }
예제 #5
0
 public ActionResult Edit(Guid id)
 {
     try
     {
         var claimDomainModel = _claimService.GetById(id);
         var model            = new ClaimViewModel(claimDomainModel);
         return(View(model));
     }
     catch (ArgumentException)
     {
         return(View(new ClaimViewModel()));
     }
 }
예제 #6
0
        public ActionResult ViewClaim(Guid id)
        {
            try
            {
                ClaimDomainModel claimModel = _claimService.GetById(id);
                ClaimViewModel   viewModel  = new ClaimViewModel(claimModel);

                return(View(viewModel));
            }
            catch (ArgumentException e)
            {
                return(null);
            }
        }
예제 #7
0
        // GET: api/ClaimApi/5
        public Claim Get(int id)
        {
            Claim comp = MyService.GetById(id);

            return(comp);
        }
예제 #8
0
        // GET: api/authorization/1
        public IHttpActionResult Get(int id)
        {
            var group = _claimservice.GetById(id);

            return(Ok(group));
        }