...
This commit is contained in:
@@ -149,12 +149,12 @@
|
||||
itemsearch.PageIndex = pi;
|
||||
PreloadService.Show(SpinnerColor.Dark);
|
||||
var rsp = await hc.Post<ItemSerachOrder>("Orderss/GetAllOrder",itemsearch);
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
request = await rsp.Content.ReadFromJsonAsync<Shared.DTOs.PagingDto<OrderDto>?>();
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
request = await rsp.Content.ReadFromJsonAsync<Shared.DTOs.PagingDto<OrderDto>?>();
|
||||
else
|
||||
ShowDangerAlert("خطایی در بارگیری سفارشات رخ داده");
|
||||
ShowDangerAlert("خطایی در بارگیری سفارشات رخ داده");
|
||||
PreloadService.Hide();
|
||||
|
||||
|
||||
}
|
||||
private void ShowSuccessAlert(string msg)
|
||||
{
|
||||
@@ -170,8 +170,8 @@
|
||||
alertIconName = IconName.ExclamationTriangleFill;
|
||||
alertMessage = msg;
|
||||
}
|
||||
|
||||
public async Task CallBackCodItem(ActionInResultComponent result)
|
||||
|
||||
public async Task CallBackItem(ActionInResultComponent result)
|
||||
{
|
||||
|
||||
if (result.Action == ComponentAction.add)
|
||||
@@ -188,7 +188,7 @@
|
||||
else if (result.Action == ComponentAction.delete)
|
||||
{
|
||||
if (result.Status == ComponentStatus.success)
|
||||
ShowSuccessAlert("سفارش با کنسل شد");
|
||||
ShowSuccessAlert("سفارش ابطال شد");
|
||||
}
|
||||
|
||||
if (result.Status == ComponentStatus.success)
|
||||
@@ -198,13 +198,12 @@
|
||||
}
|
||||
public async Task OrderItem(int ID)
|
||||
{
|
||||
// var parameters = new Dictionary<string, object>();
|
||||
var parameters = new Dictionary<string, object>();
|
||||
|
||||
// if (ID == 0) parameters.Add("Cod", new RCOD() { ID = 0 });
|
||||
// else parameters.Add("Cod", request.list.Where(w => w.ID == ID).First().Clone());
|
||||
// parameters.Add("Unitrequest", Unitrequest);
|
||||
// parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create<ActionInResultComponent>(this, CallBackCodItem));
|
||||
// await modal.ShowAsync<CodItem>(title: ID == 0 ? "کالا جدید" : "ویرایش اطلاعات", parameters: parameters);
|
||||
var item = request.list.Where(w => w.ID == ID).First().Clone();
|
||||
parameters.Add("order", item);
|
||||
parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create<ActionInResultComponent>(this, CallBackItem));
|
||||
await modal.ShowAsync<CodItem>(title:$"سفارش {ID}", parameters: parameters);
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user