public Project BuildEntity(IDataReader reader) { Project project = new Project(reader[FieldNames.ProjectId], reader[FieldNames.ProjectNumber].ToString(), reader[FieldNames.ProjectName].ToString()); project.Address = new Address(reader[FieldNames.Street].ToString(), reader[FieldNames.City].ToString(), reader[FieldNames.State].ToString(), reader[FieldNames.PostalCode].ToString()); project.ContractDate = DataHelper.GetNullableDateTime(reader[FieldNames.ContractDate]); project.EstimatedStartDate = DataHelper.GetNullableDateTime(reader[FieldNames.EstimatedStartDate]); project.EstimatedCompletionDate = DataHelper.GetNullableDateTime(reader[FieldNames.EstimatedCompletionDate]); project.CurrentCompletionDate = DataHelper.GetNullableDateTime(reader[FieldNames.CurrentCompletionDate]); project.ActualCompletionDate = DataHelper.GetNullableDateTime(reader[FieldNames.ActualCompletionDate]); project.ContingencyAllowanceAmount = DataHelper.GetDecimal(reader[FieldNames.ContingencyAllowanceAmount]); project.TestingAllowanceAmount = DataHelper.GetDecimal(reader[FieldNames.TestingAllowanceAmount]); project.UtilityAllowanceAmount = DataHelper.GetDecimal(reader[FieldNames.UtilityAllowanceAmount]); project.OriginalConstructionCost = DataHelper.GetDecimal(reader[FieldNames.OriginalConstructionCost]); project.TotalSquareFeet = DataHelper.GetInteger(reader[FieldNames.TotalSquareFeet]); project.PercentComplete = DataHelper.GetInteger(reader[FieldNames.PercentComplete]); project.Remarks = reader[FieldNames.Remarks].ToString(); project.AeChangeOrderAmount = DataHelper.GetDecimal(reader[FieldNames.AeChangeOrderAmount]); project.ContractReason = reader[FieldNames.ContractReason].ToString(); project.AgencyApplicationNumber = reader[FieldNames.AgencyApplicationNumber].ToString(); project.AgencyFileNumber = reader[FieldNames.AgencyFileNumber].ToString(); project.Segment = new MarketSegment(reader[FieldNames.MarketSegmentId], null, reader[FieldNames.MarketSegmentCode].ToString(), reader[FieldNames.MarketSegmentName].ToString()); return(project); }
public ConstructionChangeDirective BuildEntity(IDataReader reader) { ConstructionChangeDirective ccd = new ConstructionChangeDirective(reader[FieldNames.ConstructionChangeDirectiveId], reader[ProjectFactory.FieldNames.ProjectId], DataHelper.GetInteger(reader[FieldNames.ConstructionChangeDirectiveNumber])); ccd.AmountChanged = DataHelper.GetDecimal(reader[FieldNames.AmountChanged]); ccd.ArchitectSignatureDate = DataHelper.GetNullableDateTime(reader[FieldNames.ArchitectSignatureDate]); ccd.Attachment = DataHelper.GetString(reader[FieldNames.Attachment]); ccd.Cause = DataHelper.GetInteger(reader[FieldNames.Cause]); ccd.ChangeType = DataHelper.GetEnumValue <PriceChangeType>(reader[FieldNames.PriceChangeType].ToString()); ccd.ContractorSignatureDate = DataHelper.GetNullableDateTime(reader[FieldNames.ContractorSignatureDate]); ccd.DeliveryMethod = DataHelper.GetEnumValue <Delivery>(reader[TransmittalFactory.FieldNames.DeliveryMethod]); ccd.Description = DataHelper.GetString(reader[FieldNames.Description]); ccd.Final = DataHelper.GetBoolean(reader[TransmittalFactory.FieldNames.Final]); ccd.Initiator = DataHelper.GetString(reader[FieldNames.Initiator]); ccd.IssueDate = DataHelper.GetNullableDateTime(reader[FieldNames.IssueDate]); ccd.Origin = DataHelper.GetInteger(reader[FieldNames.Origin]); ccd.OtherDeliveryMethod = DataHelper.GetString(reader[TransmittalFactory.FieldNames.OtherDeliveryMethod]); ccd.OwnerSignatureDate = DataHelper.GetNullableDateTime(reader[FieldNames.OwnerSignatureDate]); ccd.PhaseNumber = DataHelper.GetString(reader[TransmittalFactory.FieldNames.PhaseNumber]); ccd.PriceChangeDirection = DataHelper.GetEnumValue <ChangeDirection>(reader[FieldNames.PriceChangeTypeDirection].ToString()); ccd.Reason = DataHelper.GetString(reader[FieldNames.Reason]); ccd.Reimbursable = DataHelper.GetBoolean(reader[TransmittalFactory.FieldNames.Reimbursable]); ccd.Remarks = DataHelper.GetString(reader[FieldNames.Remarks]); ccd.TimeChanged = DataHelper.GetInteger(reader[FieldNames.TimeChangedDays]); ccd.TimeChangeDirection = DataHelper.GetEnumValue <ChangeDirection>(reader[FieldNames.TimeChangeDirection].ToString()); ccd.TotalPages = DataHelper.GetInteger(reader[TransmittalFactory.FieldNames.TotalPages]); ccd.TransmittalDate = DataHelper.GetDateTime(reader[TransmittalFactory.FieldNames.TransmittalDate]); ccd.TransmittalRemarks = DataHelper.GetString(reader[TransmittalFactory.FieldNames.TransmittalRemarks]); return(ccd); }
internal static Contract BuildContract(IDataReader reader) { Contract contract = new Contract(reader[FieldNames.ContractId]); contract.BidPackageNumber = reader[FieldNames.BidPackageNumber].ToString(); contract.ContractAmount = DataHelper.GetDecimal(reader[FieldNames.ContractAmount]); contract.ContractDate = DataHelper.GetNullableDateTime(reader[FieldNames.ContractDate]); ICompanyRepository repository = RepositoryFactory.GetRepository <ICompanyRepository, Company>(); contract.Contractor = repository.FindBy(reader[FieldNames.CompanyId]); contract.NoticeToProceedDate = DataHelper.GetNullableDateTime(reader[FieldNames.NoticeToProceed]); contract.ScopeOfWork = reader[FieldNames.Scope].ToString(); return(contract); }
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); }
public static Allowance BuildAllowance(IDataReader reader) { return(new Allowance(reader[FieldNames.AllowanceTitle].ToString(), DataHelper.GetDecimal(reader[FieldNames.AllowanceAmount]))); }