Example #1
0
        public List <STOP> Materialize_List(DataReaderAdapter reader)
        {
            List <STOP> items = new List <STOP>();

            /// <summary>
            /// выбираем из таблицы стоп-листа (STOP)
            /// </summary>
            while (reader.Read())
            {
                STOP obj = ReadItemFields1(reader);
                items.Add(obj);
            }

            /// <summary>
            /// потом собираем все, что нашли в базе по UnifiedPolicyNumber (ENP)
            /// </summary>
            reader.NextResult();
            while (reader.Read())
            {
                STOP obj = ReadItemFields2(reader);
                items.Add(obj);
            }

            /// <summary>
            /// потом собираем все, что нашли в базе по "старому" номеру полиса N_CARD
            /// </summary>
            reader.NextResult();
            while (reader.Read())
            {
                STOP obj = ReadItemFields3(reader);
                items.Add(obj);
            }
            return(items);
        }
Example #2
0
        public List <Client> Materialize_List(DataReaderAdapter reader)
        {
            List <Client>             items       = new List <Client>();
            Dictionary <long, Client> clientsById = new Dictionary <long, Client>();

            while (reader.Read())
            {
                Client obj = ReadItemFields(reader);
                clientsById.Add(obj.Id, obj);
                items.Add(obj);
            }

            reader.NextResult();

            while (reader.Read())
            {
                long   clientId = reader.GetInt64("ClientId");
                Client obj      = clientsById[clientId];
                obj.Versions.Add(ClientVersionMaterializer.Instance.ReadItemFields(reader));
            }

            reader.NextResult();

            while (reader.Read())
            {
                long   clientId = reader.GetInt64("ClientId");
                Client obj      = clientsById[clientId];
                obj.Visits.Add(ClientVisitInfoMaterializer.Instance.ReadItemFields(reader));
            }

            reader.NextResult();

            while (reader.Read())
            {
                long   clientId = reader.GetInt64("ClientId");
                Client obj      = clientsById[clientId];
                obj.ListSms.Add(SmsMaterializer.Instance.ReadItemFields(reader));
            }

            return(items);
        }
Example #3
0
        public List <Statement> Materialize_List(DataReaderAdapter reader)
        {
            List <Statement>             items          = new List <Statement>();
            Dictionary <long, Statement> statementsById = new Dictionary <long, Statement>();

            while (reader.Read())
            {
                Statement obj = ReadItemFields(reader);
                statementsById.Add(obj.Id, obj);
                items.Add(obj);
            }

            reader.NextResult();
            while (reader.Read())
            {
                long      statementId = reader.GetInt64("StatementId");
                Statement obj         = statementsById[statementId];
                obj.StatementStatuses.Add(StatementStatusMaterializer.Instance.ReadItemFields(reader));
            }

            //public List<File> Files
            reader.NextResult();
            while (reader.Read())
            {
                long      statementId = reader.GetInt64("StatementId");
                Statement obj         = statementsById[statementId];
                obj.Files.Add(FileMaterializer.Instance.ReadItemFields(reader));
            }

            //public Execution Execution { get; set; }
            reader.NextResult();
            while (reader.Read())
            {
                long      statementId = reader.GetInt64("StatementId");
                Statement obj         = statementsById[statementId];
                obj.Execution = ExecutionMaterializer.Instance.ReadItemFields(reader);
            }

            return(items);
        }
Example #4
0
        public List <BSO> Materialize_List(DataReaderAdapter dataReader)
        {
            List <BSO>             items   = new List <BSO>();
            Dictionary <long, BSO> bsoById = new Dictionary <long, BSO>();

            while (dataReader.Read())
            {
                BSO obj = ReadItemFields(dataReader);
                bsoById.Add(obj.Id, obj);
                items.Add(obj);
            }
            dataReader.NextResult();

            while (dataReader.Read())
            {
                long Id = dataReader.GetInt64("BSO_ID");
                bsoById[Id].History.Add(BSOHistoryItemMaterializer.Instance.ReadItemFields(dataReader));
            }
            return(items);
        }
Example #5
0
        public List <User> Materialize_List(DataReaderAdapter dataReader)
        {
            List <User>             items     = new List <User>();
            Dictionary <long, User> usersById = new Dictionary <long, User>();

            while (dataReader.Read())
            {
                User obj = ReadItemFields(dataReader);
                usersById.Add(obj.Id, obj);
                items.Add(obj);
            }

            dataReader.NextResult();

            while (dataReader.Read())
            {
                long userId = dataReader.GetInt64("UserID");
                Role obj    = RoleMaterializer.Instance.ReadItemFields(dataReader);
                usersById[userId].Roles.Add(obj);
            }

            return(items);
        }
        public List <FundResponse> Materialize_List(DataReaderAdapter dataReader)
        {
            List <FundResponse> items = new List <FundResponse>();

            items.AddRange(S5FundResponseMaterializer.Instance.Materialize_List(dataReader));
            dataReader.NextResult();
            items.AddRange(S6FundResponseMaterializer.Instance.Materialize_List(dataReader));
            dataReader.NextResult();
            items.AddRange(S9FundResponseMaterializer.Instance.Materialize_List(dataReader));
            dataReader.NextResult();
            items.AddRange(SnilsFundResponseMaterializer.Instance.Materialize_List(dataReader));
            dataReader.NextResult();
            items.AddRange(SvdFundResponseMaterializer.Instance.Materialize_List(dataReader));
            dataReader.NextResult();
            items.AddRange(FundErrorResponseMaterializer.Instance.Materialize_List(dataReader));
            dataReader.NextResult();
            items.AddRange(GoznakResponseMaterializer.Instance.Materialize_List(dataReader));
            return(items);
        }