Interaction logic for WindowTutor.xaml
Inheritance: System.Windows.Window
コード例 #1
0
 private void Method_AddTutor()
 {
     try
     {
         WindowTutor winT = new WindowTutor();
         if (winT.ShowDialog().Value)
         {
             AdditionalContacts listContacts = new AdditionalContacts();
             if (winT.Skype != "")
             {
                 listContacts.Add("skype", winT.Skype);
             }
             if (winT.Telephon != "")
             {
                 listContacts.Add("tel", winT.Telephon);
             }
             MessageBox.Show("!!!! " + winT.Group);
             proxy.addTutor(winT.Login, "123456", winT.Fio, winT.Email, listContacts, 2, Convert.ToInt32(winT.Group));
             LoadTutors();
         }
     }
     catch (Exception err)
     {
         MessageBox.Show(err.Message);
     }
 }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: VlasyukTanya/CTS
 private void Method_AddTutor()
 {
     try
     {
         WindowTutor winT = new WindowTutor();
         if (winT.ShowDialog().Value)
         {
             AdditionalContacts listContacts = new AdditionalContacts();
             if(winT.Skype != "")
                 listContacts.Add("skype", winT.Skype);
             if(winT.Telephon != "")
                 listContacts.Add("tel", winT.Telephon);
             MessageBox.Show("!!!! " + winT.Group);
             proxy.addTutor(winT.Login, "123456", winT.Fio, winT.Email, listContacts, 2, Convert.ToInt32(winT.Group));
             LoadTutors();
         }
     }
     catch (Exception err)
     {
         MessageBox.Show(err.Message);
     }
 }