Ejemplo n.º 1
0
        protected virtual void ProcessRow(SafeReader sr)
        {
            LastRowType = null;

            RowType nRowType;

            string sRowType = sr.ContainsField("DatumType", "RowType") ? sr["DatumType"] : sr["RowType"];

            if (!Enum.TryParse(sRowType, out nRowType))
            {
                Log.Alert("Unsupported row type encountered: '{0}'.", sRowType);
                return;
            }             // if

            LastRowType = nRowType;

            Log.Debug("Auto approve agent, processing input row of type {0}.", sRowType);

            switch (nRowType)
            {
            case RowType.MetaData:
                sr.Fill(MetaData);
                break;

            case RowType.Payment:
                Payments.Add(sr.Fill <Payment>());
                break;

            case RowType.OriginationTime:
                OriginationTime.Process(sr);
                break;

            case RowType.Turnover:
                Turnover.Add(sr.Fill <TurnoverDbRow>());
                break;

            case RowType.DirectorName:
                DirectorNames.Add(new Name(sr["FirstName"], sr["LastName"]));
                break;

            case RowType.HmrcBusinessName:
                if (sr["BelongsToCustomer"])
                {
                    HmrcBusinessNames.Add(new NameForComparison(sr["Name"]));
                }
                break;

            case RowType.ExperianConsumerDataCais:
                this.caisAccounts.Add(sr.Fill <ExperianConsumerDataCaisAccounts>());
                break;

            case RowType.CompanyDissolutionDate:
                MetaData.CompanyDissolutionDate = sr["CompanyDissolutionDate"];
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }     // switch
        }         // ProcessRow
Ejemplo n.º 2
0
        }         // SetDataAsOf

        public void SetDirectorNames(List <Name> oDirectorNames)
        {
            DirectorNames.Clear();

            if (oDirectorNames != null)
            {
                DirectorNames.AddRange(oDirectorNames.Where(n => !n.IsEmpty));
            }
        }         // SetDirectorNames