...
This commit is contained in:
@@ -27,8 +27,7 @@
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label class="col-sm-4 col-form-label" for="inputinvoiceTypeTitle">نوع</label>
|
||||
@if (InvoiceID == 0 || InvoiceID == null ? false : true){
|
||||
<select @bind="invoice.invoiceType" disabled class="form-control" aria-label="Default select example" id="inputinvoiceTypeTitle">
|
||||
<select @bind="invoice.invoiceType" class="form-control" aria-label="Default select example" disabled id="inputinvoiceTypeTitle">
|
||||
@if (!invoice.invoiceType.HasValue)
|
||||
{
|
||||
<option value="0" style="color: #b5b5b5" selected>انتخاب کنید...</option>
|
||||
@@ -54,15 +53,8 @@
|
||||
}
|
||||
|
||||
|
||||
</select>
|
||||
}
|
||||
else
|
||||
{
|
||||
<select @bind="invoice.invoiceType" class="form-control" aria-label="Default select example" disabled id="inputinvoiceTypeTitle">
|
||||
<option value="10" style="color: #b5b5b5" selected>پیشنهاد قیمت</option>
|
||||
|
||||
</select>
|
||||
}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
@@ -188,7 +180,7 @@
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<br />
|
||||
@if (invoice.ID == 0)
|
||||
@if(InvoiceID == 0 || InvoiceID == null)
|
||||
{
|
||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
||||
جدید
|
||||
@@ -249,6 +241,7 @@
|
||||
{
|
||||
invoice = new InvoiceDTO()
|
||||
{
|
||||
invoiceType=InvoiceType.Bidding,
|
||||
ID = 0,
|
||||
InvoiceDate = DateTime.Now.ConvertMiladiToShamsiinFront().ShamciToFormatShamciinFront(),
|
||||
InvoicIssueDate = DateTime.Now.ConvertMiladiToShamsiinFront().ShamciToFormatShamciinFront(),
|
||||
@@ -345,7 +338,7 @@
|
||||
var request = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||
if (request)
|
||||
{
|
||||
ToastService.Notify(new ToastMessage(ToastType.Success, $"عملیات حذف با موفقیت انجام شد"));
|
||||
//ToastService.Notify(new ToastMessage(ToastType.Success, $"عملیات حذف با موفقیت انجام شد"));
|
||||
hc._nav.NavigateTo("Invoice");
|
||||
}
|
||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||
@@ -371,18 +364,19 @@
|
||||
ID = InvoiceID,
|
||||
CustomerID = invoice.CustomerID,
|
||||
Des = invoice.Des,
|
||||
InvoiceDate = invoice.InvoiceDate,
|
||||
InvoicIssueDate = invoice.InvoicIssueDate,
|
||||
InvoiceDate = invoice.InvoiceDate.Replace("/", ""),
|
||||
InvoicIssueDate = invoice.InvoicIssueDate.Replace("/", ""),
|
||||
PatternID = invoice.PatternID,
|
||||
Title = invoice.Title
|
||||
});
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
var request = await rsp.Content.ReadFromJsonAsync<int>();
|
||||
var request = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||
|
||||
if (request > 0)
|
||||
if (request)
|
||||
{
|
||||
InvoiceID = request;
|
||||
ToastService.Notify(new ToastMessage(ToastType.Success, $"عملیات با موفقیت انجام شد"));
|
||||
|
||||
}
|
||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||
}
|
||||
|
Reference in New Issue
Block a user