Example #1
0
        private void AddNewWorkTimePeriodButton_OnClick(object sender, RoutedEventArgs e)
        {
            if (_selectedDay == null)
                return;

            var newTimePeriodWindow = new NewTimePeriodWindow();
            newTimePeriodWindow.ShowDialog();
            if (newTimePeriodWindow.DialogResult == true)
            {
                _selectedDay.WorkTimePeriods.Add(newTimePeriodWindow.SelectedTimePeriod);
            }

            RefreshSummaries();
        }
Example #2
0
        private void AddNewBreakTimePeriodButton_OnClick(object sender, RoutedEventArgs e)
        {
            if (_selectedDay == null)
            {
                return;
            }

            var newTimePeriodWindow = new NewTimePeriodWindow();

            newTimePeriodWindow.ShowDialog();
            if (newTimePeriodWindow.DialogResult == true)
            {
                _selectedDay.BreakTimePeriods.Add(newTimePeriodWindow.SelectedTimePeriod);
            }

            RefreshSummaries();
        }