Example #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);
 }
Example #2
0
        public Refund GetRefundValues(string year, string accountno)
        {
            Refund   refund   = null;
            CONTACT2 contact2 = null;

            using (GoldmineEntities context = new GoldmineEntities())
            {
                contact2 = context.CONTACT2.Where(x => x.ACCOUNTNO == accountno).FirstOrDefault();
            }
            if (contact2 != null)
            {
                if (year == "14")
                {
                    refund = _refundHelper.CreateRefund(contact2.U14SERVT, contact2.UY14TYPE, contact2.UY14EXPREF, contact2.UY14EXPFEE, contact2.UY14FEEDAT, contact2.UY14SIGNED,
                                                        contact2.UY14ACTFEE, contact2.UY14ACTREF, contact2.UY14COM, contact2.UY14USER, 2011, accountno);
                }
                if (year == "15")
                {
                    refund = _refundHelper.CreateRefund(contact2.U15SERVT, contact2.UY15TYPE, contact2.UY15EXPREF, contact2.UY15EXPFEE, contact2.UY15FEEDAT, contact2.UY15SIGNED,
                                                        contact2.UY15ACTFEE, contact2.UY15ACTREF, contact2.UY15COM, contact2.UY15USER, 2012, accountno);
                }
                if (year == "16")
                {
                    refund = _refundHelper.CreateRefund(contact2.U16SERVT, contact2.U16TYPE, contact2.U16EXPREF, contact2.U16EXPFEE, contact2.U16FEEDAT, contact2.U16SIGNED,
                                                        contact2.UY16ACTFEE, contact2.UY16ACTREF, contact2.UY16COM, contact2.U16USER, 2013, accountno);
                }
                if (year == "17")
                {
                    refund = _refundHelper.CreateRefund(contact2.U17SERVT, contact2.U17TYPE, contact2.U17EXPREF, contact2.U17EXPFEE, contact2.U17FEEDAT, contact2.U17SIGNED,
                                                        contact2.UY17ACTFEE, contact2.UY17ACTREF, contact2.UY17COM, contact2.U17USER, 2014, accountno);
                }
                if (year == "18")
                {
                    refund = _refundHelper.CreateRefund(contact2.U18SERVT, contact2.U18TYPE, contact2.U18EXPREF, contact2.U18EXPFEE, contact2.U18FEEDAT, contact2.U18SIGNED,
                                                        contact2.UY18ACTFEE, contact2.UY18ACTREF, contact2.UY18COM, contact2.U18USER, 2015, accountno);
                }
                if (year == "19")
                {
                    refund = _refundHelper.CreateRefund(contact2.U19SERVT, contact2.U19TYPE, contact2.U19EXPREF, contact2.U19EXPFEE, contact2.U19FEEDAT, contact2.U19SIGNED,
                                                        contact2.UY19ACTFEE, contact2.UY19ACTREF, contact2.UY19COM, contact2.U19USER, 2016, accountno);
                }
                if (year == "20")
                {
                    refund = _refundHelper.CreateRefund(contact2.U20SERVT, contact2.U20TYPE, contact2.U20EXPREF, contact2.U20EXPFEE, contact2.U20FEEDAT, contact2.U20SIGNED,
                                                        contact2.UY20ACTFEE, contact2.UY20ACTREF, contact2.UY20COM, contact2.U20USER, 2017, accountno);
                }
                if (refund != null)
                {
                    refund.TranslatedCaseowner = GetTranslatedUser(refund.User);
                }
            }

            return(refund);
        }
Example #3
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);
        }