public void ProcessMPICSubmission(MpicProspectInfo ProspectData, int SubmissionID) { try { EDDY.IS.LeadPing.Domain.MpicProspectInfo ProspectInput = TransLateToInternalProspect(ProspectData); this.Helper.ProcessMpicSubmission(ProspectInput, SubmissionID); } catch (Exception Ex) { ISException isEx = new ISException(Ex, MethodBase.GetCurrentMethod().DeclaringType.Namespace + "." + MethodBase.GetCurrentMethod().DeclaringType.Name + "." + MethodBase.GetCurrentMethod().Name, ProspectData, SubmissionID); isEx.Save(true); } }
private EDDY.IS.LeadPing.Domain.MpicProspectInfo TransLateToInternalProspect(MpicProspectInfo ProspectInfo) { try { EDDY.IS.LeadPing.Domain.MpicProspectInfo ReturnValue = new EDDY.IS.LeadPing.Domain.MpicProspectInfo(); ReturnValue.AddressLine2 = ProspectInfo.AddressLine2; ReturnValue.City = ProspectInfo.City; ReturnValue.Email = ProspectInfo.Email; ReturnValue.FirstName = ProspectInfo.FirstName; ReturnValue.LastName = ProspectInfo.LastName; ReturnValue.Phone1 = ProspectInfo.Phone1; if (ProspectInfo.Phone2 == null) { ReturnValue.Phone2 = ProspectInfo.Phone1; } else if (ProspectInfo.Phone2.Length == 0) { ReturnValue.Phone2 = ProspectInfo.Phone1; } else { ReturnValue.Phone2 = ProspectInfo.Phone2; } ReturnValue.StateAbbreviation = ProspectInfo.StateCode; ReturnValue.ZipCode = ProspectInfo.ZipCode; ReturnValue.StreetAddress = ProspectInfo.StreetAddress; ReturnValue.AddressLine2 = ProspectInfo.AddressLine2; return(ReturnValue); } catch (Exception Ex) { ISException isEx = new ISException(Ex, MethodBase.GetCurrentMethod().DeclaringType.Namespace + "." + MethodBase.GetCurrentMethod().DeclaringType.Name + "." + MethodBase.GetCurrentMethod().Name, ProspectInfo); isEx.Save(true); throw Ex; } }