Ejemplo n.º 1
0
        public MedicalCentrePatientOptionsMainForm(int patientID)
        {
            this.Text = "Medical Centre: Patient's Options";
            InitializeComponent();

            GetGreeting(patientID);
            InitializePatientsBookings(dataGridViewPatientBookings, patientID);
            InitializePatientsPayments(dataGridViewPatientPayments, patientID);
            MedicalCentreUpdatePatient medicalCentreUpdatePatient = new MedicalCentreUpdatePatient(patientID);

            buttonUpdateInformation.Click += (s, e) => ChildPatientActionsForm(medicalCentreUpdatePatient, patientID);

            MedicalCentreBookAppointment bookAppointment = new MedicalCentreBookAppointment(patientID);

            buttonBookAppointment.Click += (s, e) => ChildPatientActionsForm(bookAppointment, patientID);
        }
        public MedicalCentrePatientOptionsMainForm(int customerID)
        {
            InitializeComponent();
            // set up form controls
            InitializeFormInformation(customerID);

            // create and add to button click Child forms
            MedicalCentreUpdatePatient medicalCentreUpdatePatient = new MedicalCentreUpdatePatient(customerID);

            buttonUpdateInformation.Click += (s, e) => ChildPatientActionsForm(medicalCentreUpdatePatient, customerID);
            MedicalCentreBookAppointment bookAppointment = new MedicalCentreBookAppointment(customerID);

            buttonBookAppointment.Click += (s, e) => ChildPatientActionsForm(bookAppointment, customerID);

            // add event methods to other buttons
            buttonMakePayment.Click   += (s, e) => IsNeededPayment(customerID);
            buttonCancelBooking.Click += (s, e) => CancelBooking(customerID);
        }