- Dừng máy khi phát hiện lỗi
- Log thông tin khi đăng nhập
This commit is contained in:
@@ -66,7 +66,7 @@ namespace SafeBagDE70
|
||||
}
|
||||
private void LoginButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
Log.Information("Login sử dụng PINCODE");
|
||||
string pin = PinCodeBox.Text;
|
||||
|
||||
if (ValidatePin(pin))
|
||||
@@ -89,10 +89,14 @@ namespace SafeBagDE70
|
||||
((MainWindow)Application.Current.MainWindow).ShowDepositScreen();
|
||||
//DialogResult = true;
|
||||
//this.Close();
|
||||
var str = "Login Pincode thành công";
|
||||
Log.Information(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblPincodeError.Content = "PINCODE không đúng, vui lòng thử lại";
|
||||
var str = "PINCODE không đúng, vui lòng thử lại";
|
||||
Log.Information(str);
|
||||
lblPincodeError.Content =str ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,6 +191,8 @@ namespace SafeBagDE70
|
||||
}
|
||||
private void OnBarcodeEvent(short eventType, ref string pscanData)
|
||||
{
|
||||
var str = "Login QRCODE thành công";
|
||||
Log.Information(str);
|
||||
string xmlString = pscanData;
|
||||
XmlDocument xmlDoc = new XmlDocument();
|
||||
xmlDoc.LoadXml(xmlString);
|
||||
@@ -216,10 +222,14 @@ namespace SafeBagDE70
|
||||
AppData.CurrentCustomerAccount = cca;
|
||||
AppData.CreateNewTransactionCode();
|
||||
((MainWindow)Application.Current.MainWindow).ShowDepositScreen();
|
||||
str = "Login QRCode thành công";
|
||||
Log.Information(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblQRcodeError.Content = "QRCODE không đúng, vui lòng thử lại";
|
||||
str = "QRCODE không đúng, vui lòng thử lại";
|
||||
Log.Information(str);
|
||||
lblQRcodeError.Content = str;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,10 +276,10 @@ namespace SafeBagDE70
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Dispatcher.Invoke(() =>
|
||||
{
|
||||
lblQRcodeError.Content = "CRC is invalid.";
|
||||
});
|
||||
//this.Dispatcher.Invoke(() =>
|
||||
//{
|
||||
// lblQRcodeError.Content = "CRC is invalid.";
|
||||
//});
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user