Ejemplo n.º 1
0
 private void CreateButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         pep.AddHours(new Hours(double.Parse(HoursTextbox.Text), CalendarSelecter.SelectedDate.Value, EventNameTextBox.Text));
         Database.Update(pep);
         HoursListView.ItemsSource = pep.AllHours;
         HoursListView.Items.Refresh();
         ImageRank();
     }
     catch
     {
         MessageBox.Show("Make sure everything is filled out, and in the right format");
     }
 }
Ejemplo n.º 2
0
        private void CreateButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
            pep.AddHours(new Hours(double.Parse(HoursTextbox.Text), CalendarBox.SelectedDate.Value, EventNameTextBox.Text));
            Database.Update(pep);
            HoursListBox.ItemsSource = pep.AllHours;
            HoursListBox.Items.Refresh();
            }

            catch (System.FormatException)
            {
                MessageBox.Show("Make sure everything is the right format");
            }
            catch (System.InvalidOperationException)
            {
                MessageBox.Show("Make sure everything is selected");
            }

        }