예제 #1
0
        public Submittal BuildEntity(IDataReader reader)
        {
            Submittal submittal = new Submittal(reader[FieldNames.SubmittalId],
                                                SubmittalFactory.BuildSpecSection(reader),
                                                reader[FieldNames.ProjectId]);

            submittal.TransmittalDate               = DataHelper.GetDateTime(reader[FieldNames.TransmittalDate]);
            submittal.Action                        = DataHelper.GetEnumValue <ActionStatus>(reader[FieldNames.Action].ToString());
            submittal.ContractNumber                = reader[FieldNames.ContractNumber].ToString();
            submittal.DateReceived                  = DataHelper.GetNullableDateTime(reader[FieldNames.DateReceived]);
            submittal.DateToField                   = DataHelper.GetNullableDateTime(reader[FieldNames.DateToField]);
            submittal.DeliveryMethod                = DataHelper.GetEnumValue <Delivery>(reader[FieldNames.DeliveryMethod].ToString());
            submittal.Final                         = DataHelper.GetBoolean(reader[FieldNames.Final]);
            submittal.OtherDeliveryMethod           = reader[FieldNames.OtherDeliveryMethod].ToString();
            submittal.OtherRemainderLocation        = reader[FieldNames.OtherRemainderLocation].ToString();
            submittal.PhaseNumber                   = reader[FieldNames.PhaseNumber].ToString();
            submittal.Reimbursable                  = DataHelper.GetBoolean(reader[FieldNames.Reimbursable]);
            submittal.RemainderLocation             = DataHelper.GetEnumValue <SubmittalRemainderLocation>(reader[FieldNames.RemainderLocation].ToString());
            submittal.RemainderUnderSubmittalNumber = reader[FieldNames.RemainderUnderSubmittalNumber].ToString();
            submittal.Remarks                       = reader[FieldNames.Remarks].ToString();
            submittal.SpecSectionPrimaryIndex       = reader[FieldNames.SpecificationSectionPrimaryIndex].ToString();
            submittal.SpecSectionSecondaryIndex     = reader[FieldNames.SpecificationSectionSecondaryIndex].ToString();
            submittal.Status                        = TransmittalFactory.BuildItemStatus(reader);
            submittal.TotalPages                    = DataHelper.GetInteger(reader[FieldNames.TotalPages]);
            return(submittal);
        }
예제 #2
0
        public IList <ItemStatus> FindAllItemStatuses()
        {
            List <ItemStatus> statuses = new List <ItemStatus>();
            string            query    = "SELECT * FROM ItemStatus";

            using (IDataReader reader = this.ExecuteReader(query))
            {
                while (reader.Read())
                {
                    statuses.Add(TransmittalFactory.BuildItemStatus(reader));
                }
            }
            return(statuses);
        }
        public RequestForInformation BuildEntity(IDataReader reader)
        {
            RequestForInformation rfi = new RequestForInformation(reader[FieldNames.RequestForInformationId],
                                                                  reader[FieldNames.ProjectId],
                                                                  DataHelper.GetInteger(reader[FieldNames.RequestForInformationNumber]));

            rfi.TransmittalDate     = DataHelper.GetDateTime(reader[FieldNames.TransmittalDate]);
            rfi.DateReceived        = DataHelper.GetNullableDateTime(reader[FieldNames.DateReceived]);
            rfi.DateToField         = DataHelper.GetNullableDateTime(reader[FieldNames.DateToField]);
            rfi.DeliveryMethod      = DataHelper.GetEnumValue <Delivery>(reader[FieldNames.DeliveryMethod].ToString());
            rfi.Final               = DataHelper.GetBoolean(reader[FieldNames.Final]);
            rfi.OtherDeliveryMethod = reader[FieldNames.OtherDeliveryMethod].ToString();
            rfi.PhaseNumber         = reader[FieldNames.PhaseNumber].ToString();
            rfi.Reimbursable        = DataHelper.GetBoolean(reader[FieldNames.Reimbursable]);
            rfi.Remarks             = reader[FieldNames.Remarks].ToString();
            rfi.SpecSection         = SubmittalFactory.BuildSpecSection(reader);
            rfi.Status              = TransmittalFactory.BuildItemStatus(reader);
            rfi.TotalPages          = DataHelper.GetInteger(reader[FieldNames.TotalPages]);
            return(rfi);
        }
예제 #4
0
        public ChangeOrder BuildEntity(IDataReader reader)
        {
            ChangeOrder co = new ChangeOrder(reader[FieldNames.ChangeOrderId],
                                             reader[FieldNames.ProjectId],
                                             DataHelper.GetInteger(reader[FieldNames.ChangeOrderNumber]));

            co.AgencyApprovedDate      = DataHelper.GetNullableDateTime(reader[FieldNames.AgencyApprovedDate]);
            co.AmountChanged           = DataHelper.GetDecimal(reader[FieldNames.AmountChanged]);
            co.ArchitectSignatureDate  = DataHelper.GetNullableDateTime(reader[FieldNames.ArchitectSignatureDate]);
            co.ChangeType              = DataHelper.GetEnumValue <PriceChangeType>(reader[FieldNames.PriceChangeType].ToString());
            co.PriceChangeDirection    = DataHelper.GetEnumValue <ChangeDirection>(reader[FieldNames.PriceChangeTypeDirection].ToString());
            co.ContractorSignatureDate = DataHelper.GetNullableDateTime(reader[FieldNames.ContractorSignatureDate]);
            co.DateToField             = DataHelper.GetNullableDateTime(reader[FieldNames.DateToField]);
            co.Description             = DataHelper.GetString(reader[FieldNames.Description]);
            co.EffectiveDate           = DataHelper.GetDateTime(reader[FieldNames.EffectiveDate]);
            co.OwnerSignatureDate      = DataHelper.GetNullableDateTime(reader[FieldNames.OwnerSignatureDate]);
            co.TimeChanged             = DataHelper.GetInteger(reader[FieldNames.TimeChangedDays]);
            co.Status = TransmittalFactory.BuildItemStatus(reader);
            co.TimeChangeDirection = DataHelper.GetEnumValue <ChangeDirection>(reader[FieldNames.TimeChangeDirection].ToString());
            return(co);
        }