예제 #1
0
 public AddInfoAboutVisit(Patient pat, Doctor doct, DoctorRecord rec = null)
 {
     patient      = pat;
     doctor       = doct;
     doctorRecord = rec;
     InitializeComponent();
 }
예제 #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (dataGridViewDocRecs.SelectedCells[0] != null && dataGridViewDocRecs.SelectedCells[0].ToString() != "")
     {
         using (ModelMedDBContainer db = new ModelMedDBContainer())
         {
             DoctorRecord dr        = db.DoctorRecordSet.Find(dataGridViewDocRecs.SelectedRows[0].Cells[0].Value, thisDoctor.NameHashID);
             Form         newDocRec = new AddInfoAboutVisit(thisPatient, thisDoctor, dr);
             newDocRec.ShowDialog();
         }
     }
     ReloadForm();
 }
예제 #3
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (dataGWIllness.SelectedCells[0].Value != null && dataGWIllness.SelectedCells[0].Value.ToString() != "")
            {
                using (ModelMedDBContainer db = new ModelMedDBContainer())
                {
                    DoctorRecord dr = db.DoctorRecordSet.Find(dataGridViewDocRecs.SelectedRows[0].Cells[0].Value, thisDoctor.NameHashID);


                    Form showInfo = new ShowInfoAboutVisit(dr);
                    showInfo.Show();
                }
            }
        }
예제 #4
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedCells != null && dataGridView1.SelectedCells.Count != 0)
     {
         using (ModelMedDBContainer db = new ModelMedDBContainer())
         {
             thisPatient = (Patient)db.PersonSet.Find(thisPatient.BirthDate, thisPatient.NameHashID);
             var          info = new { dateSt = dataGridView1.SelectedCells[0].Value, name = dataGridView1.SelectedCells[1].Value };
             long         hash = (info.name as string).GetHashCode();
             DateTime     dt   = (DateTime)(info.dateSt);
             DoctorRecord temp = db.DoctorRecordSet.Find(info.dateSt, hash);
             Form         showInfoAboutVisit = new ShowInfoAboutVisit(temp);
             showInfoAboutVisit.Show();
         }
     }
 }
예제 #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (ModelMedDBContainer db = new ModelMedDBContainer())
     {
         patient = (Patient)db.PersonSet.Find(patient.BirthDate, patient.NameHashID);
         doctor  = (Doctor)db.PersonSet.Find(doctor.BirthDate, doctor.NameHashID);
         if (doctorRecord == null)
         {
             patient.MedCard.DoctorRecord.Add(new DoctorRecord
             {
                 Anamnesis  = richTextBoxAnamnes.Text,
                 Diagnosis  = richTextBoxDiagnos.Text,
                 Date       = dateTimePicker1.Value,
                 HelpAmount = richTextBoxHelpAmount.Text,
                 HelpType   = richTextBoxHelpType.Text,
                 Result     = richTextBoxResult.Text,
                 DoctorInfo = doctor.FullName,
                 Doctor     = doctor,
                 DoctorID   = doctor.NameHashID,
                 Standarts  = richTextBoxStand.Text
             });
         }
         else
         {
             doctorRecord            = db.DoctorRecordSet.Find(doctorRecord.Date, doctorRecord.DoctorID);
             doctorRecord.Anamnesis  = richTextBoxAnamnes.Text;
             doctorRecord.Diagnosis  = richTextBoxDiagnos.Text;
             doctorRecord.Date       = dateTimePicker1.Value;
             doctorRecord.HelpAmount = richTextBoxHelpAmount.Text;
             doctorRecord.HelpType   = richTextBoxHelpType.Text;
             doctorRecord.Result     = richTextBoxResult.Text;
             doctorRecord.DoctorInfo = doctor.FullName;
             doctorRecord.Doctor     = doctor;
             doctorRecord.DoctorID   = doctor.NameHashID;
             doctorRecord.Standarts  = richTextBoxStand.Text;
         }
         db.SaveChanges();
     }
     this.Close();
 }
예제 #6
0
 public ShowInfoAboutVisit(DoctorRecord r)
 {
     thisRecord = r;
     InitializeComponent();
 }