Exemplo n.º 1
0
        private void NewWorkDay_Click(object sender, RoutedEventArgs e)
        {
            DateTime SelectedDate;

            if (wCalendar.SelectedDate.HasValue)
            {
                SelectedDate = wCalendar.SelectedDate.Value;
            }
            else
            {
                SelectedDate = DateTime.Today;
            }
            NewWorkDayForm NewPage = new NewWorkDayForm(SelectedDate);

            this.NavigationService.Navigate(NewPage);
        }
Exemplo n.º 2
0
        private void EditWorkDay_Click(object sender, RoutedEventArgs e)
        {
            DateTime SelectedDate;

            if (wCalendar.SelectedDate.HasValue)
            {
                SelectedDate = wCalendar.SelectedDate.Value;
            }
            else
            {
                SelectedDate = DateTime.Today;
            }
            DayInfo SelectedDayInfo = new DayInfo();

            SelectedDayInfo.FillDayInfo(SelectedDate, iPS.Text, iAddr.Text, iWorkTime.Text, Convert.ToInt32(iCost.Text), Convert.ToBoolean(IsGSM.IsChecked));
            NewWorkDayForm NewPage = new NewWorkDayForm(SelectedDayInfo);

            this.NavigationService.Navigate(NewPage);
        }