public List <CallCreditDataCifasFiling> GetCifasFiling(CT_outputapplicantCifas applicantcifas) { var CifasFiling = new List <CallCreditDataCifasFiling>(); TryRead(() => { foreach (var CfsFl in applicantcifas.filing) { var cifasfiling = new CallCreditDataCifasFiling { CifasFilingNocs = new List <CallCreditDataCifasFilingNocs>() }; var cifasfil = CfsFl; TryRead(() => cifasfiling.PersonName = cifasfil.person.name, "Person`s name details", false); cifasfiling.Dob = TryReadDate(() => cifasfil.person.dob, "Person`s date of birth", false); TryRead(() => cifasfiling.CurrentAddressP = Convert.ToBoolean(cifasfil.person.address.current), "Current address check", false); TryRead(() => cifasfiling.UnDeclaredAddressTypeP = (int)cifasfil.person.address.undeclaredaddresstype, "Type of undeclared address", false); TryRead(() => cifasfiling.AddressValueP = cifasfil.person.address.Value, "Address value related to person against CIFAS filing", false); TryRead(() => cifasfiling.CompanyNumber = cifasfil.company.number, "Registered Company number", false); TryRead(() => cifasfiling.CompanyName = cifasfil.company.name, "Company name", false); TryRead(() => cifasfiling.CurrentAddressC = Convert.ToBoolean(cifasfil.person.address.current), "Current address check", false); TryRead(() => cifasfiling.UnDeclaredAddressTypeC = (int)cifasfil.person.address.undeclaredaddresstype, "Type of undeclared address", false); TryRead(() => cifasfiling.AddressValueC = cifasfil.person.address.Value, "Address value related to company against CIFAS filing", false); TryRead(() => cifasfiling.MemberNumber = (int)cifasfil.details.membernumber, "Owning member reference number", false); TryRead(() => cifasfiling.CaseReferenceNo = cifasfil.details.casereferenceno, "Case reference number", false); TryRead(() => cifasfiling.MemberName = cifasfil.details.name, "Member name", false); TryRead(() => cifasfiling.ProductCode = cifasfil.details.productcode, "Product code", false); TryRead(() => cifasfiling.FraudCategory = cifasfil.details.fraudcategory, "Fraud category", false); TryRead(() => cifasfiling.ProductDesc = cifasfil.details.productdesc, "Description of product code", false); TryRead(() => cifasfiling.FraudDesc = cifasfil.details.frauddesc, "Description of fraud category", false); cifasfiling.InputDate = TryReadDate(() => cifasfil.details.inputdate, "The exact date upon which a confirmed fraud originally became live on the CIFAS database", false); cifasfiling.ExpiryDate = TryReadDate(() => cifasfil.details.expirydate, "The date upon which a confirmed fraud becomes expired on the CIFAS database", false); TryRead(() => cifasfiling.TransactionType = cifasfil.details.transactiontype, "Transaction type", false); TryRead(() => { foreach (var CifasFilkNoc in cifasfil.notice) { var cifasfilingnoc = new CallCreditDataCifasFilingNocs(); var cifasfilnotice = CifasFilkNoc; TryRead(() => cifasfilingnoc.NoticeType = cifasfilnotice.type, "Notice Type (Correction or Dispute)", false); TryRead(() => cifasfilingnoc.Refnum = cifasfilnotice.refnum, "Notice Type (Notice Reference Number)", false); cifasfilingnoc.DateRaised = TryReadDate(() => cifasfilnotice.dateraised, "Date that the Notice was raised)", false); TryRead(() => cifasfilingnoc.Text = cifasfilnotice.text, "Text for Notice of Correction", false); TryRead(() => cifasfilingnoc.NameDetails = cifasfilnotice.name, "Name details as provided on the Notice of Correction)", false); TryRead(() => cifasfilingnoc.CurrentAddress = Convert.ToBoolean(cifasfilnotice.address.current), "Current address check", false); TryRead(() => cifasfilingnoc.UnDeclaredAddressType = (int)cifasfilnotice.address.undeclaredaddresstype, "Type of undeclared address", false); TryRead(() => cifasfilingnoc.AddressValue = cifasfilnotice.address.Value, "Address value related to Cifas filing notice", false); cifasfiling.CifasFilingNocs.Add(cifasfilingnoc); } }, "Associate link Notices"); CifasFiling.Add(cifasfiling); } }, "Associate links"); return(CifasFiling); }
public List <CallCreditDataCifasPlusCases> GetCifasPlusCases(CT_outputapplicantCifas applicantcifas) { var CifasPlusCase = new List <CallCreditDataCifasPlusCases>(); TryRead(() => { foreach (var CfsCase in applicantcifas.@case) { var cifascases = new CallCreditDataCifasPlusCases { Dmrs = new List <CallCreditDataCifasPlusCasesDmrs>(), FilingReasons = new List <CallCreditDataCifasPlusCasesFilingReasons>(), CifasPlusCaseNocs = new List <CallCreditDataCifasPlusCasesNocs>(), Subjects = new List <CallCreditDataCifasPlusCasesSubjects>() }; var cifascase = CfsCase; TryRead(() => cifascases.CaseId = Convert.ToInt32(cifascase.caseid), "Case unique reference number within FIND", false); TryRead(() => cifascases.OwningMember = (int)cifascase.details.owningmember, "Owning member reference number", false); TryRead(() => cifascases.ManagingMember = (int)cifascase.details.managingmember, "Managing member reference number", false); TryRead(() => cifascases.CaseType = cifascase.details.casetype, "CIFAS Case Type", false); TryRead(() => cifascases.ProductCode = cifascase.details.productcode, "CIFAS Product code", false); TryRead(() => cifascases.Facility = cifascase.details.facility, "Financial facility was granted indicator", false); cifascases.SupplyDate = TryReadDate(() => cifascase.details.supplydate, "The exact date upon which a confirmed fraud originally became live on the CIFAS database", false); cifascases.ExpiryDate = TryReadDate(() => cifascase.details.expirydate, "The date upon which a confirmed fraud becomes expired on the CIFAS database", false); cifascases.ApplicationDate = TryReadDate(() => cifascase.details.applicationdate, "The date upon which an application for credit was made", false); for (int i = 0; i < cifascase.details.filingreasons.Length; ++i) { var cifascasefr = new CallCreditDataCifasPlusCasesFilingReasons(); TryRead(() => cifascasefr.FilingReason = cifascase.details.filingreasons[i], "CIFAS Case Filing Reason", false); cifascases.FilingReasons.Add(cifascasefr); } for (int k = 0; k < cifascase.dmrs.Length; ++k) { var cifascasedmr = new CallCreditDataCifasPlusCasesDmrs(); TryRead(() => cifascasedmr.dmr = (int)cifascase.dmrs[k], "The data matching routine used to match to the CIFAS case", false); cifascases.Dmrs.Add(cifascasedmr); } TryRead(() => { foreach (var CifasCaseSubj in cifascase.details.subjects) { var cifascasesubject = new CallCreditDataCifasPlusCasesSubjects(); var cifascasesubj = CifasCaseSubj; TryRead(() => cifascasesubject.PersonName = cifascasesubj.person.name, "Notice Type (Person name for a CIFAS Case)", false); cifascasesubject.PersonDob = TryReadDate(() => cifascasesubj.person.dob, "Person date of birth for a CIFAS Case", false); TryRead(() => cifascasesubject.CompanyName = cifascasesubj.company.name, "Company name for a CIFAS Case", false); TryRead(() => cifascasesubject.CompanyNumber = cifascasesubj.company.number, "Company number for a CIFAS Case", false); TryRead(() => cifascasesubject.HomeTelephone = cifascasesubj.hometelephone, "Home telephone number of a Subject", false); TryRead(() => cifascasesubject.MobileTelephone = cifascasesubj.mobiletelephone, "Mobile telephone number of a Subject", false); TryRead(() => cifascasesubject.Email = cifascasesubj.email, "Email address of a Subject", false); TryRead(() => cifascasesubject.SubjectRole = cifascasesubj.subjectrole, "Subject's indication of the type of its involvement with the SIFAS Case ", false); TryRead(() => cifascasesubject.SubjectRoleQualifier = cifascasesubj.subjectrolequalifier, "Subject's role qualifier within the SIFAS Case", false); TryRead(() => cifascasesubject.AddressType = cifascasesubj.addressdata[0].type, "CIFAS Address Type", false); TryRead(() => cifascasesubject.CurrentAddress = Convert.ToBoolean(cifascasesubj.addressdata[0].address.current), "Current address check", false); TryRead(() => cifascasesubject.UndeclaredAddressType = (int)cifascasesubj.addressdata[0].address.undeclaredaddresstype, "Type of undeclared address", false); TryRead(() => cifascasesubject.AddressValue = cifascasesubj.addressdata[0].address.Value, "Address value held against CIFAS Plus Case subject", false); cifascases.Subjects.Add(cifascasesubject); } }, "CIFAS Plus Case Subjects"); TryRead(() => { foreach (var CifasCaseNoc in cifascase.notice) { var cifascasenoc = new CallCreditDataCifasPlusCasesNocs(); var cifascasenotice = CifasCaseNoc; TryRead(() => cifascasenoc.NoticeType = cifascasenotice.type, "Notice Type (Correction or Dispute)", false); TryRead(() => cifascasenoc.Refnum = cifascasenotice.refnum, "Notice Type (Notice Reference Number)", false); cifascasenoc.DateRaised = TryReadDate(() => cifascasenotice.dateraised, "Date that the Notice was raised)", false); TryRead(() => cifascasenoc.Text = cifascasenotice.text, "Text for Notice of Correction", false); TryRead(() => cifascasenoc.NameDetails = cifascasenotice.name, "Name details as provided on the Notice of Correction)", false); TryRead(() => cifascasenoc.CurrentAddress = Convert.ToBoolean(cifascasenotice.address.current), "Current address check", false); TryRead(() => cifascasenoc.UnDeclaredAddressType = (int)cifascasenotice.address.undeclaredaddresstype, "Type of undeclared address", false); TryRead(() => cifascasenoc.AddressValue = cifascasenotice.address.Value, "Address value related to Cifas Plus Case notice", false); cifascases.CifasPlusCaseNocs.Add(cifascasenoc); } }, "CIFAS Plus Case Notices"); CifasPlusCase.Add(cifascases); } }, "Associate links"); return(CifasPlusCase); }