コード例 #1
0
        public async Task <ActionResult> ChangeFee(int claimid, int projectid, int feeValue)
        {
            var claim = await _claimsRepository.GetClaim(projectid, claimid);

            var error = WithClaim(claim);

            if (error != null)
            {
                return(error);
            }
            try
            {
                if (!ModelState.IsValid)
                {
                    return(await Edit(projectid, claimid));
                }

                await
                FinanceService.ChangeFee(claim.ProjectId, claim.ClaimId, feeValue, CurrentUserId);

                return(RedirectToAction("Edit", "Claim", new { claimid, projectid }));
            }
            catch
            {
                return(await Edit(projectid, claimid));
            }
        }
コード例 #2
0
        public async Task <ActionResult> ChangeFee(int claimid, int projectid, int feeValue)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(await Edit(projectid, claimid));
                }

                await
                FinanceService.ChangeFee(projectid, claimid, feeValue);

                return(RedirectToAction("Edit", "Claim", new { claimid, projectid }));
            }
            catch
            {
                return(await Edit(projectid, claimid));
            }
        }