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); } }
private void LoadTermsPo() { // Data for Terms/PO tab // ... Value for Vehicle Access //TermsRelationshipVehicleAccess termsRelationshipVehicleAccess = new TermsRelationshipVehicleAccess(new DataSet()); //termsRelationshipVehicleAccess.LoadAndAddItem(" "); //ddlVehicleAccess.DataSource = termsRelationshipVehicleAccess.Table; //ddlVehicleAccess.DataValueField = "RelationshipVehicleAccess"; //ddlVehicleAccess.DataTextField = "RelationshipVehicleAccess"; //ddlVehicleAccess.DataBind(); //ddlVehicleAccess.SelectedValue = ""; // ... Data for Terms/PO ProjectTermsPOGateway projectTermsPOGateway = new ProjectTermsPOGateway(projectTDS); if (projectTDS.LFS_PROJECT_TERMS.Rows.Count == 0) { // ... If the project has no Terms/PO ProjectTermsPO projectTermsPO = new ProjectTermsPO(projectTDS); projectTermsPO.Insert(int.Parse(hdfProjectId.Value), false, 0.00M, null, false, null, false, null, null, null, false, null, false, false, null, null, null, null, null, null, false, null, Int32.Parse(hdfCompanyId.Value.Trim()), false, false, false); } else { // ... If the project has Terms/PO // ... Liquidated Damage //cbxLiquidatedDamages.Checked = projectTermsPOGateway.GetLiquidatedDamage(int.Parse(hdfProjectId.Value)); //if (projectTermsPOGateway.GetLiquidatedRate(int.Parse(hdfProjectId.Value)).HasValue) tbxLiquidatedDamagesRate.Text = (Decimal.Round((decimal)projectTermsPOGateway.GetLiquidatedRate(int.Parse(hdfProjectId.Value)), 2)).ToString(); else tbxLiquidatedDamagesRate.Text = ""; //tbxLiquidatedDamagesUnit.Text = projectTermsPOGateway.GetLiquidatedUnit(int.Parse(hdfProjectId.Value)); // ... Client LFS Relationship //cbxWorkedBefore.Checked = projectTermsPOGateway.GetRelationshipClientWorkedBefore(int.Parse(hdfProjectId.Value)); //tbxClientQuirks.Text = projectTermsPOGateway.GetRelationshipClientQuirks(int.Parse(hdfProjectId.Value)); //cbxClientPromises.Checked = projectTermsPOGateway.GetRelationshipClientPromises(int.Parse(hdfProjectId.Value)); //tbxClientPromises.Text = projectTermsPOGateway.GetRelationshipClientPromisesNotes(int.Parse(hdfProjectId.Value)); //tbxWaterObtain.Text = projectTermsPOGateway.GetRelationshipWaterObtain(int.Parse(hdfProjectId.Value)); //tbxMaterialDispose.Text = projectTermsPOGateway.GetRelationshipMaterialDispose(int.Parse(hdfProjectId.Value)); //cbxRequireRPZ.Checked = projectTermsPOGateway.GetRelationshipRequireRPZ(int.Parse(hdfProjectId.Value)); //tbxStandardHydrantFitting.Text = projectTermsPOGateway.GetRelationshipStandardHydrantFitting(int.Parse(hdfProjectId.Value)); //cbxPreConstructionMeetingNeed.Checked = projectTermsPOGateway.GetRelationshipPreConstructionMeeting(int.Parse(hdfProjectId.Value)); //cbxSpecificMeetingLocation.Checked = projectTermsPOGateway.GetRelationshipSpecificMeetingLocation(int.Parse(hdfProjectId.Value)); //tbxSpecificMeetingLocation.Text = projectTermsPOGateway.GetRelationshipSpecificMeetingLocationNotes(int.Parse(hdfProjectId.Value)); //ddlVehicleAccess.SelectedValue = projectTermsPOGateway.GetRelationshipVehicleAccess(int.Parse(hdfProjectId.Value)); //tbxVehicleAccess.Text = projectTermsPOGateway.GetRelationshipVehicleAccessNotes(int.Parse(hdfProjectId.Value)); tbxDesireOutcomeOfProject.Text = projectTermsPOGateway.GetRelationshipProjectOutcome(int.Parse(hdfProjectId.Value)); tbxSpecificReportingNeeds.Text = projectTermsPOGateway.GetRelationshipSpecificReportingNeeds(int.Parse(hdfProjectId.Value)); //... Purchase Order //cbxPurchaseOrderAttach.Checked = projectTermsPOGateway.GetPurchaseOrderAttached(int.Parse(hdfProjectId.Value)); tbxPurchaseOrderNumber.Text = projectTermsPOGateway.GetPurchaseOrderNumber(int.Parse(hdfProjectId.Value)); //tbxPurchaseOrderWillNotProvided.Text = projectTermsPOGateway.GetPurchaseOrderNotes(int.Parse(hdfProjectId.Value)); // ... Vehicle Access ckbxVehicleAccessRoad.Checked = projectTermsPOGateway.GetVehicleAccessRoad(int.Parse(hdfProjectId.Value)); ckbxVehicleAccessEasement.Checked = projectTermsPOGateway.GetVehicleAccessEasement(int.Parse(hdfProjectId.Value)); ckbxVehicleAccessOther.Checked = projectTermsPOGateway.GetVehicleAccessOther(int.Parse(hdfProjectId.Value)); } }
private void LoadTermsPo() { // Data for Terms/PO ProjectTermsPOGateway projectTermsPOGateway = new ProjectTermsPOGateway(projectTDS); if (projectTermsPOGateway.Table.Rows.Count > 0) { // ... Liquidated Damage //cbxLiquidatedDamages.Checked = projectTermsPOGateway.GetLiquidatedDamage(int.Parse(hdfProjectId.Value)); //if (projectTermsPOGateway.GetLiquidatedRate(int.Parse(hdfProjectId.Value)).HasValue) tbxLiquidatedDamagesRate.Text = (Decimal.Round((decimal)projectTermsPOGateway.GetLiquidatedRate(int.Parse(hdfProjectId.Value)), 2)).ToString(); else tbxLiquidatedDamagesRate.Text = ""; //tbxLiquidatedDamagesUnit.Text = projectTermsPOGateway.GetLiquidatedUnit(int.Parse(hdfProjectId.Value)); // ... Client LFS Relationship //cbxWorkedBefore.Checked = projectTermsPOGateway.GetRelationshipClientWorkedBefore(int.Parse(hdfProjectId.Value)); //tbxClientQuirks.Text = projectTermsPOGateway.GetRelationshipClientQuirks(int.Parse(hdfProjectId.Value)); //cbxClientPromises.Checked = projectTermsPOGateway.GetRelationshipClientPromises(int.Parse(hdfProjectId.Value)); //tbxClientPromises.Text = projectTermsPOGateway.GetRelationshipClientPromisesNotes(int.Parse(hdfProjectId.Value)); //tbxWaterObtain.Text = projectTermsPOGateway.GetRelationshipWaterObtain(int.Parse(hdfProjectId.Value)); //tbxMaterialDispose.Text = projectTermsPOGateway.GetRelationshipMaterialDispose(int.Parse(hdfProjectId.Value)); //cbxRequireRPZ.Checked = projectTermsPOGateway.GetRelationshipRequireRPZ(int.Parse(hdfProjectId.Value)); //tbxStandardHydrantFitting.Text = projectTermsPOGateway.GetRelationshipStandardHydrantFitting(int.Parse(hdfProjectId.Value)); //cbxPreConstructionMeetingNeed.Checked = projectTermsPOGateway.GetRelationshipPreConstructionMeeting(int.Parse(hdfProjectId.Value)); //cbxSpecificMeetingLocation.Checked = projectTermsPOGateway.GetRelationshipSpecificMeetingLocation(int.Parse(hdfProjectId.Value)); //tbxSpecificMeetingLocation.Text = projectTermsPOGateway.GetRelationshipSpecificMeetingLocationNotes(int.Parse(hdfProjectId.Value)); //tbxVehicleAccess.Text = projectTermsPOGateway.GetRelationshipVehicleAccess(int.Parse(hdfProjectId.Value)); //tbxVehicleAccessNotes.Text = projectTermsPOGateway.GetRelationshipVehicleAccessNotes(int.Parse(hdfProjectId.Value)); tbxDesireOutcomeOfProject.Text = projectTermsPOGateway.GetRelationshipProjectOutcome(int.Parse(hdfProjectId.Value)); tbxSpecificReportingNeeds.Text = projectTermsPOGateway.GetRelationshipSpecificReportingNeeds(int.Parse(hdfProjectId.Value)); //... Purchase Order //cbxPurchaseOrderAttach.Checked = projectTermsPOGateway.GetPurchaseOrderAttached(int.Parse(hdfProjectId.Value)); tbxPurchaseOrderNumber.Text = projectTermsPOGateway.GetPurchaseOrderNumber(int.Parse(hdfProjectId.Value)); //tbxPurchaseOrderWillNotProvided.Text = projectTermsPOGateway.GetPurchaseOrderNotes(int.Parse(hdfProjectId.Value)); // ... Vehicle Access ckbxVehicleAccessRoad.Checked = projectTermsPOGateway.GetVehicleAccessRoad(int.Parse(hdfProjectId.Value)); ckbxVehicleAccessEasement.Checked = projectTermsPOGateway.GetVehicleAccessEasement(int.Parse(hdfProjectId.Value)); ckbxVehicleAccessOther.Checked = projectTermsPOGateway.GetVehicleAccessOther(int.Parse(hdfProjectId.Value)); } }