Untitled
unknown
plain_text
a year ago
825 B
8
Indexable
protected override async void OnAppearing()
{
base.OnAppearing();
try
{
var timeEntry = await _firebaseHelper.GetTodaysTimeEntryAsync(
_currentInstructors.ID,
SubjectCodeLabel.Text
);
if (timeEntry != null)
{
TimeInLabel.Text = $"Time In: {timeEntry.TimeIn:g}";
TimeOutLabel.Text = timeEntry.TimeOut.HasValue
? $"Time Out: {timeEntry.TimeOut.Value:g}"
: "Time Out: Not yet logged";
}
else
{
TimeInLabel.Text = "Time In: No entry today";
TimeOutLabel.Text = "Time Out: No entry today";
}
}
catch (Exception ex)
{
await DisplayAlert("Error", $"An error occurred: {ex.Message}", "OK");
}
}
Editor is loading...
Leave a Comment