Exemplo n.º 1
0
        public DataTable GetMaintenanceDecisionsForRegionSurroundingSections(int regionID, int surveyNum)
        {
            if (regionID == 0)
            {
                return(new DataTable());
            }

            string regionNum = region.GetRegionNum(regionID);   // MAINTE_DECI
            string sql       = string.Format("SELECT * FROM VW_MAINT_DEC_IRI_LSAMPLES where SECTION_NO like '{0}%' and SURVEY_NO={1}  ORDER BY SECTION_NO, LANE_TYPE, SAMPLE_NO ", regionNum, surveyNum);

            return(db.ExecuteQuery(sql));
        }
Exemplo n.º 2
0
        public DataTable GetMaintenancePrioritiesForSectionSurroundingRegionReport(int regionID, bool udiDesc, bool udiAsc, bool priority)
        {
            string regionNum   = region.GetRegionNum(regionID);
            string orderByPart = GetOrderByPriorityPart(udiDesc, udiAsc, priority);
            //string surveypart = string.Format("and SURVEY_NO=(select max(survey_no) from VW_MAINT_PRIO_LANES where section_no like '{0}%') ", regionNum);

            string sql = string.Format("select * from VW_LATEST_PRIO_LANES where SECTION_ID is not null and section_no like '{0}%' {1} ", regionNum, orderByPart);

            return(db.ExecuteQuery(sql));
        }
Exemplo n.º 3
0
        public DataTable GetRegionSurroundingSectionsMaintenanceDecisions(int regionID, int surveyNum, bool details, bool notMaintOrders)
        {
            string sql = "";
            string notInMaintOrdersPart = notMaintOrders ? " and section_id not in (select SECTION_ID from MAINTAIN_ORDER_DET_LOCS where SECTION_ID is not null)  " : "";
            string regionNum            = region.GetRegionNum(regionID);

            if (details)
            {
                if (regionID == 0)
                {
                    return(new DataTable());
                }

                sql = string.Format("select * from VW_SECTIONS_MAINT_COST where section_no like '{0}%' and SURVEY_NO={1} {2} order by arname, section_no, lane_type ",
                                    regionNum, surveyNum, notInMaintOrdersPart);
            }
            else
            {
                sql = string.Format("select * from VW_SECTIONS_MAINT_COST_SUMMARY where survey_no={0} and section_no like '{1}%' {2} order by arname ",
                                    surveyNum, regionNum, notInMaintOrdersPart);
            }

            return(db.ExecuteQuery(sql));
        }