Ejemplo n.º 1
0
 public async Task RegisterVat(RegisterVat command)
 {
     try
     {
         await _client.RegisterVat(command);
     }
     catch (System.Exception e)
     {
         throw e.InnerException;
     }
 }
Ejemplo n.º 2
0
 public async Task <IActionResult> Register([FromForm] ContractManagementNewViewModel inputModel)
 {
     if (ModelState.IsValid)
     {
         return(await _resiliencyHelper.ExecuteResilient(async() =>
         {
             RegisterVat cmd = Mapper.Map <RegisterVat>(inputModel.Vat);
             await _contractManagementAPI.RegisterVat(cmd);
             return RedirectToAction("Index");
         }, View("Offline", new ContractManagementOfflineViewModel())));
     }
     else
     {
         return(View("New", inputModel));
     }
 }