/// <summary>
        /// UpdateJLLaterals
        /// </summary>
        /// <param name="currentProjectId">currentProjectId</param>
        /// <param name="lateral_assetId">lateral_assetId</param>
        /// <param name="companyId">companyId</param>        
        /// <param name="clientInspectionNo">clientInspectionNo</param>
        /// <param name="requiresRoboticPrep">requiresRoboticPrep</param>
        /// <param name="requiresRoboticPrepDate">requiresRoboticPrepDate</param>
        /// <param name="holdClientIssue">holdClientIssue</param>
        /// <param name="holdLFSIssue">holdLFSIssue</param>
        /// <param name="flange">flange</param>
        /// <param name="dyeTestReq">dyeTestReq</param>
        /// <param name="dyeTestComplete">dyeTestComplete</param>
        private void UpdateJLLaterals(int currentProjectId, int lateral_assetId, int companyId, string clientInspectionNo, bool requiresRoboticPrep, DateTime? requiresRoboticPrepDate, bool holdClientIssue, bool holdLFSIssue, string flange, bool dyeTestReq, DateTime? dyeTestComplete, string contractYear)
        {
            // Load work id
            WorkGateway workGateway = new WorkGateway();
            workGateway.LoadByProjectIdAssetIdWorkType(currentProjectId, lateral_assetId, "Junction Lining Lateral", companyId);
            if (workGateway.Table.Rows.Count > 0)
            {
                int workId = workGateway.GetWorkId(lateral_assetId, "Junction Lining Lateral", currentProjectId);

                if (workId > 0)
                {
                    WorkJunctionLiningLateralGateway workJunctionLiningLateralGateway = new WorkJunctionLiningLateralGateway();
                    workJunctionLiningLateralGateway.LoadByWorkId(workId, companyId);

                    // Load original data
                    int originalSectionWorkId = workJunctionLiningLateralGateway.GetSectionWorkID(workId);
                    DateTime? originalPipeLocated = workJunctionLiningLateralGateway.GetPipeLocated(workId);
                    DateTime? originalServicesLocated = workJunctionLiningLateralGateway.GetServicesLocated(workId);
                    DateTime? originalCoInstalled = workJunctionLiningLateralGateway.GetCoInstalled(workId);
                    DateTime? originalBackfilledConcrete = workJunctionLiningLateralGateway.GetBackfilledConcrete(workId);
                    DateTime? originalBackfilledSoil = workJunctionLiningLateralGateway.GetBackfilledSoil(workId);
                    DateTime? originalGrouted = workJunctionLiningLateralGateway.GetGrouted(workId);
                    DateTime? originalCored = workJunctionLiningLateralGateway.GetCored(workId);
                    DateTime? originalPrepped = workJunctionLiningLateralGateway.GetPrepped(workId);
                    DateTime? originalMeasured = workJunctionLiningLateralGateway.GetMeasured(workId);
                    string originalLinerSize = workJunctionLiningLateralGateway.GetLinerSize(workId);
                    DateTime? originalInProcess = workJunctionLiningLateralGateway.GetInProcess(workId);
                    DateTime? originalInStock = workJunctionLiningLateralGateway.GetInStock(workId);
                    DateTime? originalDelivered = workJunctionLiningLateralGateway.GetDelivered(workId);
                    int? originalBuildRebuild = workJunctionLiningLateralGateway.GetBuildRebuild(workId);
                    DateTime? originalPreVideo = workJunctionLiningLateralGateway.GetPreVideo(workId);
                    DateTime? originalLinerInstalled = workJunctionLiningLateralGateway.GetLinerInstalled(workId);
                    DateTime? originalFinalVideo = workJunctionLiningLateralGateway.GetFinalVideo(workId);
                    decimal? originalCost = workJunctionLiningLateralGateway.GetCost(workId);
                    DateTime? originalVideoInspection = workJunctionLiningLateralGateway.GetVideoInspection(workId);
                    bool originalCoRequired = workJunctionLiningLateralGateway.GetCoRequired(workId);
                    bool originalPitRequired = workJunctionLiningLateralGateway.GetPitRequired(workId);
                    string originalCoPitLocation = workJunctionLiningLateralGateway.GetCoPitLocation(workId);
                    bool originalPostContractDigRequired = workJunctionLiningLateralGateway.GetPostContractDigRequired(workId);
                    DateTime? originalCoCutDown = workJunctionLiningLateralGateway.GetCoCutDown(workId);
                    DateTime? originalFinalRestoration = workJunctionLiningLateralGateway.GetFinalRestoration(workId);
                    string originalVideoLengthToPropertyLine = workJunctionLiningLateralGateway.GetVideoLengthToPropertyLine(workId);
                    bool originalLiningThruCo = workJunctionLiningLateralGateway.GetLiningThruCo(workId);
                    DateTime? originalNoticeDelivered = workJunctionLiningLateralGateway.GetNoticeDelivered(workId);
                    string originalHamiltonInspectionNumber = workJunctionLiningLateralGateway.GetHamiltonInspectionNumber(workId);
                    string originalFlange = workJunctionLiningLateralGateway.GetFlange(workId);
                    string originalGasket = workJunctionLiningLateralGateway.GetGasket(workId);
                    string originalDepthOfLocated = workJunctionLiningLateralGateway.GetDepthOfLocated(workId);
                    bool originalDigRequiredPriorToLining = workJunctionLiningLateralGateway.GetDigRequiredPriorToLining(workId);
                    DateTime? originalDigRequiredPriorToLiningCompleted = workJunctionLiningLateralGateway.GetDigRequiredPriorToLiningCompleted(workId);
                    bool originalDigRequiredAfterLining = workJunctionLiningLateralGateway.GetDigRequiredAfterLining(workId);
                    DateTime? originalDigRequiredAfterLiningCompleted = workJunctionLiningLateralGateway.GetDigRequiredAfterLiningCompleted(workId);
                    bool originalOutOfScope = workJunctionLiningLateralGateway.GetOutOfScope(workId);
                    bool originalHoldClientIssue = workJunctionLiningLateralGateway.GetHoldClientIssue(workId);
                    DateTime? originalHoldClientIssueResolved = workJunctionLiningLateralGateway.GetHoldClientIssueResolved(workId);
                    bool originalHoldLFSIssue = workJunctionLiningLateralGateway.GetHoldLFSIssue(workId);
                    DateTime? originalHoldLFSIssueResolved = workJunctionLiningLateralGateway.GetHoldLFSIssueResolved(workId);
                    bool originalRequiresRoboticPrep = workJunctionLiningLateralGateway.GetLateralRequiresRoboticPrep(workId);
                    DateTime? originalRequiresRoboticPrepCompleted = workJunctionLiningLateralGateway.GetLateralRequiresRoboticPrepCompleted(workId);
                    string originalLinerType = workJunctionLiningLateralGateway.GetLinerType(workId);
                    string originalPrepType = workJunctionLiningLateralGateway.GetPrepType(workId);
                    bool originalDyeTestReq = workJunctionLiningLateralGateway.GetDyeTestReq(workId);
                    DateTime? originalDyeTestComplete = null; if (workJunctionLiningLateralGateway.GetDyeTestComplete(workId).HasValue) originalDyeTestComplete = workJunctionLiningLateralGateway.GetDyeTestComplete(workId);
                    string originalContractYear = workJunctionLiningLateralGateway.GetContractYear(workId);

                    // New data
                    string newClientInspectionNo = clientInspectionNo;
                    bool newRequiresRoboticPrep = requiresRoboticPrep;
                    DateTime? newRequiresRoboticPrepCompleted = null; if (requiresRoboticPrepDate.HasValue) newRequiresRoboticPrepCompleted = requiresRoboticPrepDate;
                    bool newHoldClientIssue = holdClientIssue;
                    bool newHoldLFSIssue = holdLFSIssue;
                    bool newDyeTetRepair = dyeTestReq;
                    DateTime? newDyeTestComplete = null; if (dyeTestComplete.HasValue) newDyeTestComplete = dyeTestComplete;
                    string newContractYear = contractYear;

                    // Update work
                    WorkJunctionLiningLateral workJunctionLiningLateral = new WorkJunctionLiningLateral(null);
                    workJunctionLiningLateral.UpdateDirect(workId, originalSectionWorkId, originalPipeLocated, originalServicesLocated, originalCoInstalled, originalBackfilledConcrete, originalBackfilledSoil, originalGrouted, originalCored, originalPrepped, originalMeasured, originalLinerSize, originalInProcess, originalInStock, originalDelivered, originalBuildRebuild, originalPreVideo, originalLinerInstalled, originalFinalVideo, originalCost, originalVideoInspection, originalCoRequired, originalPitRequired, originalCoPitLocation, originalPostContractDigRequired, originalCoCutDown, originalFinalRestoration, false, companyId, originalVideoLengthToPropertyLine, originalLiningThruCo, originalNoticeDelivered, originalHamiltonInspectionNumber, originalFlange, originalGasket, originalDepthOfLocated, originalDigRequiredPriorToLining, originalDigRequiredPriorToLiningCompleted, originalDigRequiredAfterLining, originalDigRequiredAfterLiningCompleted, originalOutOfScope, originalHoldClientIssue, originalHoldClientIssueResolved, originalHoldLFSIssue, originalHoldLFSIssueResolved, originalRequiresRoboticPrep, originalRequiresRoboticPrepCompleted, originalLinerType, originalPrepType, originalDyeTestReq, originalDyeTestComplete, originalPipeLocated, originalServicesLocated, originalCoInstalled, originalBackfilledConcrete, originalBackfilledSoil, originalGrouted, originalCored, originalPrepped, originalMeasured, originalLinerSize, originalInProcess, originalInStock, originalDelivered, originalBuildRebuild, originalPreVideo, originalLinerInstalled, originalFinalVideo, originalCost, originalVideoInspection, originalCoRequired, originalPitRequired, originalCoPitLocation, originalPostContractDigRequired, originalCoCutDown, originalFinalRestoration, companyId, originalVideoLengthToPropertyLine, originalLiningThruCo, originalNoticeDelivered, newClientInspectionNo, flange, originalGasket, originalDepthOfLocated, originalDigRequiredPriorToLining, originalDigRequiredPriorToLiningCompleted, originalDigRequiredAfterLining, originalDigRequiredAfterLiningCompleted, originalOutOfScope, newHoldClientIssue, originalHoldClientIssueResolved,  newHoldLFSIssue, originalHoldLFSIssueResolved, newRequiresRoboticPrep, newRequiresRoboticPrepCompleted, originalLinerType, originalPrepType, newDyeTetRepair, newDyeTestComplete, originalContractYear, newContractYear);
                }
            }
        }
        /// <summary>
        /// UpdateForReport
        /// </summary>
        public void UpdateForReport()
        {
            foreach (JltoBuildReportTDS.JLToBuildRow jlToBuildRow in ((JltoBuildReportTDS.JLToBuildDataTable)Table))
            {
                // Load work
                WorkGateway workGateway = new WorkGateway();
                workGateway.LoadByProjectIdAssetIdWorkType(jlToBuildRow.ProjectID, jlToBuildRow.AssetID, "Junction Lining Lateral", jlToBuildRow.COMPANY_ID);
                int workId = workGateway.GetWorkId(jlToBuildRow.AssetID, "Junction Lining Lateral", jlToBuildRow.ProjectID);

                // Load Laterals in work
                WorkJunctionLiningLateralGateway workJunctionLiningLateralGateway = new WorkJunctionLiningLateralGateway();
                workJunctionLiningLateralGateway.LoadByWorkId(workId, jlToBuildRow.COMPANY_ID);

                // Load original data
                DateTime? originalPipeLocated = workJunctionLiningLateralGateway.GetPipeLocated(workId);
                int sectionWorkId = workJunctionLiningLateralGateway.GetSectionWorkID(workId);
                DateTime? originalServicesLocated = workJunctionLiningLateralGateway.GetServicesLocated(workId);
                DateTime? originalCoInstalled = workJunctionLiningLateralGateway.GetCoInstalled(workId);
                DateTime? originalBackfilledConcrete = workJunctionLiningLateralGateway.GetBackfilledConcrete(workId);
                DateTime? originalBackfilledSoil = workJunctionLiningLateralGateway.GetBackfilledSoil(workId);
                DateTime? originalGrouted = workJunctionLiningLateralGateway.GetGrouted(workId);
                DateTime? originalCored = workJunctionLiningLateralGateway.GetCored(workId);
                DateTime? originalPrepped = workJunctionLiningLateralGateway.GetPrepped(workId);
                DateTime? originalMeasured = workJunctionLiningLateralGateway.GetMeasured(workId);
                string originalLinerSize = workJunctionLiningLateralGateway.GetLinerSize(workId);
                DateTime? originalInProcess = workJunctionLiningLateralGateway.GetInProcess(workId);
                DateTime? originalInStock = workJunctionLiningLateralGateway.GetInStock(workId);
                DateTime? originalDelivered = workJunctionLiningLateralGateway.GetDelivered(workId);
                int? originalBuildRebuild = workJunctionLiningLateralGateway.GetBuildRebuild(workId);
                DateTime? originalPreVideo = workJunctionLiningLateralGateway.GetPreVideo(workId);
                DateTime? originalLinerInstalled = workJunctionLiningLateralGateway.GetLinerInstalled(workId);
                DateTime? originalFinalVideo = workJunctionLiningLateralGateway.GetFinalVideo(workId);
                decimal? originalCost = workJunctionLiningLateralGateway.GetCost(workId);
                DateTime? originalVideoInspection = workJunctionLiningLateralGateway.GetVideoInspection(workId);
                bool originalCoRequired = workJunctionLiningLateralGateway.GetCoRequired(workId);
                bool originalPitRequired = workJunctionLiningLateralGateway.GetPitRequired(workId);
                string originalCoPitLocation = workJunctionLiningLateralGateway.GetCoPitLocation(workId);
                bool originalPostContractDigRequired = workJunctionLiningLateralGateway.GetPostContractDigRequired(workId);
                DateTime? originalCoCutDown = workJunctionLiningLateralGateway.GetCoCutDown(workId);
                DateTime? originalFinalRestoration = workJunctionLiningLateralGateway.GetFinalRestoration(workId);
                string originalVideoLengthToPropertyLine = workJunctionLiningLateralGateway.GetVideoLengthToPropertyLine(workId);
                bool originalLiningThruCo = workJunctionLiningLateralGateway.GetLiningThruCo(workId);
                DateTime? originalNoticeDelivered = workJunctionLiningLateralGateway.GetNoticeDelivered(workId);
                string originalHamiltonInspectionNumber = workJunctionLiningLateralGateway.GetHamiltonInspectionNumber(workId);
                string originalFlange = workJunctionLiningLateralGateway.GetFlange(workId);
                string originalGasket = workJunctionLiningLateralGateway.GetGasket(workId);
                string originalDepthOfLocated = workJunctionLiningLateralGateway.GetDepthOfLocated(workId);
                bool originalDigRequiredPriorToLining = workJunctionLiningLateralGateway.GetDigRequiredPriorToLining(workId);
                DateTime? originalDigRequiredPriorToLiningCompleted = workJunctionLiningLateralGateway.GetDigRequiredPriorToLiningCompleted(workId);
                bool originalDigRequiredAfterLining = workJunctionLiningLateralGateway.GetDigRequiredAfterLining(workId);
                DateTime? originalDigRequiredAfterLiningCompleted = workJunctionLiningLateralGateway.GetDigRequiredAfterLiningCompleted(workId);
                bool originalOutOfScope = workJunctionLiningLateralGateway.GetOutOfScope(workId);
                bool originalHoldClientIssue = workJunctionLiningLateralGateway.GetHoldClientIssue(workId);
                DateTime? originalHoldClientIssueResolved = workJunctionLiningLateralGateway.GetHoldClientIssueResolved(workId);
                bool originalHoldLFSIssue = workJunctionLiningLateralGateway.GetHoldLFSIssue(workId);
                DateTime? originalHoldLFSIssueResolved = workJunctionLiningLateralGateway.GetHoldLFSIssueResolved(workId);
                bool originalRequiresRoboticPrep = workJunctionLiningLateralGateway.GetLateralRequiresRoboticPrep(workId);
                DateTime? originalRequiresRoboticPrepCompleted = workJunctionLiningLateralGateway.GetLateralRequiresRoboticPrepCompleted(workId);
                string originalLinerType = workJunctionLiningLateralGateway.GetLinerType(workId);
                string originalPrepType = workJunctionLiningLateralGateway.GetPrepType(workId);
                bool originalDyeTestReq = workJunctionLiningLateralGateway.GetDyeTestReq(workId);
                DateTime? originalDyeTestComplete = workJunctionLiningLateralGateway.GetDyeTestComplete(workId);
                string originalContractYear = workJunctionLiningLateralGateway.GetContractYear(workId);

                // New data
                DateTime? newPipeLocated = originalPipeLocated;
                DateTime? newServicesLocated = originalServicesLocated;
                DateTime? newCoInstalled = originalCoInstalled;
                DateTime? newBackfilledConcrete = originalBackfilledConcrete;
                DateTime? newBackfilledSoil = originalBackfilledSoil;
                DateTime? newGrouted = originalGrouted;
                DateTime? newCored = originalCored;
                DateTime? newPrepped = originalPrepped;
                DateTime? newMeasured = originalMeasured;
                string newLinerSize = originalLinerSize;
                DateTime? newInProcess = DateTime.Now;
                DateTime? newInStock = originalInStock;
                DateTime? newDelivered = originalDelivered;
                DateTime? newPreVideo = originalPreVideo;
                DateTime? newLinerInstalled = originalLinerInstalled;
                DateTime? newFinalVideo = originalFinalVideo;
                decimal? newCost = originalCost;
                DateTime? newVideoInspection = originalVideoInspection;
                bool newCoRequired = originalCoRequired;
                bool newPitRequired = originalPitRequired;
                string newCoPitLocation = originalCoPitLocation;
                bool newPostContractDigRequired = originalPostContractDigRequired;
                DateTime? newCoCutDown = originalCoCutDown;
                DateTime? newFinalRestoration = originalFinalRestoration;
                int? newBuildRebuild = (int)originalBuildRebuild + 1;
                string newVideoLengthToPropertyLine = originalVideoLengthToPropertyLine;
                bool newLiningThruCo = originalLiningThruCo;
                DateTime? newNoticeDelivered = originalNoticeDelivered;
                string newHamiltonInspectionNumber = originalHamiltonInspectionNumber;
                string newFlange = originalFlange;
                string newGasket = originalGasket;
                string newDepthOfLocated = originalDepthOfLocated;
                bool newDigRequiredPriorToLining = originalDigRequiredPriorToLining;
                DateTime? newDigRequiredPriorToLiningCompleted = originalDigRequiredPriorToLiningCompleted;
                bool newDigRequiredAfterLining = originalDigRequiredAfterLining;
                DateTime? newDigRequiredAfterLiningCompleted = originalDigRequiredAfterLiningCompleted;
                bool newOutOfScope = originalOutOfScope;
                bool newHoldClientIssue = originalHoldClientIssue;
                DateTime? newHoldClientIssueResolved = originalHoldClientIssueResolved;
                bool newHoldLFSIssue = originalHoldLFSIssue;
                DateTime? newHoldLFSIssueResolved = originalHoldLFSIssueResolved;
                bool newRequiresRoboticPrep = originalRequiresRoboticPrep;
                DateTime? newRequiresRoboticPrepCompleted = originalRequiresRoboticPrepCompleted;
                string newLinerType = originalLinerType;
                string newPrepType = originalPrepType;
                bool newDyeTestReq = originalDyeTestReq;
                DateTime? newDyeTestComplete = originalDyeTestComplete;
                string newContractYear = originalContractYear;

                // Update Lateral
                WorkJunctionLiningLateral workJunctionLiningLateral = new WorkJunctionLiningLateral(null);
                workJunctionLiningLateral.UpdateDirect(workId, sectionWorkId, originalPipeLocated, originalServicesLocated, originalCoInstalled, originalBackfilledConcrete, originalBackfilledSoil, originalGrouted, originalCored, originalPrepped, originalMeasured, originalLinerSize, originalInProcess, originalInStock, originalDelivered, originalBuildRebuild, originalPreVideo, originalLinerInstalled, originalFinalVideo, originalCost, originalVideoInspection, originalCoRequired, originalPitRequired, originalCoPitLocation, originalPostContractDigRequired, originalCoCutDown, originalFinalRestoration, false, jlToBuildRow.COMPANY_ID, originalVideoLengthToPropertyLine, originalLiningThruCo, originalNoticeDelivered, originalHamiltonInspectionNumber, originalFlange, originalGasket, originalDepthOfLocated, originalDigRequiredPriorToLining, originalDigRequiredPriorToLiningCompleted, originalDigRequiredAfterLining, originalDigRequiredAfterLiningCompleted, originalOutOfScope, originalHoldClientIssue, originalHoldClientIssueResolved, originalHoldLFSIssue, originalHoldLFSIssueResolved, originalRequiresRoboticPrep, originalRequiresRoboticPrepCompleted, originalLinerType, originalPrepType, originalDyeTestReq, originalDyeTestComplete, newPipeLocated, newServicesLocated, newCoInstalled, newBackfilledConcrete, newBackfilledSoil, newGrouted, newCored, newPrepped, newMeasured, newLinerSize, newInProcess, newInStock, newDelivered, newBuildRebuild, newPreVideo, newLinerInstalled, newFinalVideo, newCost, newVideoInspection, newCoRequired, newPitRequired, newCoPitLocation, newPostContractDigRequired, newCoCutDown, newFinalRestoration, jlToBuildRow.COMPANY_ID, newVideoLengthToPropertyLine, newLiningThruCo, newNoticeDelivered, newHamiltonInspectionNumber, newFlange, newGasket, newDepthOfLocated, newDigRequiredPriorToLining, newDigRequiredPriorToLiningCompleted, newDigRequiredAfterLining, newDigRequiredAfterLiningCompleted, newOutOfScope, newHoldClientIssue, newHoldClientIssueResolved, newHoldLFSIssue, newHoldLFSIssueResolved, newRequiresRoboticPrep, newRequiresRoboticPrepCompleted, newLinerType, newPrepType, newDyeTestReq, newDyeTestComplete, originalContractYear, newContractYear);
            }
        }
        /// <summary>
        /// WorkUpdate
        /// </summary>
        /// <param name="currentProjectId">currentProjectId</param>
        /// <param name="workType">workType</param>
        /// <param name="assetId">assetId</param>
        /// <param name="sectionWorkId">sectionWorkId</param>
        /// <param name="pipeLocated">pipeLocated</param>
        /// <param name="servicesLocated">servicesLocated</param>
        /// <param name="coInstalled">coInstalled</param>
        /// <param name="backfilledConcrete">backfilledConcrete</param>
        /// <param name="backfilledSoil">backfilledSoil</param>
        /// <param name="grouted">grouted</param>
        /// <param name="cored">cored</param>
        /// <param name="prepped">prepped</param>
        /// <param name="measured">measured</param>
        /// <param name="linerSize">linerSize</param>
        /// <param name="inProcess">inProcess</param>
        /// <param name="inStock">inStock</param>
        /// <param name="delivered">delivered</param>
        /// <param name="buildRebuild">buildRebuild</param>
        /// <param name="preVideo">preVideo</param>
        /// <param name="linerInstalled">linerInstalled</param>
        /// <param name="finalVideo">finalVideo</param>
        /// <param name="cost">cost</param>
        /// <param name="videoInspection">videoInspection</param>
        /// <param name="coRequired">coRequired</param>
        /// <param name="pitRequired">pitRequired</param>
        /// <param name="coPitLocation">coPitLocation</param>
        /// <param name="postContractDigRequired">postContractDigRequired</param>
        /// <param name="coCutDown">coCutDown</param>
        /// <param name="finalRestoration">finalRestoration</param>
        /// <param name="deleted">deleted</param>
        /// <param name="companyId">companyId</param>
        /// <param name="videoLengthToPropertyLine">videoLengthToPropertyLine</param>
        /// <param name="liningThruCo">liningThruCo</param>
        /// <param name="noticeDelivered">noticeDelivered</param>
        /// <param name="hamiltonInspectionNumber">hamiltonInspectionNumber</param>
        /// <param name="flange">flange</param>
        /// <param name="gasket">gasket</param>
        /// <param name="depthOfLocated">depthOfLocated</param>
        /// <param name="digRequiredPriorToLining">digRequiredPriorToLining</param>
        /// <param name="digRequiredPriorToLiningCompleted">digRequiredPriorToLiningCompleted</param>
        /// <param name="digRequiredAfterLining">digRequiredAfterLining</param>
        /// <param name="digRequiredAfterLiningCompleted">digRequiredAfterLiningCompleted</param>
        /// <param name="outOfScope">outOfScope</param>
        /// <param name="holdClientIssue">holdClientIssue</param>
        /// <param name="holdClientIssueResolved">holdClientIssueResolved</param>
        /// <param name="holdLFSIssue">holdLFSIssue</param>
        /// <param name="holdLFSIssueResolved">holdLFSIssueResolved</param>
        /// <param name="requiresRoboticPrep">requiresRoboticPrep</param>
        /// <param name="requiresRoboticPrepCompleted">requiresRoboticPrepCompleted</param>
        /// <param name="linerType">linerType</param>
        /// <param name="prepType">prepType</param>
        /// <param name="dyeTestReq">dyeTestReq</param>
        /// <param name="dyeTestComplete">dyeTestComplete</param>
        private void WorkUpdate(int currentProjectId, int assetId, int sectionWorkId, DateTime? pipeLocated, DateTime? servicesLocated, DateTime? coInstalled, DateTime? backfilledConcrete, DateTime? backfilledSoil, DateTime? grouted, DateTime? cored, DateTime? prepped, DateTime? measured, string linerSize, DateTime? inProcess, DateTime? inStock, DateTime? delivered, int? buildRebuild, DateTime? preVideo, DateTime? linerInstalled, DateTime? finalVideo, decimal? cost, DateTime? videoInspection, bool coRequired, bool pitRequired, string coPitLocation, bool postContractDigRequired, DateTime? coCutDown, DateTime? finalRestoration, bool deleted, int companyId, string videoLengthToPropertyLine, bool liningThruCo, DateTime? noticeDelivered, string hamiltonInspectionNumber, string flange, string gasket, string depthOfLocated, bool digRequiredPriorToLining, DateTime? digRequiredPriorToLiningCompleted, bool digRequiredAfterLining, DateTime? digRequiredAfterLiningCompleted, bool outOfScope, bool holdClientIssue, DateTime? holdClientIssueResolved, bool holdLFSIssue, DateTime? holdLFSIssueResolved, bool requiresRoboticPrep, DateTime? requiresRoboticPrepCompleted, string linerType, string prepType, bool dyeTestReq, DateTime? dyeTestComplete, string contractYear)
        {
            // Load work id
            WorkGateway workGateway = new WorkGateway();
            workGateway.LoadByProjectIdAssetIdWorkType(currentProjectId, assetId, "Junction Lining Lateral", companyId);
            int workId = workGateway.GetWorkId(assetId, "Junction Lining Lateral", currentProjectId);

            WorkJunctionLiningLateralGateway workJunctionLiningLateralGateway = new WorkJunctionLiningLateralGateway();
            workJunctionLiningLateralGateway.LoadByWorkId(workId, companyId);

            // Load original data
            DateTime? originalPipeLocated = workJunctionLiningLateralGateway.GetPipeLocated(workId);
            DateTime? originalServicesLocated = workJunctionLiningLateralGateway.GetServicesLocated(workId);
            DateTime? originalCoInstalled = workJunctionLiningLateralGateway.GetCoInstalled(workId);
            DateTime? originalBackfilledConcrete = workJunctionLiningLateralGateway.GetBackfilledConcrete(workId);
            DateTime? originalBackfilledSoil = workJunctionLiningLateralGateway.GetBackfilledSoil(workId);
            DateTime? originalGrouted = workJunctionLiningLateralGateway.GetGrouted(workId);
            DateTime? originalCored = workJunctionLiningLateralGateway.GetCored(workId);
            DateTime? originalPrepped = workJunctionLiningLateralGateway.GetPrepped(workId);
            DateTime? originalMeasured = workJunctionLiningLateralGateway.GetMeasured(workId);
            string originalLinerSize = workJunctionLiningLateralGateway.GetLinerSize(workId);
            DateTime? originalInProcess = workJunctionLiningLateralGateway.GetInProcess(workId);
            DateTime? originalInStock = workJunctionLiningLateralGateway.GetInStock(workId);
            DateTime? originalDelivered = workJunctionLiningLateralGateway.GetDelivered(workId);
            int? originalBuildRebuild = workJunctionLiningLateralGateway.GetBuildRebuild(workId);
            DateTime? originalPreVideo = workJunctionLiningLateralGateway.GetPreVideo(workId);
            DateTime? originalLinerInstalled = workJunctionLiningLateralGateway.GetLinerInstalled(workId);
            DateTime? originalFinalVideo = workJunctionLiningLateralGateway.GetFinalVideo(workId);
            decimal? originalCost = workJunctionLiningLateralGateway.GetCost(workId);
            DateTime? originalVideoInspection = workJunctionLiningLateralGateway.GetVideoInspection(workId);
            bool originalCoRequired = workJunctionLiningLateralGateway.GetCoRequired(workId);
            bool originalPitRequired = workJunctionLiningLateralGateway.GetPitRequired(workId);
            string originalCoPitLocation = workJunctionLiningLateralGateway.GetCoPitLocation(workId);
            bool originalPostContractDigRequired = workJunctionLiningLateralGateway.GetPostContractDigRequired(workId);
            DateTime? originalCoCutDown = workJunctionLiningLateralGateway.GetCoCutDown(workId);
            DateTime? originalFinalRestoration = workJunctionLiningLateralGateway.GetFinalRestoration(workId);
            string originalVideoLengthToPropertyLine = workJunctionLiningLateralGateway.GetVideoLengthToPropertyLine(workId);
            bool originalLiningThruCo = workJunctionLiningLateralGateway.GetLiningThruCo(workId);
            DateTime? originalNoticeDelivered = workJunctionLiningLateralGateway.GetNoticeDelivered(workId);
            string originalHamiltonInspectionNumber = workJunctionLiningLateralGateway.GetHamiltonInspectionNumber(workId);
            string originalFlange = workJunctionLiningLateralGateway.GetFlange(workId);
            string originalGasket = workJunctionLiningLateralGateway.GetGasket(workId);
            string originalDepthOfLocated = workJunctionLiningLateralGateway.GetDepthOfLocated(workId);
            bool originalDigRequiredPriorToLining = workJunctionLiningLateralGateway.GetDigRequiredPriorToLining(workId);
            DateTime? originalDigRequiredPriorToLiningCompleted = workJunctionLiningLateralGateway.GetDigRequiredPriorToLiningCompleted(workId);
            bool originalDigRequiredAfterLining = workJunctionLiningLateralGateway.GetDigRequiredAfterLining(workId);
            DateTime? originalDigRequiredAfterLiningCompleted = workJunctionLiningLateralGateway.GetDigRequiredAfterLiningCompleted(workId);
            bool originalOutOfScope = workJunctionLiningLateralGateway.GetOutOfScope(workId);
            bool originalHoldClientIssue = workJunctionLiningLateralGateway.GetHoldClientIssue(workId);
            DateTime? originalHoldClientIssueResolved = workJunctionLiningLateralGateway.GetHoldClientIssueResolved(workId);
            bool originalHoldLFSIssue = workJunctionLiningLateralGateway.GetHoldLFSIssue(workId);
            DateTime? originalHoldLFSIssueResolved = workJunctionLiningLateralGateway.GetHoldLFSIssueResolved(workId);
            bool originalRequiresRoboticPrep = workJunctionLiningLateralGateway.GetLateralRequiresRoboticPrep(workId);
            DateTime? originalRequiresRoboticPrepCompleted = workJunctionLiningLateralGateway.GetLateralRequiresRoboticPrepCompleted(workId);
            string originalLinerType = workJunctionLiningLateralGateway.GetLinerType(workId);
            string originalPrepType = workJunctionLiningLateralGateway.GetPrepType(workId);
            bool originalDyeTestReq = workJunctionLiningLateralGateway.GetDyeTestReq(workId);
            DateTime? originalDyeTestComplete = null; if (workJunctionLiningLateralGateway.GetDyeTestComplete(workId).HasValue) originalDyeTestComplete = workJunctionLiningLateralGateway.GetDyeTestComplete(workId);
            string originalContractYear = workJunctionLiningLateralGateway.GetContractYear(workId);

            // New data
            DateTime? newPipeLocated = pipeLocated;
            DateTime? newServicesLocated = servicesLocated;
            DateTime? newCoInstalled = coInstalled;
            DateTime? newBackfilledConcrete = backfilledConcrete;
            DateTime? newBackfilledSoil = backfilledSoil;
            DateTime? newGrouted = grouted;
            DateTime? newCored = cored;
            DateTime? newPrepped = prepped;
            DateTime? newMeasured = measured;
            string newLinerSize = linerSize;
            DateTime? newInProcess = inProcess;
            DateTime? newInStock = inStock;
            DateTime? newDelivered = delivered;
            int? newBuildRebuild = buildRebuild;
            DateTime? newPreVideo = preVideo;
            DateTime? newLinerInstalled = linerInstalled;
            DateTime? newFinalVideo = finalVideo;
            decimal? newCost = cost;
            DateTime? newVideoInspection = videoInspection;
            bool newCoRequired = coRequired;
            bool newPitRequired = pitRequired;
            string newCoPitLocation = coPitLocation;
            bool newPostContractDigRequired = postContractDigRequired;
            DateTime? newCoCutDown = coCutDown;
            DateTime? newFinalRestoration = finalRestoration;
            string newVideoLengthToPropertyLine = videoLengthToPropertyLine;
            bool newLiningThruCo = liningThruCo;
            DateTime? newNoticeDelivered = noticeDelivered;
            string newHamiltonInspectionNumber = hamiltonInspectionNumber;
            string newFlange = flange;
            string newGasket = gasket;
            string newDepthOfLocated = depthOfLocated;
            bool newDigRequiredPriorToLining = digRequiredPriorToLining;
            DateTime? newDigRequiredPriorToLiningCompleted = digRequiredPriorToLiningCompleted;
            bool newDigRequiredAfterLining = digRequiredAfterLining;
            DateTime? newDigRequiredAfterLiningCompleted = digRequiredAfterLiningCompleted;
            bool newOutOfScope = outOfScope;
            bool newHoldClientIssue = holdClientIssue;
            DateTime? newHoldClientIssueResolved = holdClientIssueResolved;
            bool newHoldLFSIssue = holdLFSIssue;
            DateTime? newHoldLFSIssueResolved = holdLFSIssueResolved;
            bool newRequiresRoboticPrep = requiresRoboticPrep;
            DateTime? newRequiresRoboticPrepCompleted = requiresRoboticPrepCompleted;
            string newLinerType = linerType;
            string newPrepType = prepType;
            bool newDyeTestReq = dyeTestReq;
            DateTime? newDyeTestComplete = null; if (dyeTestComplete.HasValue) newDyeTestComplete = dyeTestComplete;
            string newContractYear = contractYear;

            // Update work
            WorkJunctionLiningLateral workJunctionLiningLateral = new WorkJunctionLiningLateral(null);
            workJunctionLiningLateral.UpdateDirect(workId, sectionWorkId, originalPipeLocated, originalServicesLocated, originalCoInstalled, originalBackfilledConcrete, originalBackfilledSoil, originalGrouted, originalCored, originalPrepped, originalMeasured, originalLinerSize, originalInProcess, originalInStock, originalDelivered, originalBuildRebuild, originalPreVideo, originalLinerInstalled, originalFinalVideo, originalCost, originalVideoInspection, originalCoRequired, originalPitRequired, originalCoPitLocation, originalPostContractDigRequired, originalCoCutDown, originalFinalRestoration, false, companyId, originalVideoLengthToPropertyLine, originalLiningThruCo, originalNoticeDelivered, originalHamiltonInspectionNumber, originalFlange, originalGasket, originalDepthOfLocated, originalDigRequiredPriorToLining, originalDigRequiredPriorToLiningCompleted, originalDigRequiredAfterLining, originalDigRequiredAfterLiningCompleted, originalOutOfScope, originalHoldClientIssue, originalHoldClientIssueResolved, originalHoldLFSIssue, originalHoldLFSIssueResolved, originalRequiresRoboticPrep, originalRequiresRoboticPrepCompleted, originalLinerType, originalPrepType, originalDyeTestReq, originalDyeTestComplete, newPipeLocated, newServicesLocated, newCoInstalled, newBackfilledConcrete, newBackfilledSoil, newGrouted, newCored, newPrepped, newMeasured, newLinerSize, newInProcess, newInStock, newDelivered, newBuildRebuild, newPreVideo, newLinerInstalled, newFinalVideo, newCost, newVideoInspection, newCoRequired, newPitRequired, newCoPitLocation, newPostContractDigRequired, newCoCutDown, newFinalRestoration, companyId, newVideoLengthToPropertyLine, newLiningThruCo, newNoticeDelivered, newHamiltonInspectionNumber, newFlange, newGasket, newDepthOfLocated, newDigRequiredPriorToLining, newDigRequiredPriorToLiningCompleted, newDigRequiredAfterLining, newDigRequiredAfterLiningCompleted, newOutOfScope, newHoldClientIssue, newHoldClientIssueResolved, newHoldLFSIssue, newHoldLFSIssueResolved, newRequiresRoboticPrep, newRequiresRoboticPrepCompleted, newLinerType, newPrepType, newDyeTestReq, newDyeTestComplete, originalContractYear, newContractYear);
        }