//COMPANY_ID
        /// <summary>
        /// Delete
        /// </summary>
        /// <param name="projectId">projectId</param>
        /// <param name="sectionId">sectionId</param>
        /// <param name="companyId">companyId</param>
        public void Delete(int projectId, int assetId, int companyId)
        {
            WorkRehabAssessmentGateway workRehabAssessmentGateway = new WorkRehabAssessmentGateway();
            WorkRehabAssessment workRehabAssessment = new WorkRehabAssessment(workRehabAssessmentGateway.Data);

            WorkFullLengthLiningGateway workFullLengthLiningGateway = new WorkFullLengthLiningGateway();
            WorkFullLengthLining workFullLengthLining = new WorkFullLengthLining(workFullLengthLiningGateway.Data);

            WorkJunctionLiningSectionGateway workJunctionLiningSectionGateway = new WorkJunctionLiningSectionGateway();
            WorkJunctionLiningSection workJunctionLiningSection = new WorkJunctionLiningSection(workJunctionLiningSectionGateway.Data);

            int workIdRA = GetWorkId(projectId, assetId, "Rehab Assessment", companyId);
            if (workIdRA != 0) workRehabAssessment.DeleteDirect(workIdRA, companyId);

            int workIdFL = GetWorkId(projectId, assetId, "Full Length Lining", companyId);
            if (workIdFL != 0) workFullLengthLining.DeleteDirect(workIdFL, companyId);

            int workIdJL = GetWorkId(projectId, assetId, "Junction Lining Section", companyId);
            if (workIdJL != 0) workJunctionLiningSection.DeleteDirect(workIdJL, companyId);

            LfsAssetSewerSectionGateway lfsAssetSewerSectionGateway = new LfsAssetSewerSectionGateway();
            lfsAssetSewerSectionGateway.LoadByAssetId(assetId, companyId);
            LfsAssetSewerSection lfsAssetSewerSection = new LfsAssetSewerSection(lfsAssetSewerSectionGateway.Data);

            // Update lfs asset
            lfsAssetSewerSection.DeleteDirect(assetId, companyId);
        }
        /// <summary>
        /// DeleteDirect
        /// </summary>
        /// <param name="workId">workId</param>
        /// <param name="assetId">assetId</param>
        /// <param name="companyId">companyId</param>
        public void DeleteDirect(int workId, int assetId, int companyId)
        {
            // Delete work
            WorkFullLengthLining workFullLengthLining = new WorkFullLengthLining(null);
            workFullLengthLining.DeleteDirect(workId, companyId);

            // Delete section
            LfsAssetSewerSection lfsAssetSewerSection = new LfsAssetSewerSection(null);
            lfsAssetSewerSection.DeleteDirect(assetId, companyId);
        }
        /// <summary>
        /// DeleteDirect
        /// </summary>
        /// <param name="workId">workId</param>
        /// <param name="assetId">assetId</param>
        /// <param name="companyId">companyId</param>
        public void DeleteDirect(int workId, int assetId, int companyId)
        {
            // Delete work
            WorkPointRepairs workPointRepairs = new WorkPointRepairs(null);
            workPointRepairs.DeleteDirect(workId, companyId);

            // Delete section
            LfsAssetSewerSection lfsAssetSewerSection = new LfsAssetSewerSection(null);
            lfsAssetSewerSection.DeleteDirect(assetId, companyId);
        }
        /// <summary>
        /// DeleteDirectAll
        /// </summary>
        /// <param name="projectId">projectId</param>
        /// <param name="assetId">assetId</param>
        /// <param name="companyId">companyId</param>
        public void DeleteDirectAll(int projectId, int assetId, int companyId)
        {
            int workIdRa = GetWorkId(projectId, assetId, "Rehab Assessment", companyId);
            int workIdFll = GetWorkId(projectId, assetId, "Full Length Lining", companyId);

            // Delete work
            WorkRehabAssessment workRehabAssessment = new WorkRehabAssessment(null);
            workRehabAssessment.DeleteDirect(workIdRa, companyId);

            // Delete work
            WorkFullLengthLining workFullLengthLining = new WorkFullLengthLining(null);
            workFullLengthLining.DeleteDirect(workIdFll, companyId);

            // Delete section
            LfsAssetSewerSection lfsAssetSewerSection = new LfsAssetSewerSection(null);
            lfsAssetSewerSection.DeleteDirect(assetId, companyId);
        }
        /// <summary>
        /// DeleteDirectRaOnly
        /// </summary>
        /// <param name="workId">workId</param>
        /// <param name="assetId">assetId</param>
        /// <param name="companyId">companyId</param>
        public void DeleteDirectRaOnly(int workId, int assetId, int companyId)
        {
            // Delete work
            WorkRehabAssessment workRehabAssessment = new WorkRehabAssessment(null);
            workRehabAssessment.DeleteDirect(workId, companyId);

            // Delete section
            LfsAssetSewerSection lfsAssetSewerSection = new LfsAssetSewerSection(null);
            lfsAssetSewerSection.DeleteDirect(assetId, companyId);
        }
Пример #6
0
        /// <summary>
        /// Delete
        /// </summary>
        /// <param name="workId">workId</param>
        /// <param name="assetId">assetId</param>
        /// <param name="companyId">companyId</param>
        private void Delete(int workId, int assetId, int companyId)
        {
            // Delete work
            WorkJunctionLiningSection workJunctionLiningSection = new WorkJunctionLiningSection(null);
            workJunctionLiningSection.DeleteDirect(workId, companyId);

            // Delete section
            LfsAssetSewerSection lfsAssetSewerSection = new LfsAssetSewerSection(null);
            lfsAssetSewerSection.DeleteDirect(assetId, companyId);
        }