Пример #1
0
        public ChartDTO GetChartData(string sdhID)
        {
            //mSyncLast = null;

            IsNew = true;

            mShowPropertyDic = GetShowPropertyData();

            // 刷新状态
            SensorHelper <object> helper = new SensorHelper <object>();

            mSensor = helper.SelectSingle <SensorEntity>(string.Format("SensorID = '{0}'", mSensor.SensorID.ToString().ToUpper()), string.Empty);

            SensorDataHeadBll    bllHead = new SensorDataHeadBll();
            SensorDataHeadEntity eHead   = bllHead.GetEntity(new Guid(sdhID));

            if (eHead == null)
            {
                return(null);
            }
            else
            {
                if (eHead.IsCompressed != null && eHead.IsCompressed.HasValue && eHead.IsCompressed.Value)
                {
                    // 已压缩
                    mIsCompressed         = true;
                    mSensorCompressedData = new SensorCompressedDataHelper(eHead);
                }

                return(GetChartDataByHead(eHead));
            }
        }
Пример #2
0
        public ChartDTO GetChartData(string sdhID)
        {
            mSyncLast = null;
            mDataDic  = new Dictionary <string, DataRow[]>();

            IsNew = true;

            mProgramData = null;

            mShowPropertyDic = GetShowPropertyData();

            // 刷新状态
            SensorHelper <object> helper = new SensorHelper <object>();

            mSensor = helper.SelectSingle <SensorEntity>(string.Format("SensorID = '{0}'", mSensor.SensorID.ToString().ToUpper()), string.Empty);

            SensorDataHeadBll    bllHead = new SensorDataHeadBll();
            SensorDataHeadEntity eHead   = bllHead.GetEntity(new Guid(sdhID));

            if (eHead == null)
            {
                return(null);
            }
            else
            {
                if (eHead.IsCompressed != null && eHead.IsCompressed.HasValue && eHead.IsCompressed.Value)
                {
                    // 已压缩
                    mIsCompressed         = true;
                    mSensorCompressedData = new SensorCompressedDataHelper(eHead);
                }

                //SensorDataLineBll bllLine = new SensorDataLineBll();
                //mSectionList = bllLine.GetSensorDataLineByDataType(eHead.SensorDataHeadID.ToString(), Utility.GetEnumValue(DataType.Body_SectionTitle));
                mProgramData = GetProgramData(eHead);

                return(GetChartDataByHead(eHead));
            }
        }