示例#1
0
        private void btnListAppointments_Click(object sender, EventArgs e)
        {
            //create instance of form
            frmListOfAppointments ListAppointments = new frmListOfAppointments();

            //show form
            ListAppointments.Show();
        }
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            // Display a message box informing the user of there selection
            MessageBox.Show("You are about to update appointment?", "My Application",
                            //Displays Ok or cancel as buttons
                            MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);
            //create instance of form
            frmListOfAppointments MyList = new frmListOfAppointments();

            //refresh List
            MyList.Refresh();
            //close form
            Close();
        }
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (txtAppointmentDate.Text == "")
     {
         lblError.Text = "Please fill in all fields to continue!";
     }
     else
     {
         // Display a message box informing the user of there selection
         MessageBox.Show("You are about to add an appointment?", "My Application",
                         //Displays Ok or cancel as buttons
                         MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);
         //create instance of form
         frmListOfAppointments MyList = new frmListOfAppointments();
         //refresh List
         MyList.Refresh();
         //close form
         Close();
     }
 }
示例#4
0
 private void btnBook_Click(object sender, EventArgs e)
 {
     //if statement to make sure that text box has a value before submitting the form
     if (txtAppointmentDetails.Text == "")
     {
         lblError.Text = "Please fill in appointment details";
     }
     else
     {
         // Display a message box informing the user of there selection
         MessageBox.Show("You are about to make an appointment. Do you want to continue?", "My Application",
                         //Displays Ok or cancel as buttons
                         MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);
         //create instance of form
         frmListOfAppointments MyList = new frmListOfAppointments();
         //refresh List
         MyList.Refresh();
         //close form
         Close();
     }
 }