Esempio n. 1
0
 public ClientData MapClientData(ClientData clientData, CONTACT1 c1, CONTACT2 c2)
 {
     clientData.Accountno          = c1.ACCOUNTNO;
     clientData.Lastname           = c1.LASTNAME;
     clientData.Phone1             = c1.PHONE1;
     clientData.Phone2             = c1.PHONE2;
     clientData.Phone3             = c1.PHONE3;
     clientData.Secr               = c1.SECR;
     clientData.UconvDate          = c2.UCONVDATE.ToString();
     clientData.UStage1Dat         = c2.USTAGE1DAT.ToString();
     clientData.UEmailAddr         = c2.UEMAILADDR;
     clientData.PostPreference     = c2.UCPPOST;
     clientData.EmailPreference    = c2.UCPEMAIL;
     clientData.PhonePreference    = c2.UCPPHONE;
     clientData.SMSPreference      = c2.UCPSMS;
     clientData.CompletedDate_2009 = c2.UY12COM;
     clientData.CompletedDate_2010 = c2.UY13COM;
     clientData.CompletedDate_2011 = c2.UY14COM;
     clientData.CompletedDate_2012 = c2.UY15COM;
     clientData.CompletedDate_2013 = c2.UY16COM;
     clientData.CompletedDate_2014 = c2.UY17COM;
     clientData.CompletedDate_2015 = c2.UY18COM;
     clientData.CompletedDate_2016 = c2.UY19COM;
     clientData.CompletedDate_2017 = c2.UY20COM;
     clientData.CompletedDate_2018 = c2.UY21COM;
     clientData.CompletedDate_2019 = c2.UY22COM;
     return(clientData);
 }
 public static Address ConvertToAddress(CONTACT1 contact1Record)
 {
     return(new Address()
     {
         first_line = contact1Record.ADDRESS1,
         second_line = contact1Record.ADDRESS2,
         postcode = contact1Record.ZIP,
         county = contact1Record.STATE,
         country = contact1Record.COUNTRY,
         town = contact1Record.CITY
     });
 }
Esempio n. 3
0
        public Address GetAddress(string accountno)
        {
            Address address = null;

            using (GoldmineEntities context = new GoldmineEntities())
            {
                CONTACT1 contact1Record = (from c in context.CONTACT1.Where(x => x.ACCOUNTNO == accountno) select c).FirstOrDefault();
                if (contact1Record != null)
                {
                    address = AddressHelper.ConvertToAddress(contact1Record);
                }
            }
            return(address);
        }
Esempio n. 4
0
        public ClientData GetClientData(string referenceNumber)
        {
            ClientData clientData = new ClientData();

            using (GoldmineEntities context = new GoldmineEntities())
            {
                CONTACT1 c1 = (from c in context.CONTACT1.Where(c => c.KEY5 == referenceNumber) select c).FirstOrDefault();
                if (c1 != null)
                {
                    CONTACT2 c2 = (from c in context.CONTACT2.Where(c => c.ACCOUNTNO == c1.ACCOUNTNO) select c).FirstOrDefault();
                    clientData      = _clientDataMapping.MapClientData(clientData, c1, c2);
                    clientData.Key5 = referenceNumber;
                }
            }
            return(clientData);
        }