LaneOut - Change lblStatusInfo Text, Display lblMoneyAmount

This commit is contained in:
DucDangAnh 2020-07-01 10:48:49 +07:00
parent be4b3b184a
commit d541accb33
2 changed files with 9 additions and 1 deletions

View File

@ -70,7 +70,7 @@ namespace AIParkingApplication
if (cardInfoResult.Direction != "out")
{
lblStatusInfo.UpdateLabel("THẺ ĐÃ ĐƯỢC SỬ DỤNG", Color.Red);
lblStatusInfo.UpdateLabel("CHƯA NHẬN THẺ VÀO", Color.Red);
return;
}
@ -95,6 +95,9 @@ namespace AIParkingApplication
ShowCardInfoOnUI(cardNumber, result.PlateString, cardInformation.CardType, DateTime.Now.ToString(AppConstant.DATETIME_FORMAT));
var saveLogResult = await apiController.SaveLog(LaneDirection.Out, cardInformation.CardRealID.ToString(), "1", result.PlateType, DateTime.Now.ToString(AppConstant.DATETIME_FORMAT), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame, cardInformation.LogID.ToString());
int.TryParse(saveLogResult.Cost, out int moneyAmount);
lblMoneyAmount.Text = $"Số tiền: {string.Format("{0:n0}", moneyAmount)} vnđ";
if (saveLogResult.Status)
{
if (isAutoOpenDoor)

View File

@ -123,6 +123,11 @@ namespace AIParkingApplication
return image;
}
}
public static string GetTimeFormatted(this DateTime dateTime)
{
return dateTime.ToString(AppConstant.DATETIME_FORMAT);
}
}
public class PlateRequestEngineModel