Esempio n. 1
0
        private void btnSubmitMakeBooking_Click(object sender, EventArgs e)
        {
            Booking booking = new Booking();

            booking.Dentist         = txtDentist.Text;
            booking.AppointmentDate = txtNotesMakeBooking.Text;
            booking.ExaminationType = txtExaminationType.Text;

            booking.Additionalnotes = txtNotesMakeBooking.Text;
            Boolean answer = dbConn.InsertNewBookingToDB(booking);

            if (answer == true)
            {
                MessageBox.Show("New booking is inserted.");
                cboxAppointmentDate.Items.Clear();
                txtExaminationType.ResetText();
                txtDentist.ResetText();
                txtNotesMakeBooking.ResetText();
            }
            else
            {
                MessageBox.Show("Invalid input.");
            }
        }