示例#1
0
        public async Task <ActionResult> DoCheckIn(int projectId, int claimId, int money, Checkbox?feeAccepted)
        {
            var claim = await ClaimsRepository.GetClaim(projectId, claimId);

            if (claim == null)
            {
                return(HttpNotFound());
            }
            try
            {
                await ClaimService.CheckInClaim(projectId, claimId, feeAccepted == Checkbox.@on?money : 0);

                return(RedirectToAction("Index", new { projectId }));
            }
            catch (Exception ex)
            {
                ModelState.AddException(ex);
                return(await ShowCheckInForm(claim));
            }
        }