Example #1
0
 public async Task <string> ImportWithDates(PrivatImportViewModel model)
 {
     try
     {
         return(await PrivatImporter.Import(model.Card, model.IdMerchant.ToString(), model.Password, Convert.ToDateTime(model.DataFrom), Convert.ToDateTime(model.DataTo)));
     }
     catch (Exception ex)
     {
         throw new BusinessLogicException(ex.Message, ex);
     }
 }
 public IActionResult PrivatImport([FromBody] PrivatImportViewModel model)
 {
     try
     {
         return(Ok(_service.ImportWithDates(model)));
     }
     catch (Exception ex)
     {
         throw new  Exception(ex.Message, ex);
     }
 }