Beispiel #1
0
        private void StartReceptionButton_Click(object sender, EventArgs e)
        {
            Reception reception = new Reception
            {
                Patient  = patient,
                Employee = (MdiParent as MainForm).account.Employee
            };

            (MdiParent as MainForm).GoToReceptionForm(reception);
        }
Beispiel #2
0
        public void GoToReceptionForm(Reception reception)
        {
            foreach (Form form in MdiChildren)
            {
                form.Close();
            }
            ReceptionForm receptionForm = new ReceptionForm(this, reception);

            receptionForm.Show();
            receptionForm.Dock = DockStyle.Fill;
        }
 public ReceptionForm(MainForm mainForm, Reception reception)
 {
     InitializeComponent();
     MdiParent      = mainForm;
     this.reception = reception;
     if (reception.Id == 0)
     {
         reception.Date = DateTime.Now.Date;
     }
     dateLabel.Text              = reception.Date.ToShortDateString();
     doctorLabel.Text            = reception.Employee.ToString();
     patientLabel.Text           = reception.Patient.ToString();
     temperatureTextBox.Text     = reception.Temperature.ToString();
     pressureTextBox.Text        = reception.Pressure == null ? "" : reception.Pressure.ToString();
     diagnosisTextBox.Text       = reception.Diagnosis == null ? "" : reception.Diagnosis.ToString();
     symptomsTextBox.Text        = reception.Symptoms == null ? "" : reception.Symptoms.ToString();
     recommendationsTextBox.Text = reception.Recommendations == null ? "" : reception.Recommendations.ToString();
     medicines = new List <Medicine>();
     foreach (ReceptionMedicine recMed in reception.ReceptionsMedicines)
     {
         medicines.Add(recMed.Medicine);
     }
     medicineBindingSource.DataSource = medicines;
 }
 public ReceptionForm(Reception reception)
 {
     InitializeComponent();
     this.reception = reception;
 }