コード例 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (subjectComboBox.Text == "")
     {
         MessageBox.Show("Pole wyboru przedmiotu nie może być puste!", "Błąd", MessageBoxButtons.OK);
     }
     else
     {
         DateTime tmp  = monthCalendar1.SelectionStart;
         string   data = null;
         data += String.Format("{0}-{1}-{2}", tmp.Year, tmp.Month, tmp.Day);
         string poczatek, koniec;
         poczatek = String.Format("{0}:{1}:00", startHour.Value, startMinutes.Value);
         koniec   = String.Format("{0}:{1}:00", endHour.Value, endMinutes.Value);
         OG.msql.InsertLesson(Dane[0], data, poczatek, koniec, stringChecker(subjectComboBox.Text));
         OG.boldDates();
         OG.datePicked();
         Close();
     }
 }