Exemplo n.º 1
0
 /*__________________________________________________________________________________________*/
 public override void InitAddress()
 {
     //bool newAddress = true;
     switch(newAddress )
     {
         case true:
             Address = new Contact("ADDRESS", Guid.NewGuid().ToString() );
             contacts.Add(Address);
             break;
         case false:
             Address = new Contact( );
             break;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Contacts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContacts(Contact contact)
 {
     base.AddObject("Contacts", contact);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new Contact object.
 /// </summary>
 /// <param name="contactId">Initial value of the ContactId property.</param>
 /// <param name="address">Initial value of the Address property.</param>
 /// <param name="phone">Initial value of the Phone property.</param>
 /// <param name="email">Initial value of the Email property.</param>
 public static Contact CreateContact(global::System.Int32 contactId, global::System.String address, global::System.String phone, global::System.String email)
 {
     Contact contact = new Contact();
     contact.ContactId = contactId;
     contact.Address = address;
     contact.Phone = phone;
     contact.Email = email;
     return contact;
 }
Exemplo n.º 4
0
 /*__________________________________________________________________________________________*/
 public override void InitEmail()
 {
     //bool newEmail = true;
     switch (newEmail)
     {
         case true:
             Email = new Contact("EMAIL", Guid.NewGuid().ToString());
             contacts.Add(Email);
             break;
         case false:
             Email = new Contact();
             break;
     }
 }
Exemplo n.º 5
0
 /*__________________________________________________________________________________________*/
 public override void InitPhone()
 {
     //bool newPhone = true;
     switch (newPhone)
     {
         case true:
             Phone = new Contact("PHONE", Guid.NewGuid().ToString());
             contacts.Add(Phone);
             break;
         case false:
             Phone = new Contact();
             break;
     }
 }
Exemplo n.º 6
0
        /*__________________________________________________________________________________________*/

        public void Add(Contact dataObject)
        {
            Contacts.Add(dataObject);
        }