/*__________________________________________________________________________________________*/ 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; } }
/// <summary> /// Deprecated Method for adding a new object to the Contacts EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToContacts(Contact contact) { base.AddObject("Contacts", contact); }
/// <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; }
/*__________________________________________________________________________________________*/ 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; } }
/*__________________________________________________________________________________________*/ 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; } }
/*__________________________________________________________________________________________*/ public void Add(Contact dataObject) { Contacts.Add(dataObject); }