diff --git a/Back/Back.csproj b/Back/Back.csproj index 38e11a4..ac6c0cd 100644 --- a/Back/Back.csproj +++ b/Back/Back.csproj @@ -34,7 +34,7 @@ - ..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll + ..\..\Dlls\Service.dll diff --git a/Back/Controllers/VerificationController.cs b/Back/Controllers/VerificationController.cs index c05bc14..d19b02a 100644 --- a/Back/Controllers/VerificationController.cs +++ b/Back/Controllers/VerificationController.cs @@ -29,10 +29,18 @@ namespace Back.Controllers return BadRequest(resultValidationmodel.Errors.Select(s => s.ErrorMessage).ToList()); return Ok(new VerificationCodeDto { + ID = ID, + Code="", prm= _getVerificationValidation.verificationCode.prm, Type= _getVerificationValidation.verificationCode.Type, val= _getVerificationValidation.verificationCode.val - }); + });; + } + [HttpPost("Submit")] + [AllowAnonymous] + public async Task> Submit(VerificationCodeDto item) + { + return Ok(false); } } } diff --git a/Shared/DTOs/VerificationCodeDto.cs b/Shared/DTOs/VerificationCodeDto.cs index b6376d2..c20fb18 100644 --- a/Shared/DTOs/VerificationCodeDto.cs +++ b/Shared/DTOs/VerificationCodeDto.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -8,8 +9,15 @@ namespace Shared.DTOs { public class VerificationCodeDto { + [Required(ErrorMessage ="ID نمیتواند خالی باشد")] + public int ID { get; set; } + [Required(ErrorMessage = "کد نمیتواند خالی باشد")] + public string Code { get; set; } + [Required(ErrorMessage = "prm نمیتواند خالی باشد")] public string prm { get; set; } + [Required(ErrorMessage = "val نمیتواند خالی باشد")] public string val { get; set; } + [Required(ErrorMessage = "Type نمیتواند خالی باشد")] public string Type { get; set; } } } diff --git a/TaxPayerFull/Layout/TaxTools.razor b/TaxPayerFull/Layout/TaxTools.razor index 07bfc83..53d8869 100644 --- a/TaxPayerFull/Layout/TaxTools.razor +++ b/TaxPayerFull/Layout/TaxTools.razor @@ -118,6 +118,8 @@ editContext = new EditContext(modelTaxTools); messageStore = new(editContext); + + base.OnInitialized(); } // private void HandleValidationRequested(object? sender, diff --git a/TaxPayerFull/Pages/Verification.razor b/TaxPayerFull/Pages/Verification.razor index ec6a725..e976143 100644 --- a/TaxPayerFull/Pages/Verification.razor +++ b/TaxPayerFull/Pages/Verification.razor @@ -8,34 +8,30 @@