check only InitDE70 to continue

This commit is contained in:
Nguyen Dinh Thuan
2024-09-17 15:51:44 +07:00
parent 0ea0f79351
commit c04d43fa63
7 changed files with 94 additions and 7 deletions
+63 -2
View File
@@ -60,6 +60,7 @@ namespace SafeBagDE70
static AppData()
{
CDMSTATE = new CDMSTATE();
ADMINDEVICESTATUS = new ADMINDEVICESTATUS();
//InitDeviceStatus();
}
public static void Init()
@@ -148,7 +149,8 @@ namespace SafeBagDE70
return bInitUser;
}
public static CDMSTATE? CDMSTATE = null;
private static DateTime CutOffTime = new DateTime(1, 1, 1, 12, 0, 0); // 12:00 noon as cut-off time
public static ADMINDEVICESTATUS? ADMINDEVICESTATUS = null;
private static DateTime CutOffTime = new DateTime(1, 1, 1, 11, 0, 0); // 11:00 a.m as cut-off time
public static string GetNumberPartFromMerchantCode(string merchantCode)
{
@@ -175,7 +177,7 @@ namespace SafeBagDE70
CurrentCustomerAccount.TransactionCount++;
}
var transactionCount = CurrentCustomerAccount.TransactionCount;
string datePart = adjustedDate.ToString("yyyyMMdd");
string datePart = transactionDateTime.ToString("yyyyMMdd");
string timePart = transactionDateTime.ToString("HHmmss");
string transactionCountPart = transactionCount.ToString("D2"); // Ensure 2 digits
@@ -413,6 +415,65 @@ namespace SafeBagDE70
AUTOEND=1,
FULLIFSTORE=2
}
public class ADMINDEVICESTATUS : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
private string? _PrinterStatus;
public string? Printertatus
{
get
{
return _PrinterStatus;
}
set
{
if (_PrinterStatus != value)
{
_PrinterStatus = value;
OnPropertyChanged(nameof(Printertatus));
}
}
}
private string? _SensorStatus;
public string? SensorStatus
{
get
{
return _SensorStatus;
}
set
{
if (_SensorStatus != value)
{
_SensorStatus = value;
OnPropertyChanged(nameof(SensorStatus));
}
}
}
private string? _DeviceStatus;
public string? DeviceStatus
{
get
{
return _DeviceStatus;
}
set
{
if (_DeviceStatus != value)
{
_DeviceStatus = value;
OnPropertyChanged(nameof(DeviceStatus));
}
}
}
}
public class CDMSTATE : INotifyPropertyChanged
{
public int IsCassetteFull = 0;