// //////////////////////////////////////////////////////////////////////// // PUBLIC METHODS // /// <summary> /// Load /// </summary> /// <param name="whereClause">whereClause</param> /// <param name="orderByClause">orderByClause</param> public void Load(string whereClause, string orderByClause) { ProjectAddSectionsSearchGateway projectAddSectionsSearchGateway = new ProjectAddSectionsSearchGateway(Data); projectAddSectionsSearchGateway.Table.Clear(); projectAddSectionsSearchGateway.ClearBeforeFill = true; projectAddSectionsSearchGateway.LoadWhereOrderBy(whereClause, orderByClause); }
/// <summary> /// UpdatePreviousWorks /// </summary> /// <param name="projectId">projectId</param> /// <param name="companyId">companyId</param> public void UpdatePreviousWorks(int projectId, int companyId) { ProjectAddSectionsSearchGateway projectAddSectionsSearchGateway = new ProjectAddSectionsSearchGateway(); foreach (ProjectAddSectionsTDS.ProjectAddSectionsSearchRow searchRow in (ProjectAddSectionsTDS.ProjectAddSectionsSearchDataTable)Data.Tables["ProjectAddSectionsSearch"]) { // If there is Previous RA works on section if (projectAddSectionsSearchGateway.ExistsRehabAssessmentWork(projectId, searchRow.AssetID, companyId)) { searchRow.RehabAssessmentPrevWork = true; } // If there is Previous FL works on section if (projectAddSectionsSearchGateway.ExistsFullLengthLiningWork(projectId, searchRow.AssetID, companyId)) { searchRow.FullLengthLiningPrevWork = true; } // If there is Previous PR works on section if (projectAddSectionsSearchGateway.ExistsPointRepairsWork(projectId, searchRow.AssetID, companyId)) { searchRow.PointRepairsPrevWork = true; } // If there is Previous JL works on section if (projectAddSectionsSearchGateway.ExistsJunctionLiningWork(projectId, searchRow.AssetID, companyId)) { searchRow.JunctionLiningPrevWork = true; } } }