コード例 #1
0
        public VisitDoctor(PatientDetails patientName, DoctorDetails doctorName, object _mainPage)
        {
            InitializeComponent();
            DisplayMedicineCombo();

            RefillCount.Text = "0";

            pNameToShow = patientName;
            dNameToShow = doctorName;
            mainPage    = _mainPage;
            AssignValues();
        }
コード例 #2
0
        private void AddDoc_Click(object sender, RoutedEventArgs e)//adding doctor
        {
            if (CheckValidityDoctor())
            {
                string        doctorFullName = DocFName.Text + " " + DocLName.Text;
                DoctorDetails newDoc         = new DoctorDetails(doctorFullName);
                HealthcareDatabase.AllDoctors.Add(newDoc);
                MessageBox.Show("Record of Dr." + doctorFullName + " is Added Successfully ", "Success..!!");
            }
            else
            {
                MessageBox.Show("Please fill the FirstName and Last Name of Doctor..!! ", "ERROR");
            }

            DocLName.Text = "";
            DocFName.Text = "";
        }
コード例 #3
0
        private void VisitDoc_Click(object sender, RoutedEventArgs e)
        {
            Object selectedPatient = PatientDataGrid.SelectedItem;
            object selectedDoctor  = DoccomboBox.SelectedItem;

            if (selectedPatient == null || selectedDoctor == null)
            {
                MessageBox.Show("Please select both Patient and Doctor details from lists", "ERROR!!!");
            }
            else
            {
                PatientDetails chosenPatient = (PatientDetails)selectedPatient;
                DoctorDetails  chosenDoctor  = (DoctorDetails)selectedDoctor;

                Page VisitDoctor = new VisitDoctor(chosenPatient, chosenDoctor, this.Content);
                this.Content = VisitDoctor;
            }
        }