Exemplo n.º 1
0
 private void buttonSelectPerson_Click(object sender, EventArgs e)
 {
     if (comboBox1.Text != "")
     {
         using (ModelMedDBContainer db = new ModelMedDBContainer())
         {
             string[] personInfo = comboBox1.Text.Split('_');
             string[] birthInfo  = personInfo[1].Split('.');
             long     hash       = (long)(personInfo[0]).GetHashCode();
             DateTime birth      = new DateTime(int.Parse(birthInfo[2]), int.Parse(birthInfo[1]), int.Parse(birthInfo[0]));
             Person   pers       = db.PersonSet.Find(birth, hash);
             if (function == 0)
             {
                 Form changeInfo = new ChangePersonInfo(pers);
                 changeInfo.Owner = this;
                 changeInfo.ShowDialog();
             }
             if (function == 1)
             {
                 Form changeMedCard = new ChangeMedCard(((DoctorMenu)Owner).thisDoctor, (Patient)pers);
                 changeMedCard.Show();
             }
         }
     }
     else
     {
         MessageBox.Show("Человек не выбран");
     }
 }
Exemplo n.º 2
0
        private void изменитьДанныеToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form changeInfo = new ChangePersonInfo(thisPatient);

            changeInfo.Owner = this;
            changeInfo.ShowDialog();
            RefreshMenu();
        }