Ejemplo n.º 1
0
        /// <summary>
        /// UpdateDirect
        /// </summary>
        /// <param name="countryId">countryId</param>
        /// <param name="provinceId">provinceId</param>
        /// <param name="countyId">countyId</param>
        /// <param name="cityId">cityId</param>
        /// <param name="projectId">projectId</param>
        /// <param name="companyId">companyId</param>
        public void UpdateDirect(Int64? countryId, Int64? provinceId, Int64? countyId, Int64? cityId, int projectId, int companyId)
        {
            FlatSectionJlsTDS flatSectionJlsChanges = (FlatSectionJlsTDS)Data.GetChanges();
            if (flatSectionJlsChanges.FlatSectionJls.Rows.Count > 0)
            {
                FlatSectionJlsGateway flatSectionJlsGateway = new FlatSectionJlsGateway(flatSectionJlsChanges);

                // Update Jls
                foreach (FlatSectionJlsTDS.FlatSectionJlsRow flatSectionJlsRow in (FlatSectionJlsTDS.FlatSectionJlsDataTable)flatSectionJlsChanges.FlatSectionJls)
                {
                    // ... Unchanged values
                    int workId = flatSectionJlsRow.WorkID;
                    int assetId = flatSectionJlsGateway.GetAssetId(workId);
                    string sectionId = flatSectionJlsGateway.GetSectionId(workId);
                    int? usmh = flatSectionJlsGateway.GetUsmhOriginal(workId);
                    int? dsmh = flatSectionJlsGateway.GetDsmhOriginal(workId);
                    int numLats = flatSectionJlsGateway.GetNumLats(workId);
                    int notLinedYet = flatSectionJlsGateway.GetNotLinedYet(workId);
                    bool allMeasured = flatSectionJlsGateway.GetAllMeasured(workId);
                    string issueWithLaterals = flatSectionJlsGateway.GetIssueWithLaterals(workId);
                    int notMeasuredYet = flatSectionJlsGateway.GetNotMeasuredYet(workId);
                    int notDeliveredYet = flatSectionJlsGateway.GetNotDeliveredYet(workId);
                    int availableToLine = flatSectionJlsGateway.GetAvailableToLine(workId);

                    // ... Original values
                    string originalStreet = flatSectionJlsGateway.GetStreetOriginal(workId);
                    string originalUsmhId = flatSectionJlsGateway.GetUsmhIdOriginal(workId);
                    string originalDsmhId = flatSectionJlsGateway.GetDsmhIdOriginal(workId);
                    string originalSize_ = flatSectionJlsGateway.GetSize_Original(workId);
                    string originalLength = flatSectionJlsGateway.GetLengthOriginal(workId);
                    string originalSubArea = flatSectionJlsGateway.GetSubAreaOriginal(workId);
                    string originalTrafficControl = flatSectionJlsGateway.GetTrafficControlOriginal(workId);
                    string originalTrafficControlDetails = flatSectionJlsGateway.GetTrafficControlDetailsOriginal(workId);
                    bool originalStandardBypass = flatSectionJlsGateway.GetStandardBypassOriginal(workId);
                    string originalStandardBypassComments = flatSectionJlsGateway.GetStandardBypassCommentsOriginal(workId);

                    // ... New variables
                    string newStreet = flatSectionJlsGateway.GetStreet(workId);
                    string newUsmhId = flatSectionJlsGateway.GetUsmhId(workId);
                    string newDsmhId = flatSectionJlsGateway.GetDsmhId(workId);
                    string newSize_ = flatSectionJlsGateway.GetSize_(workId);
                    string newLength = flatSectionJlsGateway.GetLength(workId);
                    string newSubArea = flatSectionJlsGateway.GetSubArea(workId);
                    string newTrafficControl = flatSectionJlsGateway.GetTrafficControl(workId);
                    string newTrafficControlDetails = flatSectionJlsGateway.GetTrafficControlDetails(workId);
                    bool newStandardBypass = flatSectionJlsGateway.GetStandardBypass(workId);
                    string newStandardBypassComments = flatSectionJlsGateway.GetStandardBypassComments(workId);

                    // ... Update
                    Update(countryId, provinceId, countyId, cityId, projectId, workId, assetId, sectionId, numLats, notLinedYet, allMeasured, issueWithLaterals, notMeasuredYet, notDeliveredYet, usmh, originalUsmhId, dsmh, originalDsmhId, originalStreet, originalSize_, originalLength, originalSubArea, originalTrafficControl, originalTrafficControlDetails, originalStandardBypass, originalStandardBypassComments, availableToLine, newUsmhId, newDsmhId, newStreet, newSize_, newLength, newSubArea, newTrafficControl, newTrafficControlDetails, newStandardBypass, newStandardBypassComments, companyId);
                }
            }
        }