Exemplo n.º 1
0
        /// <summary>
        /// UpdateSection
        /// </summary>
        /// <param name="countryId">countryId</param>
        /// <param name="provinceId">provinceId</param>
        /// <param name="countyId">countyId</param>
        /// <param name="cityId">cityId</param>
        /// <param name="assetId">assetId</param>
        /// <param name="sectionId">sectionId</param>
        /// <param name="originalStreet">originalStreet</param>
        /// <param name="originalUsmh">originalUsmh</param>
        /// <param name="originalDsmh">originalDsmh</param>
        /// <param name="originalSize_">originalSize_</param>
        /// <param name="originalLength">originalLength</param>
        /// <param name="originalSubArea">originalSubArea</param>
        /// <param name="newStreet">newStreet</param>
        /// <param name="newUsmh">newUsmh</param>
        /// <param name="newDsmh">newDsmh</param>
        /// <param name="newSize_">newSize_</param>
        /// <param name="newLength">newLength</param>
        /// <param name="newSubArea">newSubArea</param>
        /// <param name="companyId">companyId</param>
        /// <param name="projectId">projectId</param>
        /// <param name="workId">workId</param>
        private void UpdateSection(Int64? countryId, Int64? provinceId, Int64? countyId, Int64? cityId, int assetId, string sectionId, string originalStreet, int? originalUsmh, int? originalDsmh, string originalSize_, string originalLength, string originalSubArea, string newStreet, int? newUsmh, int? newDsmh, string newSize_, string newLength, string newSubArea, int companyId, int projectId, int workId)
        {
            // Load data
            AssetSewerSectionGateway assetSewerSectionGateway = new AssetSewerSectionGateway();
            assetSewerSectionGateway.LoadByAssetId(assetId, companyId);

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

            // Get unchanged data
            // ... section
            string mapSize_ = assetSewerSectionGateway.GetMapSize(assetId);
            string mapLength = assetSewerSectionGateway.GetMapLength(assetId);
            int? laterals = assetSewerSectionGateway.GetLaterals(assetId);
            int? liveLaterals = assetSewerSectionGateway.GetLiveLaterals(assetId);
            string flowDirection = assetSewerSectionGateway.GetFlowDirection(assetId);
            string usmhDepth = assetSewerSectionGateway.GetUSMHDepth(assetId);
            string dsmhDepth = assetSewerSectionGateway.GetDSMHDepth(assetId);

            // ... lfs section
            string steelTapeTroughSewer = lfsAssetSewerSectionGateway.GetSteelTapeThroughSewer(assetId);
            string usmhMouth12 = lfsAssetSewerSectionGateway.GetUSMHMouth12(assetId);
            string usmhMouth1 = lfsAssetSewerSectionGateway.GetUSMHMouth1(assetId);
            string usmhMouth2 = lfsAssetSewerSectionGateway.GetUSMHMouth2(assetId);
            string usmhMouth3 = lfsAssetSewerSectionGateway.GetUSMHMouth3(assetId);
            string usmhMouth4 = lfsAssetSewerSectionGateway.GetUSMHMouth4(assetId);
            string usmhMouth5 = lfsAssetSewerSectionGateway.GetUSMHMouth5(assetId);
            string dsmhMouth12 = lfsAssetSewerSectionGateway.GetDSMHMouth12(assetId);
            string dsmhMouth1 = lfsAssetSewerSectionGateway.GetDSMHMouth1(assetId);
            string dsmhMouth2 = lfsAssetSewerSectionGateway.GetDSMHMouth2(assetId);
            string dsmhMouth3 = lfsAssetSewerSectionGateway.GetDSMHMouth3(assetId);
            string dsmhMouth4 = lfsAssetSewerSectionGateway.GetDSMHMouth4(assetId);
            string dsmhMouth5 = lfsAssetSewerSectionGateway.GetDSMHMouth5(assetId);
            string thickness = lfsAssetSewerSectionGateway.GetThickness(assetId);

            //Update Full Length Lining work
            if (originalLength != newLength)
            {
                steelTapeTroughSewer = newLength;
            }
            // Update
            LfsAssetSewerSection lfsAssetSewerSection = new LfsAssetSewerSection(null);
            lfsAssetSewerSection.UpdateDirect(assetId, sectionId, originalStreet, originalUsmh, originalDsmh, mapSize_, originalSize_, mapLength, originalLength, laterals, liveLaterals, flowDirection, usmhDepth, dsmhDepth, steelTapeTroughSewer, usmhMouth12, usmhMouth1, usmhMouth2, usmhMouth3, usmhMouth4, usmhMouth5, dsmhMouth12, dsmhMouth1, dsmhMouth2, dsmhMouth3, dsmhMouth4, dsmhMouth5, false, companyId, originalSubArea, thickness, assetId, sectionId, newStreet, newUsmh, newDsmh, mapSize_, newSize_, mapLength, newLength, laterals, liveLaterals, flowDirection, usmhDepth, dsmhDepth, steelTapeTroughSewer, usmhMouth12, usmhMouth1, usmhMouth2, usmhMouth3, usmhMouth4, usmhMouth5, dsmhMouth12, dsmhMouth1, dsmhMouth2, dsmhMouth3, dsmhMouth4, dsmhMouth5, false, companyId, newSubArea, thickness);
        }