Cảnh báo nếu có tiền ở các ngăn
This commit is contained in:
+24
@@ -8,6 +8,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -16,6 +17,7 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SafeBagDE70
|
||||
@@ -82,7 +84,22 @@ namespace SafeBagDE70
|
||||
}
|
||||
|
||||
}
|
||||
public static void RestartApp()
|
||||
{
|
||||
if (AppData.IsInTransaction)
|
||||
{
|
||||
MessageBox.Show("LƯU Ý, THAO TÁC NÀY SẼ LÀM MẤT TẤT CẢ DỮ LIỆU ĐANG THAO TÁC. " +
|
||||
"HÃY HOÀN TẤT GIAO DỊCH ĐỂ TIẾP TỤC", "CẢNH BÁO", MessageBoxButton.OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
string exePath = Process.GetCurrentProcess().MainModule.FileName;
|
||||
|
||||
Process.Start(exePath);
|
||||
|
||||
System.Windows.Application.Current.Shutdown();
|
||||
}
|
||||
}
|
||||
public static void InitDeviceStatus()
|
||||
{
|
||||
DeviceStatus = new DeviceStatus
|
||||
@@ -417,6 +434,13 @@ namespace SafeBagDE70
|
||||
if (nCount > 0) bResult = true;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (!IsInTransaction)
|
||||
{
|
||||
await APIModels.UpdateDeviceCommand(command.Id,1);
|
||||
RestartApp();
|
||||
}
|
||||
break;
|
||||
}
|
||||
//
|
||||
if(bResult)
|
||||
|
||||
Reference in New Issue
Block a user