/// <summary> /// Gets the contact information. /// </summary> /// <returns></returns> private VolarisContact GetContactInformation() { var contact = new VolarisContact(); var table = GetTable(); if (table != null) { var contactInformation = table.Controls.OfType <ucVolarisContactInformationCapture>().FirstOrDefault(); if (contactInformation != null) { contact = contactInformation.Contact; } } return(contact); }
/// <summary> /// Gets the contact. /// </summary> /// <returns></returns> public VolarisContact GetContact() { var contact = new VolarisContact(); var userEmail = new VolarisContactEmail() { Email = View.Email, Type = VolarisEmailType.Primary }; contact.Emails.Add(userEmail); //Ingreso de codigo de IATA var iataCode = new VolarisContactTelephone() { Telephone = "86513711" }; contact.Phones.Add(iataCode); var userPhone = new VolarisContactTelephone() { TelephoneCityCode = View.TelePhoneLada, Telephone = View.TelePhone, Type = VolarisPhoneType.Primary }; contact.Phones.Add(userPhone); if (!string.IsNullOrEmpty(View.CellPhoneLada) && !string.IsNullOrEmpty(View.CellPhone)) { var userCellPhone = new VolarisContactTelephone() { TelephoneCityCode = View.CellPhoneLada, Telephone = View.CellPhone, }; contact.Phones.Add(userCellPhone); } contact.Emails.Add(Repository.GetConfiguredEmails()); contact.Phones.Add(Repository.GetConfigureTelephones()); return(contact); }
public void SetContanct(VolarisContact contact) { Contact = contact; }