Example #1
0
 private static int InsertItem(ContactForm form)
 {
     ValidateForm(form);
     using (ContactInformationDataContext repository = ContactDataSource.ContactDataContext())
     {
         oc_contactlist contact = new oc_contactlist
         {
             business_area    = form.BusinessArea,
             source_form_name = form.SourceFormName,
             source_form_path = form.SourcePath,
             external_key     = form.ExternalKey,
             external_date    = form.ExternalDate,
             contact_type     = form.ContactTypes,
             contact_fullname = form.Name,
             contact_email    = form.Email,
             contact_phone    = form.Phone,
             company_name     = form.Company,
             language         = form.Language,
             xml_form_data    = form.FormData,
             date_created     = DateTime.Now
         };
         repository.oc_contactlists.InsertOnSubmit(contact);
         repository.SubmitChanges();
         return(contact.pk_id);
     }
 }
Example #2
0
        private static ContactForm BuildContactForm(oc_contactlist contact, string dmaTable)
        {
            return(new ContactForm
            {
                Id = contact.pk_id,
                DateCreated = contact.date_created,
                Name = contact.contact_fullname,
                Company = contact.company_name,
                Zip = dmaTable,
                Phone = contact.contact_phone,
                Email = contact.contact_email,
                ContactTypes = contact.contact_type,
                Language = contact.language,
                BusinessArea = contact.business_area,
                FormData = UpdateFormData(contact.xml_form_data, dmaTable),

                SourceFormName = contact.source_form_name,
                SourcePath = contact.source_form_path,
                ExternalKey = contact.external_key,
                ExternalDate = contact.external_date ?? DateTime.MinValue
            });
        }
Example #3
0
        private static ContactForm BuildContactForm(oc_contactlist contact)
        {
            return(new ContactForm
            {
                Id = contact.pk_id,
                DateCreated = contact.date_created,
                Name = contact.contact_fullname,
                Company = contact.company_name,
                //Zip = rdr.IsDBNull(rdr.GetOrdinal("zip")) ? "" : rdr.GetString(rdr.GetOrdinal("zip,
                Phone = contact.contact_phone,
                Email = contact.contact_email,
                ContactTypes = contact.contact_type,
                Language = contact.language,
                BusinessArea = contact.business_area,
                FormData = contact.xml_form_data,

                SourceFormName = contact.source_form_name,
                SourcePath = contact.source_form_path,
                ExternalKey = contact.external_key,
                ExternalDate = contact.external_date ?? DateTime.MinValue
            });
        }
Example #4
0
 partial void Deleteoc_contactlist(oc_contactlist instance);
Example #5
0
 partial void Updateoc_contactlist(oc_contactlist instance);
Example #6
0
 partial void Insertoc_contactlist(oc_contactlist instance);
Example #7
0
 private static ContactForm BuildContactForm(oc_contactlist contact)
 {
     return(BuildContactForm(contact, null));
 }