DBLibrary.AdditionalContacts.Add C# (CSharp) Method

Add() public method

public Add ( string service, string contact ) : void
service string
contact string
return void
        public void Add(string service, string contact)
        {
            AdditionalContact new_contact = new AdditionalContact();
            new_contact.service = service;
            new_contact.contacts = contact;
            this.parameters.Add(new_contact);
        }

Usage Example

示例#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);
     }
 }