private void SetUpTextBoxes() { _currentBalance = LogOperations.GetBalanceExcludingToday(); try { Day selectedDay = LogOperations.GetSelectedDay(CurrentDate); _startTimeHour = selectedDay.StartTime.ToString("HH"); _startTimeMin = selectedDay.StartTime.ToString("mm"); _lunchInMin = selectedDay.LunchInMin; _endTimeHour = selectedDay.EndTime.ToString("HH"); _endTimeMin = selectedDay.EndTime.ToString("mm"); } catch (NullReferenceException) { _startTimeHour = "00"; _startTimeMin = "00"; _lunchInMin = 45; _endTimeHour = "00"; _endTimeMin = "00"; } catch (Exception e) { MessageBox.Show(e.Message); } }
private void UpdateBalance() { CurrentBalance = LogOperations.GetBalanceExcludingToday(); }