2024-04-14 16:09:36 +03:30
|
|
|
@using Front.Pages
|
|
|
|
@using Shared.DTOs
|
|
|
|
@inject HttpClient _hc
|
|
|
|
|
|
|
|
<div class="contact-info-area pb-90" id="contact">
|
2024-03-29 17:44:38 +03:30
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="contact-form-area pb-120">
|
|
|
|
<div class="container">
|
|
|
|
<div class="row gx-0">
|
|
|
|
<div class="col-xl-5 col-lg-6">
|
|
|
|
<div class="contact-form-left">
|
|
|
|
<div class="contact-form-section-box pb-80">
|
|
|
|
<h5 class="inner-section-subtitle">ارتباط با ما</h5>
|
|
|
|
<h4 class="tp-section-title pb-10">
|
|
|
|
ما مشتاقانه منتظر <br> نظرات شما هستیم
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
<div class="contact-form-social-box p-relative">
|
|
|
|
|
|
|
|
<div class="contact-form-section-img">
|
|
|
|
<img src="img/contact/contact-icon-sm-4.png" alt="">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-xl-7 col-lg-6">
|
|
|
|
<div class="contact-form-right-warp">
|
|
|
|
<div class="postbox__comment-form">
|
2024-04-14 16:09:36 +03:30
|
|
|
<EditForm EditContext="editContext" OnValidSubmit="newTicket">
|
|
|
|
<DataAnnotationsValidator />
|
|
|
|
<div class="postbox__comment-input mb-35">
|
|
|
|
<ValidationMessage For="()=>model.FullName" />
|
|
|
|
<ValidationMessage For="()=>model.Mobile" />
|
|
|
|
<ValidationMessage For="()=>model.Title" />
|
|
|
|
<ValidationMessage For="()=>model.Text" />
|
|
|
|
</div>
|
2024-03-29 17:44:38 +03:30
|
|
|
<div class="row gx-20">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="postbox__comment-input mb-30">
|
2024-04-14 16:09:36 +03:30
|
|
|
<InputText @bind-Value="model.FullName" id="FullName" type="text" class="inputText" required="" />
|
2024-03-29 17:44:38 +03:30
|
|
|
<span class="floating-label">نام شما</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="postbox__comment-input mb-35">
|
2024-04-14 16:09:36 +03:30
|
|
|
<InputText @bind-Value="model.Mobile" id="Mobile" type="text" class="inputText" required=""/>
|
|
|
|
<span class="floating-label">موبایل</span>
|
2024-03-29 17:44:38 +03:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-12">
|
2024-04-14 16:09:36 +03:30
|
|
|
<div class="postbox__comment-input mb-35">
|
|
|
|
<InputText @bind-Value="model.Title" id="Title" type="text" class="inputText" required=""/>
|
|
|
|
<span class="floating-label">عنوان</span>
|
2024-03-29 17:44:38 +03:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-xxl-12">
|
|
|
|
<div class="postbox__comment-input mb-30">
|
2024-04-14 16:09:36 +03:30
|
|
|
<InputText @bind-Value="model.Text" id="Text" class="textareaText" required=""></InputText>
|
2024-03-29 17:44:38 +03:30
|
|
|
<span class="floating-label-2">پیام شما ...</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-xxl-12">
|
|
|
|
<div class="postbox__btn-box">
|
2024-04-14 16:09:36 +03:30
|
|
|
<button type="submit" class="submit-btn w-100">ارسال پیام</button>
|
2024-03-29 17:44:38 +03:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-14 16:09:36 +03:30
|
|
|
</EditForm>
|
2024-03-29 17:44:38 +03:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@code {
|
2024-04-14 16:09:36 +03:30
|
|
|
string type = "NewTicketNoAuthentication";
|
|
|
|
private EditContext? editContext;
|
|
|
|
[SupplyParameterFromForm]
|
|
|
|
private CTicketNoAuthenticationDto? model { get; set; } = new CTicketNoAuthenticationDto();
|
|
|
|
|
|
|
|
private ValidationMessageStore? messageStore;
|
|
|
|
|
|
|
|
protected override void OnInitialized()
|
|
|
|
{
|
|
|
|
// modelTaxTools ??= new();
|
|
|
|
// editContext = new(modelTaxTools);
|
|
|
|
// editContext.OnValidationRequested += HandleValidationRequested;
|
|
|
|
// messageStore = new(editContext);
|
|
|
|
|
|
|
|
editContext = new EditContext(model);
|
|
|
|
messageStore = new(editContext);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@functions{
|
|
|
|
private async Task newTicket(){
|
|
|
|
|
|
|
|
// var request = await _hc.PostAsJsonAsync("Ticket/NewTicketNoAuthentication", model);
|
|
|
|
// if (request.IsSuccessStatusCode)
|
|
|
|
// {
|
|
|
|
// messageStore?.Clear();
|
|
|
|
// var res = await request.Content.ReadFromJsonAsync<VerificationCodeDto>();
|
|
|
|
Verification pa = new Verification();
|
|
|
|
pa.model = new VerificationCodeDto
|
|
|
|
{
|
|
|
|
prm =" Ticket.ID.ToString()",
|
|
|
|
val = "item.Mobile",
|
|
|
|
Type = "NewTicketNoAuthentication"
|
|
|
|
};
|
|
|
|
await Task.Run(()=>pa);
|
|
|
|
// }
|
|
|
|
// else
|
|
|
|
// {
|
|
|
|
// var error = await request.Content.ReadFromJsonAsync<List<string>>();
|
|
|
|
// messageStore?.Add(() => model.Mobile, error);
|
2024-03-29 17:44:38 +03:30
|
|
|
|
2024-04-14 16:09:36 +03:30
|
|
|
// }
|
|
|
|
}
|
2024-03-29 17:44:38 +03:30
|
|
|
}
|