private void InsertProjectTerms(int originalProjectId) { // ... Data for current project ProjectTermsPOGateway projectTermsPOGateway = new ProjectTermsPOGateway(projectTDS); projectTermsPOGateway.LoadByProjectId(originalProjectId); if (projectTermsPOGateway.Table.Rows.Count > 0) { // ... Definition of general variables bool liquidatedDamage = projectTermsPOGateway.GetLiquidatedDamage(originalProjectId); decimal? liquidatedRate = null; if (projectTermsPOGateway.GetLiquidatedRate(originalProjectId).HasValue) liquidatedRate = (decimal)projectTermsPOGateway.GetLiquidatedRate(originalProjectId); string liquidatedUnit = projectTermsPOGateway.GetLiquidatedUnit(originalProjectId); bool clientWorkedBefore = projectTermsPOGateway.GetRelationshipClientWorkedBefore(originalProjectId); string clientQuirks = projectTermsPOGateway.GetRelationshipClientQuirks(originalProjectId); bool clientPromises = projectTermsPOGateway.GetRelationshipClientPromises(originalProjectId); string clientPromisesNotes = projectTermsPOGateway.GetRelationshipClientPromisesNotes(originalProjectId); string waterObtain = projectTermsPOGateway.GetRelationshipWaterObtain(originalProjectId); string materialDispose = projectTermsPOGateway.GetRelationshipMaterialDispose(originalProjectId); bool requireRPZ = projectTermsPOGateway.GetRelationshipRequireRPZ(originalProjectId); string standardHydrantFitting = projectTermsPOGateway.GetRelationshipStandardHydrantFitting(originalProjectId); bool preConstructionMeeting = projectTermsPOGateway.GetRelationshipPreConstructionMeeting(originalProjectId); bool specificMeetingLocation = projectTermsPOGateway.GetRelationshipSpecificMeetingLocation(originalProjectId); string specificMeetingLocationNotes = projectTermsPOGateway.GetRelationshipSpecificMeetingLocationNotes(originalProjectId); string vehicleAccess = "Fair"; if (projectTermsPOGateway.GetRelationshipVehicleAccess(originalProjectId) != "") vehicleAccess = projectTermsPOGateway.GetRelationshipVehicleAccess(originalProjectId); string vehicleAccessNotes = projectTermsPOGateway.GetRelationshipVehicleAccessNotes(originalProjectId); string projectOutcome = projectTermsPOGateway.GetRelationshipProjectOutcome(originalProjectId); string specificReportingNeeds = projectTermsPOGateway.GetRelationshipSpecificReportingNeeds(originalProjectId); bool orderAttached = projectTermsPOGateway.GetPurchaseOrderAttached(originalProjectId); string orderNumber = projectTermsPOGateway.GetPurchaseOrderNumber(originalProjectId); string orderNotes = projectTermsPOGateway.GetPurchaseOrderNotes(originalProjectId); bool vehicleAccessRoad = projectTermsPOGateway.GetVehicleAccessRoad(originalProjectId); bool vehicleAccessEasement = projectTermsPOGateway.GetVehicleAccessEasement(originalProjectId); bool vehicleAccessOther = projectTermsPOGateway.GetVehicleAccessOther(originalProjectId); // ... Insert Terms/PO ProjectTermsPO projectTermsPO = new ProjectTermsPO(projectTDS); projectTermsPO.Insert(0, liquidatedDamage, liquidatedRate, liquidatedUnit, clientWorkedBefore, clientQuirks, clientPromises, clientPromisesNotes, waterObtain, materialDispose, requireRPZ, standardHydrantFitting, preConstructionMeeting, specificMeetingLocation, specificMeetingLocationNotes, vehicleAccess, vehicleAccessNotes, projectOutcome, specificReportingNeeds, orderNumber, orderAttached, orderNotes, Int32.Parse(hdfCompanyId.Value.Trim()), vehicleAccessRoad, vehicleAccessEasement, vehicleAccessOther); } }