InitUser after download

This commit is contained in:
thuannd88
2024-09-16 19:27:35 +07:00
parent 26ba949d1f
commit 2e94ba03ac
2 changed files with 32 additions and 22 deletions
+10
View File
@@ -41,6 +41,14 @@ namespace SafeBagDE70.Admin
private async void btnGetUsers_Click(object sender, RoutedEventArgs e)
{
try
{
if(AppData.IsInTransaction)
{
lblStatus.Foreground = new SolidColorBrush(Colors.Red);
lblStatus.Content = "Vui lòng kết thúc giao dịch để thực hiện chức năng này";
}
else
{
var amCustomers = await APIModels.GetAeonMallCustomers(AppData.TenantId);
using (var context = new CDMDbContext())
@@ -66,6 +74,8 @@ namespace SafeBagDE70.Admin
lblStatus.Foreground = new SolidColorBrush(Colors.Green);
lblStatus.Content = "Updated customers: " + amCustomers.Count;
}
AppData.InitUsers();
}
catch(Exception ex)
{
lblStatus.Foreground = new SolidColorBrush(Colors.Red);
+1 -1
View File
@@ -68,7 +68,7 @@ namespace SafeBagDE70
}
private static bool InitUsers()
public static bool InitUsers()
{
int retryCount = 0;
int maxRetries = 20; // Max retries before giving up