ensure no duplicates
This commit is contained in:
parent
6323461b75
commit
a43ec43e7f
2 changed files with 16 additions and 2 deletions
|
@ -43,6 +43,7 @@ public partial class CrmCompanyInventoryPage : IDisposable
|
||||||
Interceptor.RegisterBeforeSendEvent();
|
Interceptor.RegisterBeforeSendEvent();
|
||||||
|
|
||||||
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
||||||
|
|
||||||
while (string.IsNullOrWhiteSpace(Company.HistorySync))
|
while (string.IsNullOrWhiteSpace(Company.HistorySync))
|
||||||
{
|
{
|
||||||
await Task.Delay(1000);
|
await Task.Delay(1000);
|
||||||
|
@ -52,6 +53,7 @@ public partial class CrmCompanyInventoryPage : IDisposable
|
||||||
{
|
{
|
||||||
await Task.Delay(1000);
|
await Task.Delay(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
await FetchInventory();
|
await FetchInventory();
|
||||||
Working = false;
|
Working = false;
|
||||||
}
|
}
|
||||||
|
@ -68,4 +70,4 @@ public partial class CrmCompanyInventoryPage : IDisposable
|
||||||
{
|
{
|
||||||
Interceptor.DisposeEvent();
|
Interceptor.DisposeEvent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,18 @@ public partial class CrmCompanyInvoiceListPage : IDisposable
|
||||||
{
|
{
|
||||||
Interceptor.RegisterEvent();
|
Interceptor.RegisterEvent();
|
||||||
Interceptor.RegisterBeforeSendEvent();
|
Interceptor.RegisterBeforeSendEvent();
|
||||||
|
|
||||||
|
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
||||||
|
|
||||||
|
while (string.IsNullOrWhiteSpace(Company.HistorySync))
|
||||||
|
{
|
||||||
|
await Task.Delay(1000);
|
||||||
|
}
|
||||||
|
var ts = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
|
||||||
|
while (string.IsNullOrWhiteSpace(ts))
|
||||||
|
{
|
||||||
|
await Task.Delay(1000);
|
||||||
|
}
|
||||||
|
|
||||||
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
||||||
|
|
||||||
|
@ -44,4 +56,4 @@ public partial class CrmCompanyInvoiceListPage : IDisposable
|
||||||
{
|
{
|
||||||
Interceptor.DisposeEvent();
|
Interceptor.DisposeEvent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue