コード例 #1
0
        private void GetAppoinment()
        {
            ClinicManagementSystemDataContext dbcontext = new ClinicManagementSystemDataContext();

            AppointmentDataGrid.DataSource = from appointment in dbcontext.TBLAPPOINTMENTs join patient in dbcontext.TBLPATIENTs on appointment.appointment_PatientID equals patient.patient_ID
                                             join doctor in dbcontext.TBLDOCTORs on appointment.appointment_DoctorID equals doctor.doctor_ID
                                             select new  {
                appointment.appoinment_ID,
                patient.patient_Name,
                patient.patient_BirthDate,
                patient.patient_Phone,
                appointment.appointment_Date,
                doctor.doctor_Name,
                appointment.appointment_Status
            };

            AppointmentDataGrid.DataBind();


            //                            select new
            //                            {
            //                               Appoint_ID = appointment.
            //                            };

            //Select appoinment_ID,TBLPATIENT.patient_Name,TBLPATIENT.patient_Phone,appointment_Date,TBLDOCTOR.doctor_Name,appointment_Status from TBLAPPOINTMENT JOIN TBLPATIENT ON TBLAPPOINTMENT.appointment_PatientID = TBLPATIENT.patient_ID JOIN TBLDOCTOR ON TBLAPPOINTMENT.appointment_DoctorID = TBLDOCTOR.doctor_ID;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OrderTestsDialog"/> class.
 /// </summary>
 /// <param name="appointment">The appointment.</param>
 public OrderTestsDialog(AppointmentDataGrid appointment)
 {
     this.InitializeComponent();
     this.confirmationFlyout.Hide();
     this.order = new TestOrder(new ObservableCollection <Test>());
     this.patientNameTextBlock.Text = appointment.PatientName;
     this.appointmentid             = appointment.Appointmentid;
 }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ViewAppointmentDetails"/> class.
        /// </summary>
        /// <param name="appointment">The appointment.</param>
        public ViewAppointmentDetails(AppointmentDataGrid appointment)
        {
            this.InitializeComponent();
            this.appointment    = appointment;
            this.appointmentid  = appointment.Appointmentid;
            this.dataDictionary = new Dictionary <string, string>();
            this.appointmentDataView.ItemsSource = this.dataDictionary;
            this.dataDictionary.Add("Patient ID", appointment.Patientid.ToString());
            this.dataDictionary.Add("Patient Name", appointment.PatientName);
            this.dataDictionary.Add("Patient DOB", appointment.Dob);
            this.dataDictionary.Add("Doctor ID", appointment.Doctorid.ToString());
            this.dataDictionary.Add("Doctor Name", appointment.DoctorName);
            this.dataDictionary.Add("Appointment Date", appointment.Date);
            this.dataDictionary.Add("Appointment Time", appointment.Time);
            this.dataDictionary.Add("Description", appointment.Description);


            this.checkupDictionary           = new Dictionary <string, string>();
            this.checkupDataView.ItemsSource = this.checkupDictionary;

            this.orderTestsButton.IsEnabled  = false;
            this.makeCheckupButton.IsEnabled = false;
            this.dateTip = new ToolTip {
                IsOpen = false
            };
            this.flyoutButton.IsEnabled = false;
            this.updateTests();
            this.updateCheckupInformation();

            this.updateIfAllTestsDone();

            this.checkIfCheckupDone();
            this.enterTestsButton.IsEnabled = false;


            if (this.checkIfAppointmentPassed() | this.checkIfFinalDiagnosis())
            {
                this.enterTestsButton.IsEnabled           = false;
                this.orderTestsButton.IsEnabled           = false;
                this.makeCheckupButton.IsEnabled          = false;
                this.submitFinalDiagnosisButton.IsEnabled = false;
                this.finalDiagnosisTextBox.IsEnabled      = false;
            }
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ViewTestsDialog"/> class.
 /// </summary>
 /// <param name="appointment">The appointment.</param>
 public ViewTestsDialog(AppointmentDataGrid appointment)
 {
     this.InitializeComponent();
     this.patientNameTextBlock.Text = appointment.PatientName;
 }