コード例 #1
0
 public static AddPatient getInst(string shtrih)
 {
     if (instance == null)
     {
         instance = new AddPatient(shtrih);
     }
     return(instance);
 }
コード例 #2
0
 public static AddPatient getInst(int id, string shtr)
 {
     if (instance == null)
     {
         instance = new AddPatient(id, shtr);
     }
     return(instance);
 }
コード例 #3
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     using (ModelBD md = new ModelBD())
     {
         var        pat        = md.Patients.Where(p => p.FIO.Equals(FIO.Text)).FirstOrDefault();
         AddPatient addPatient = new AddPatient(pat.ID, Shtr.Text);
         addPatient.Show();
     }
 }
コード例 #4
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (FIO.Text != "")
     {
         using (ModelBD md = new ModelBD())
         {
             var        pat        = md.Patients.Where(p => p.FIO.Equals(FIO.Text)).FirstOrDefault();
             AddPatient addPatient = AddPatient.getInst(pat.ID, Shtr.Text);
             addPatient.Show();
         }
     }
     else
     {
         MessageBox.Show("Введите имя пользователя!");
     }
 }
コード例 #5
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            AddPatient addPatient = AddPatient.getInst(Shtr.Text);

            addPatient.Show();
        }
コード例 #6
0
 public static void NullInst()
 {
     instance = null;
 }