InitUser after download
This commit is contained in:
@@ -41,6 +41,14 @@ namespace SafeBagDE70.Admin
|
|||||||
private async void btnGetUsers_Click(object sender, RoutedEventArgs e)
|
private async void btnGetUsers_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
try
|
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);
|
var amCustomers = await APIModels.GetAeonMallCustomers(AppData.TenantId);
|
||||||
using (var context = new CDMDbContext())
|
using (var context = new CDMDbContext())
|
||||||
@@ -66,6 +74,8 @@ namespace SafeBagDE70.Admin
|
|||||||
lblStatus.Foreground = new SolidColorBrush(Colors.Green);
|
lblStatus.Foreground = new SolidColorBrush(Colors.Green);
|
||||||
lblStatus.Content = "Updated customers: " + amCustomers.Count;
|
lblStatus.Content = "Updated customers: " + amCustomers.Count;
|
||||||
}
|
}
|
||||||
|
AppData.InitUsers();
|
||||||
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
lblStatus.Foreground = new SolidColorBrush(Colors.Red);
|
lblStatus.Foreground = new SolidColorBrush(Colors.Red);
|
||||||
|
|||||||
+1
-1
@@ -68,7 +68,7 @@ namespace SafeBagDE70
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool InitUsers()
|
public static bool InitUsers()
|
||||||
{
|
{
|
||||||
int retryCount = 0;
|
int retryCount = 0;
|
||||||
int maxRetries = 20; // Max retries before giving up
|
int maxRetries = 20; // Max retries before giving up
|
||||||
|
|||||||
Reference in New Issue
Block a user