Ejemplo n.º 1
0
        //Get content found in the Contact section of the website
        public ContactQuery getContact()
        {
            try
            {
                ContactQuery contact = new ContactQuery();
                contact.contactName = this.getInterfaceElement("contactName").content;
                contact.contactPhone = this.getInterfaceElement("contactPhone").content;
                contact.contactEmail = this.getInterfaceElement("contactEmail").content;
                contact.contactAdditionalInfo = this.getInterfaceElement("contactAdditionalInfo").content;

                return contact;
            }
            catch (Exception ex)
            {
                Console.Write("WebManager.getContact error " + ex);
                return null;
            }
        }
Ejemplo n.º 2
0
        //Update content of the Contact section of the website
        public bool saveContact(ContactQuery newContact)
        {
            try
            {
                using (conferenceadminContext context = new conferenceadminContext())
                {
                    this.saveInterfaceElement("contactName", newContact.contactName);

                    this.saveInterfaceElement("contactPhone", newContact.contactPhone);

                    this.saveInterfaceElement("contactEmail", newContact.contactEmail);

                    this.saveInterfaceElement("contactAdditionalInfo", newContact.contactAdditionalInfo);

                    return true;
                }
            }
            catch (Exception ex)
            {
                Console.Write("WebManger.saveContact error " + ex);
                return false;
            }
        }