Exemplo n.º 1
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();
                }
            }
        }
Exemplo n.º 2
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();
         }
     }
 }