Example #1
0
        /// <summary>
        /// 筛选统计数据
        /// </summary>
        /// <param name="_layerNumber">分层编号</param>
        /// <returns></returns>
        public static List <StatisticGAT> SelectStatisticData(string _layerNumber)
        {
            // 定义统计数据列表
            List <StatisticGAT> _statisticList = new List <StatisticGAT>();

            // 定义分层分层编号列表、分层岩土名称列表
            List <string> layerNumberList = ProjectDataBase.ReadLayerNumberList(Program.currentProject);
            List <string> layerNameList   = ProjectDataBase.ReadLayerNameList(Program.currentProject);

            // 提取分层岩土名称
            string _layerName = "";

            for (int i = 0; i < layerNumberList.Count; i++)
            {
                if (layerNumberList[i] == _layerNumber)
                {
                    _layerName = layerNameList[i];
                }
            }

            // 赋值统计数据列表
            List <GrainAnalysisTest> gatList = GrainAnalysisTestDataBase.SelectByZkAndLayer(Program.currentProject, "", _layerNumber);

            if (gatList.Count > 0)
            {
                StatisticGAT statistic = new StatisticGAT(_layerNumber, _layerName, gatList);
                _statisticList.Add(statistic);
            }

            // 返回
            return(_statisticList);
        }
Example #2
0
        /// <summary>
        /// 读取统计数据
        /// </summary>
        /// <returns></returns>
        public static List <StatisticGAT> SelectStatisticData()
        {
            // 定义统计数据列表
            List <StatisticGAT> _statisticList = new List <StatisticGAT>();

            // 定义分层分层编号列表、分层岩土名称列表
            List <string> layerNumberList = ProjectDataBase.ReadLayerNumberList(Program.currentProject);
            List <string> layerNameList   = ProjectDataBase.ReadLayerNameList(Program.currentProject);

            // 在分层编号列表中循环,赋值统计数据列表
            for (int i = 0; i < layerNumberList.Count; i++)
            {
                // 检查当前的分层编号下在数据库中是否有内容,并添加数据到统计列表
                List <GrainAnalysisTest> gatList = GrainAnalysisTestDataBase.SelectByZkAndLayer(Program.currentProject, "", layerNumberList[i]);
                if (gatList.Count > 0)
                {
                    StatisticGAT statistic = new StatisticGAT(layerNumberList[i], layerNameList[i], gatList);
                    _statisticList.Add(statistic);
                }
            }

            // 返回
            return(_statisticList);
        }