void Claim_PropertyChanged(object sender, PropertyChangedEventArgs e) { CreateClaimCommand.RaiseCanExecuteChanged(); ConfirmClaimCommand.RaiseCanExecuteChanged(); DeleteClaimCommand.RaiseCanExecuteChanged(); UnConfirmClaimCommand.RaiseCanExecuteChanged(); RejectClaimCommand.RaiseCanExecuteChanged(); UnRejectClaimCommand.RaiseCanExecuteChanged(); CloseClaimCommand.RaiseCanExecuteChanged(); UnCloseClaimCommand.RaiseCanExecuteChanged(); MakeProblemCommand.RaiseCanExecuteChanged(); ResolvProblemClaimCommand.RaiseCanExecuteChanged(); AnnulateClaimCommand.RaiseCanExecuteChanged(); }
public async Task CreateClaims(Model.UserClaim claim) { var claimObj = claim.MapToClaimDataModel(); await unitOfWork.ClaimRepository.Create(claimObj); await unitOfWork.Complete(); var createTransferCommand = new CreateClaimCommand( claimObj.ClaimId.ToString(), claimObj.DateOfAccident ?? DateTime.Now, claimObj.FirstName ); await _bus.SendCommand(createTransferCommand); }
public IActionResult Post([FromBody] CreateClaimCommand command) { if (command == null) { return(BadRequest()); } ////VAlidation //if (command. == string.Empty || command.LastName == string.Empty) //{ // ModelState.AddModelError("Name/FirstName", "The name or first name shouldn't be empty"); //} if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var createdClaimId = (_mediator.Send(command)).Result.Data; Claim createdClaim = GetClaimById(createdClaimId); return(Created("Claim", createdClaim)); }
public Task <int> CreateClaim(CreateClaimCommand command) { throw new NotImplementedException(); }
public async Task <ActionResult> Create([FromBody] CreateClaimCommand command) { return(CreatedAtAction(nameof(Get), new { claimId = await _mediator.Send(command) })); }
public async Task <IActionResult> Post(CreateClaimCommand command) { return(Ok(await _mediator.Send(command))); }