Exemplo n.º 1
0
        /// <summary>
        /// 计算基本误差
        /// </summary>
        /// <param name="arrNumber">要参与计算的误差数组</param>
        /// <returns></returns>
        public override CLDC_DataCore.Model.DnbModel.DnbInfo.MeterErrorBase  SetWuCha(float[] arrNumber)
        {
            CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError
                   curResult     = new CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError();
            int    AvgPriecision = getAvgPrecision();                               //取平均值修约精度
            float  intSpace      = getWuChaHzzJianJu(false);                        //化整间距
            float  AvgWuCha      = CLDC_DataCore.Function.Number.GetAvgA(arrNumber);
            float  HzzWuCha      = CLDC_DataCore.Function.Number.GetHzz(AvgWuCha, intSpace);
            string AvgNumber;
            string HZNumber;
            //添加符号
            int hzPrecision = CLDC_DataCore.Function.Common.GetPrecision(intSpace);

            AvgNumber = AddFlag(AvgWuCha, AvgPriecision).ToString();
            HZNumber  = AddFlag(HzzWuCha, hzPrecision);
            //-0.001化整成+0.0问题
            if (AvgWuCha < 0)
            {
                HZNumber = HZNumber.Replace('+', '-');
            }
            // 检测是否超过误差限
            if (AvgWuCha >= WuChaPara.MinError &&
                AvgWuCha <= WuChaPara.MaxError)
            {
                curResult.Me_chrWcJl = Variable.CTG_HeGe;
            }
            else
            {
                curResult.Me_chrWcJl = Variable.CTG_BuHeGe;
            }

            //记录误差
            string strWuCha = String.Empty;
            int    wcCount  = 0;

            for (int i = 0; i < arrNumber.Length; i++)
            {
                if (arrNumber[i] != CLDC_DataCore.Const.Variable.WUCHA_INVIADE)
                {
                    wcCount++;
                    strWuCha += String.Format("{0}|", AddFlag(arrNumber[i], AvgPriecision));
                }
                else
                {
                    strWuCha += " |";
                }
            }
            if (wcCount != arrNumber.Length)
            {
                curResult.Me_chrWcJl = Variable.CTG_BuHeGe;
            }

            strWuCha          += String.Format("{0}|", AvgNumber);
            strWuCha          += String.Format("{0}", HZNumber);
            curResult.Me_chrWc = strWuCha;

            return(curResult);
        }
Exemplo n.º 2
0
        public override CLDC_DataCore.Model.DnbModel.DnbInfo.MeterErrorBase  SetWuCha(params float[] arrNumber)
        {
            CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError
                  stResult       = new CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError();
            bool  Result         = false;
            int   NumberCount    = arrNumber.Length;
            int   intHZPrecision = getAvgPrecision();                                   //Æ«²îÖµ¼ä¾à
            float intSpace       = getWuChaHzzJianJu(true);                             //»¯Õû¼ä¾à
            float Windage        = CLDC_DataCore.Function.Number.GetWindage(arrNumber); //¼ÆËã±ê׼ƫ²î
            float HZWindage      = 0F;

            Windage   = (float)Math.Round(Windage, intHZPrecision);
            HZWindage = CLDC_DataCore.Function.Number.GetHzz(Windage, intSpace);
            //HZWindage = HZWindage / (float)NumberCount;
            string AvgNumber;
            string HZNumber;

            //Ìí¼Ó·ûºÅ
            int hzPrecision = CLDC_DataCore.Function.Common.GetPrecision(intSpace);

            AvgNumber = AddFlag(Windage, 4).Replace("+", "");
            HZNumber  = AddFlag(HZWindage, hzPrecision).Replace("+", "");

            //¼Ç¼Îó²î
            string strWuCha = String.Empty;
            int    wcCount  = 0;

            for (int i = 0; i < arrNumber.Length; i++)
            {
                if (arrNumber[i] != CLDC_DataCore.Const.Variable.WUCHA_INVIADE)
                {
                    wcCount++;
                    strWuCha += String.Format("{0}|", AddFlag(arrNumber[i], 4));
                }
                else
                {
                    strWuCha += " |";
                }
            }

            strWuCha += String.Format("{0}|", AvgNumber);
            strWuCha += String.Format("{0}", HZNumber);
            // ¼ì²âÊÇ·ñ³¬¹ýÎó²îÏÞ
            if (HZWindage <= WuChaPara.MaxError && HZWindage >= WuChaPara.MinError)
            {
                Result = true;
            }
            if (wcCount != arrNumber.Length)
            {
                Result = false;
            }

            stResult.Me_chrWcJl = CLDC_DataCore.Function.Common.ConverResult(Result);
            stResult.Me_chrWc   = strWuCha;
            return(stResult);
        }
Exemplo n.º 3
0
        public override void SetData(CLDC_DataCore.Model.DnbModel.DnbInfo.MeterBasicInfo MeterInfo, bool allowedit)
        {
            base.SetData(MeterInfo, allowedit);
            Grid_Main.Rows.Clear();

            for (int i = Grid_Main.Columns.Count - 1; i > 6; i--)
            {
                Grid_Main.Columns.RemoveAt(i);
            }

            int ColCount = 7;
            //将MeterInfo.MeterErrors的Item项目枚举出,把所有Key字符串放到DataTable中,并且按照升序检索出来
            DataTable dtKeys = new DataTable();

            dtKeys.Columns.Add("Keys", typeof(string));
            dtKeys.Columns.Add("PrjId", typeof(string));
            foreach (string Key in MeterInfo.MeterErrors.Keys)
            {
                CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError MeterError = MeterInfo.MeterErrors[Key];
                //是否只显示不合格数据
                if (!IsDisplayAll && MeterError.Me_chrWcJl != CLDC_DataCore.Const.Variable.CTG_BuHeGe)
                {
                    continue;
                }
                dtKeys.Rows.Add(Key, MeterInfo.MeterErrors[Key].Me_chrProjectNo);
                //只计算标准偏差的数据
                if (MeterError.Me_chrProjectNo == null)
                {
                    continue;
                }
                if (MeterError.Me_chrProjectNo[0] == '2')
                {
                    string[] arWc = MeterError.Me_chrWcMore.Split('|');
                    if (5 + arWc.Length > ColCount)
                    {
                        ColCount = 5 + arWc.Length;
                    }
                }
            }
            //ColCount += 1;

            for (int j = 6; j < ColCount; j++)
            {
                int colIndex = 0;
                if (j != ColCount - 1)
                {
                    colIndex = Grid_Main.Columns.Add(string.Format("误差{0}", j - 5), string.Format("误差{0}", j - 5));
                }
                else
                {
                    colIndex = Grid_Main.Columns.Add("结论", "结论");
                }
                Grid_Main.Columns[colIndex].AutoSizeMode          = DataGridViewAutoSizeColumnMode.Fill;
                Grid_Main.Columns[colIndex].FillWeight            = 5;
                Grid_Main.Columns[colIndex].ReadOnly              = true;
                Grid_Main.Columns[colIndex].SortMode              = DataGridViewColumnSortMode.NotSortable;
                Grid_Main.Columns[colIndex].DefaultHeaderCellType = Grid_Main.Columns[0].DefaultHeaderCellType;
            }

            //只计算标准偏差的数据
            DataRow[] Rows = dtKeys.Select("Keys <> '' and  PrjId Like '2%' ", "PrjId asc");

            //Grid_Main.SuspendLayout();

            for (int j = 0; j < Rows.Length; j++)
            {
                string Key = Rows[j][0].ToString();
                CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError MeterError = MeterInfo.MeterErrors[Key];
                string PrjId = MeterError.Me_chrProjectNo;

                int rowIndex = Grid_Main.Rows.Add();

                Grid_Main["表位", rowIndex].Value = MeterInfo.ToString();

                #region 功率方向
                switch (PrjId[1])
                {
                case '1':
                    Grid_Main["功率方向", rowIndex].Value = "正向有功"; break;

                case '2':
                    Grid_Main["功率方向", rowIndex].Value = "反向有功"; break;

                case '3':
                    Grid_Main["功率方向", rowIndex].Value = "正向无功"; break;

                case '4':
                    Grid_Main["功率方向", rowIndex].Value = "反向无功"; break;

                case '5':
                    Grid_Main["功率方向", rowIndex].Value = "第一象限无功"; break;

                case '6':
                    Grid_Main["功率方向", rowIndex].Value = "第二象限无功"; break;

                case '7':
                    Grid_Main["功率方向", rowIndex].Value = "第三象限无功"; break;

                case '8':
                    Grid_Main["功率方向", rowIndex].Value = "第四象限无功"; break;

                default:
                    break;
                }
                #endregion

                #region 功率元件
                switch (PrjId[2])
                {
                case '1':
                    Grid_Main["功率元件", rowIndex].Value = "合元"; break;

                case '2':
                    Grid_Main["功率元件", rowIndex].Value = "A元"; break;

                case '3':
                    Grid_Main["功率元件", rowIndex].Value = "B元"; break;

                case '4':
                    Grid_Main["功率元件", rowIndex].Value = "C元"; break;

                default:
                    break;
                }
                #endregion

                //功率因数
                Grid_Main["功率因数", rowIndex].Value = MeterError.Me_chrGlys;

                //电流倍数
                Grid_Main["负载电流", rowIndex].Value = MeterError.Me_dblxIb;

                string[] arWC = MeterError.Me_chrWcMore.Split('|');

                //化整值
                if (arWC.Length > 0)
                {
                    Grid_Main["化整值", rowIndex].Value = arWC[arWC.Length - 1]; //GetNewCell(Key,MeterError.MeWc,arWC.Length - 1);//new SourceGrid.Cells.Cell(arWC[arWC.Length - 1]);
                }

                //平均值
                if (arWC.Length > 1)
                {
                    Grid_Main["原始值", rowIndex].Value = arWC[arWC.Length - 2]; //GetNewCell(Key, MeterError.MeWc, arWC.Length - 2);//new SourceGrid.Cells.Cell(arWC[arWC.Length - 2]);
                }

                //1-10次误差值
                for (int k = 0; k < arWC.Length - 2; k++)
                {
                    Grid_Main[k + 7, rowIndex].Value = arWC[k];// GetNewCell(Key,MeterError.MeWc, j);//new SourceGrid.Cells.Cell(arWC[j]);
                }
                //结论
                Grid_Main["结论", rowIndex].Value = MeterError.Me_chrWcJl; //GetNewCell(Key, meterError.Me_chrWcJl, 0);


                //如果不合格则显示红色
                if (Grid_Main["结论", rowIndex].Value.ToString() == CLDC_DataCore.Const.Variable.CTG_BuHeGe)
                {
                    Grid_Main["结论", rowIndex].Style.ForeColor = Color.Red;// CLDC_MeterUI.UI_Detection.Main.Color_Grid_BuHeGe;
                }
            }

            SpanRow(0, Grid_Main.Rows.Count, 0);
        }
Exemplo n.º 4
0
        public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit)
        {
            base.SetData(MeterGroup, allowedit);
            Grid_Main.Rows.Clear();
            for (int i = Grid_Main.Columns.Count - 1; i > 6; i--)
            {
                Grid_Main.Columns.RemoveAt(i);
            }

            int ColCount = 7;
            //将MeterInfo.MeterErrors的Item项目枚举出
            //把所有Key字符串放到DataTable的行中,并且按照升序检索出来
            DataTable dtKeys = new DataTable();

            dtKeys.Columns.Add("Keys", typeof(string));
            dtKeys.Columns.Add("PrjId", typeof(string));
            bool status = true;

            for (int i = 0; i < MeterGroup.MeterGroup.Count && status; i++)
            {
                if (!MeterGroup.MeterGroup[i].YaoJianYn)
                {
                    continue;
                }
                foreach (string Key in MeterGroup.MeterGroup[i].MeterErrors.Keys)
                {
                    CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError meterError = MeterGroup.MeterGroup[i].MeterErrors[Key];
                    //是否只显示不合格数据
                    if (!IsDisplayAll && meterError.Me_chrWcJl != CLDC_DataCore.Const.Variable.CTG_BuHeGe)
                    {
                        continue;
                    }
                    dtKeys.Rows.Add(Key, meterError.Me_chrProjectNo);
                    //只计算基本误差的数据
                    if (meterError.Me_chrProjectNo == null)
                    {
                        continue;
                    }
                    if (meterError.Me_chrProjectNo[0] == '1')
                    {
                        string[] arWc = meterError.Me_chrWcMore.Split('|');
                        if (5 + arWc.Length > ColCount)
                        {
                            ColCount = 5 + arWc.Length;
                        }
                    }
                    status = false;
                }
            }
            //ColCount += 1;

            for (int i = 6; i < ColCount; i++)
            {
                int colIndex = 0;
                if (i != ColCount - 1)
                {
                    colIndex = Grid_Main.Columns.Add(string.Format("误差{0}", i - 5), string.Format("误差{0}", i - 5));
                }
                else
                {
                    colIndex = Grid_Main.Columns.Add("结论", "结论");
                }
                Grid_Main.Columns[colIndex].AutoSizeMode          = DataGridViewAutoSizeColumnMode.Fill;
                Grid_Main.Columns[colIndex].FillWeight            = 5;
                Grid_Main.Columns[colIndex].ReadOnly              = true;
                Grid_Main.Columns[colIndex].SortMode              = DataGridViewColumnSortMode.NotSortable;
                Grid_Main.Columns[colIndex].DefaultHeaderCellType = Grid_Main.Columns[0].DefaultHeaderCellType;
            }

            //只计算基本误差的数据
            DataRow[] Rows = dtKeys.Select("Keys <> '' and  PrjId Like '1%' ", "PrjId asc");


            for (int i = 0; i < MeterGroup._Bws; i++)
            {
                for (int j = 0; j < Rows.Length; j++)
                {
                    string Key = Rows[j][0].ToString();
                    if (!MeterGroup.MeterGroup[i].MeterErrors.ContainsKey(Key))
                    {
                        continue;
                    }
                    CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError MeterError = MeterGroup.MeterGroup[i].MeterErrors[Key];
                    string PrjId = MeterError.Me_chrProjectNo;

                    int rowIndex = Grid_Main.Rows.Add();

                    Grid_Main["表位", rowIndex].Value = MeterGroup.MeterGroup[i].ToString();

                    #region 功率方向

                    switch (PrjId[1])
                    {
                    case '1':
                        Grid_Main["功率方向", rowIndex].Value = "正向有功"; break;

                    case '2':
                        Grid_Main["功率方向", rowIndex].Value = "反向有功"; break;

                    case '3':
                        Grid_Main["功率方向", rowIndex].Value = "正向无功"; break;

                    case '4':
                        Grid_Main["功率方向", rowIndex].Value = "反向无功"; break;

                    case '5':
                        Grid_Main["功率方向", rowIndex].Value = "第一象限无功"; break;

                    case '6':
                        Grid_Main["功率方向", rowIndex].Value = "第二象限无功"; break;

                    case '7':
                        Grid_Main["功率方向", rowIndex].Value = "第三象限无功"; break;

                    case '8':
                        Grid_Main["功率方向", rowIndex].Value = "第四象限无功"; break;

                    default:
                        break;
                    }
                    #endregion

                    #region 功率元件

                    switch (PrjId[2])
                    {
                    case '1':
                        Grid_Main["功率元件", rowIndex].Value = "合元"; break;

                    case '2':
                        Grid_Main["功率元件", rowIndex].Value = "A元"; break;

                    case '3':
                        Grid_Main["功率元件", rowIndex].Value = "B元"; break;

                    case '4':
                        Grid_Main["功率元件", rowIndex].Value = "C元"; break;

                    default:
                        break;
                    }
                    #endregion

                    //功率因数
                    Grid_Main["功率因数", rowIndex].Value = MeterError.Me_chrGlys;

                    //电流倍数
                    Grid_Main["负载电流", rowIndex].Value = MeterError.Me_dblxIb;

                    string[] arWC = MeterError.Me_chrWcMore.Split('|');

                    //化整值
                    if (arWC.Length > 0)
                    {
                        Grid_Main["化整值", rowIndex].Value = arWC[arWC.Length - 1]; //GetNewCell(Key,MeterError.MeWc,arWC.Length - 1);//new SourceGrid.Cells.Cell(arWC[arWC.Length - 1]);
                    }

                    //平均值
                    if (arWC.Length > 1)
                    {
                        Grid_Main["平均值", rowIndex].Value = arWC[arWC.Length - 2]; //GetNewCell(Key, MeterError.MeWc, arWC.Length - 2);//new SourceGrid.Cells.Cell(arWC[arWC.Length - 2]);
                    }
                    try
                    {
                        //1-10次误差值
                        for (int k = 0; k < arWC.Length - 2; k++)
                        {
                            if ((k + 7) < Grid_Main.ColumnCount)
                            {
                                Grid_Main[k + 7, rowIndex].Value = arWC[k];// GetNewCell(Key,MeterError.MeWc, j);//new SourceGrid.Cells.Cell(arWC[j]);
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                    }
                    //结论
                    Grid_Main["结论", rowIndex].Value = MeterError.Me_chrWcJl; //GetNewCell(Key, meterError.Me_chrWcJl, 0);
                }
            }
            SpanRow(0, Grid_Main.Rows.Count, 0);
        }
Exemplo n.º 5
0
        private void thShowData(object obj)
        {
            CheckPlan = CLDC_DataCore.Const.GlobalUnit.g_CUS.DnbData.CheckPlan;
            CLDC_DataCore.Model.DnbModel.DnbInfo.MeterBasicInfo curMeter = null;
            if (CLDC_DataCore.Const.GlobalUnit.g_CUS == null)
            {
                return;
            }
            lock (objShowDataLock)
            {
                bool   isRead = false;
                string strKey = string.Empty;
                for (int bw = 0; bw < BwCount; bw++)
                {
                    //if (bw > BwCount) break;
                    string strMessageValue = string.Empty;
                    curMeter = CLDC_DataCore.Const.GlobalUnit.Meter(bw);
                    /*表格显示中的表位序号是从1开始*/
                    ClientTable.SetCheckBoxValue(bw + 1, curMeter.YaoJianYn);
                    if (!curMeter.YaoJianYn)
                    {
                        continue;
                    }
                    if (CLDC_DataCore.Const.GlobalUnit.g_CUS.DnbData.ActiveItemID < 0 ||
                        CLDC_DataCore.Const.GlobalUnit.g_CUS.DnbData.CheckState == CLDC_Comm.Enum.Cus_CheckStaute.停止检定)
                    {
                        //参数录入状态下刷新时显示条形码
                        strMessageValue = curMeter.Mb_ChrTxm;
                    }
                    else
                    {
                        //数据验证
                        //if (curMeter.MeterPlan == null || curMeter.MeterPlan.CheckPlan == null) continue;
                        //if (CheckPlan.Count <= CLDC_DataCore.Const.GlobalUnit.g_CUS.DnbData.ActiveItemID) return;

                        strKey = "";
                        object curPlan = CheckPlan[CLDC_DataCore.Const.GlobalUnit.g_CUS.DnbData.ActiveItemID];
                        if (curPlan is CLDC_DataCore.Struct.StPlan_ZouZi)
                        {
                            strKey = ((CLDC_DataCore.Struct.StPlan_ZouZi)curPlan).PrjID;
                        }
                        CLDC_DataCore.Model.DnbModel.DnbInfo.MeterResult curResult = null;

                        #region 预热数据显示
                        if (curPlan is StPlan_YuRe)
                        {
                            strMessageValue = "预热中";
                        }
                        #endregion

                        #region 起动/启动数据
                        else if (curPlan is StPlan_QiDong)
                        {
                            strKey  = ((int)CLDC_Comm.Enum.Cus_MeterResultPrjID.起动试验).ToString("D3");
                            strKey += ((int)((StPlan_QiDong)curPlan).PowerFangXiang).ToString();

                            if (curMeter.MeterResults.ContainsKey(strKey))
                            {
                                curResult       = curMeter.MeterResults[strKey];
                                strMessageValue = curResult.Mr_chrRstValue;
                                isRead          = curResult.Mr_chrRstValue == CLDC_DataCore.Const.Variable.CTG_BuHeGe;
                            }
                            else
                            {
                                strMessageValue = "准备检定";
                            }
                        }
                        #endregion

                        #region 潜动试验显示
                        else if (curPlan is StPlan_QianDong)
                        {
                            strKey  = ((int)CLDC_Comm.Enum.Cus_MeterResultPrjID.潜动试验).ToString("000");
                            strKey += ((int)((StPlan_QianDong)curPlan).PowerFangXiang).ToString();

                            if (curMeter.MeterResults.ContainsKey(strKey))
                            {
                                curResult = curMeter.MeterResults[strKey];

                                strMessageValue = curResult.Mr_chrRstValue;
                                isRead          = curResult.Mr_chrRstValue == CLDC_DataCore.Const.Variable.CTG_BuHeGe;
                            }
                            else
                            {
                                strMessageValue = "准备检定";
                            }
                        }
                        #endregion

                        #region 基本误差/标准偏差
                        else if (curPlan is StPlan_WcPoint)
                        {
                            //strKey = "P_" + CLDC_DataCore.Const.GlobalUnit.g_CUS.DnbData.ActiveItemID;
                            StPlan_WcPoint _curPoint = (StPlan_WcPoint)curPlan;
                            CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError curErroWc = null;
                            strKey = _curPoint.PrjID;
                            if (curMeter.MeterErrors.ContainsKey(strKey))
                            {
                                curErroWc = curMeter.MeterErrors[strKey];

                                string[] strErrorValue = curErroWc.Me_chrWcMore.Split('|');
                                if (strErrorValue.Length > 0)
                                {
                                    strMessageValue = strErrorValue[0];
                                }
                                if (curErroWc.Me_chrWcJl == CLDC_DataCore.Const.Variable.CTG_BuHeGe)
                                {
                                    isRead = true;
                                }
                            }
                        }

                        #endregion

                        #region ----------特殊检定-----------
                        else if (curPlan is StPlan_SpecalCheck)
                        {
                            //Comm.Struct.CheckPoint _curPoint = (Comm.Struct.CheckPoint)curPlan;
                            strKey = "P_" + CLDC_DataCore.Const.GlobalUnit.g_CUS.DnbData.ActiveItemID;

                            CLDC_DataCore.Model.DnbModel.DnbInfo.MeterSpecialErr curErroWc = null;
                            //strKey = _curPoint.PrjID;
                            if (curMeter.MeterSpecialErrs.ContainsKey(strKey))
                            {
                                curErroWc = curMeter.MeterSpecialErrs[strKey];

                                string[] strErrorValue = curErroWc.Mse_Wc.Split('|');
                                if (strErrorValue.Length > 0)
                                {
                                    strMessageValue = strErrorValue[0];
                                }
                                if (curErroWc.Mse_Result == CLDC_DataCore.Const.Variable.CTG_BuHeGe)
                                {
                                    isRead = true;
                                }
                            }
                        }
                        #endregion

                        #region 走字数据
                        else if (curPlan is StPlan_ZouZi)
                        {
                            CLDC_DataCore.Model.DnbModel.DnbInfo.MeterZZError curZZerror = null;
                            if (curMeter.MeterZZErrors.ContainsKey(strKey))
                            {
                                curZZerror = curMeter.MeterZZErrors[strKey];
                                if (m_VerifyStep == CLDC_Comm.Enum.Cus_stVerifyStep.走字试验录起码 || m_VerifyStep == CLDC_Comm.Enum.Cus_stVerifyStep.走字试验录止码)
                                {
                                    strMessageValue = "";
                                }
                                else if (m_VerifyStep == CLDC_Comm.Enum.Cus_stVerifyStep.走字试验录止码完毕)
                                {
                                    //止码
                                    strMessageValue = curZZerror.Mz_chrZiMa.ToString();
                                }
                                else if (m_VerifyStep == CLDC_Comm.Enum.Cus_stVerifyStep.走字试验录起码完毕)
                                {
                                    //起码
                                    strMessageValue = curZZerror.Mz_chrQiMa.ToString();
                                }
                                else if (m_VerifyStep == CLDC_Comm.Enum.Cus_stVerifyStep.计算误差完毕)
                                {
                                    //起码
                                    strMessageValue = curZZerror.Mz_chrWc.ToString();
                                }
                                else
                                {
                                    //中途进入
                                    if (curZZerror.Mz_chrZiMa != -1)
                                    {
                                        strMessageValue = curZZerror.Mz_chrZiMa.ToString();
                                    }
                                    else if (curZZerror.Mz_chrQiMa != -1)
                                    {
                                        strMessageValue = curZZerror.Mz_chrQiMa.ToString();
                                    }
                                    else
                                    {
                                        strMessageValue = "";
                                    }
                                }
                                if (curZZerror.Mz_chrJL == CLDC_DataCore.Const.Variable.CTG_BuHeGe)
                                {
                                    isRead = true;
                                }
                            }
                        }
                        #endregion

                        #region 多功能数据
                        else if (curPlan is CLDC_DataCore.Struct.StPlan_Dgn)
                        {
                            strMessageValue = "检定中";
                            CLDC_DataCore.Struct.StPlan_Dgn DgnPlan = (CLDC_DataCore.Struct.StPlan_Dgn)curPlan;
                        }
                        #endregion

                        #region 载波数据
                        else if (curPlan is StPlan_Carrier)
                        {
                            strMessageValue = "检定中";
                            StPlan_Carrier CarrierPlan = (StPlan_Carrier)curPlan;
                        }
                        #endregion

                        else
                        {
                            //MUSTDO:走字,多功能检定客户端显示还没有做
                        }
                    }
                    //更新到UI
                    ClientTable.SetTextValue(bw + 1, strMessageValue);
                    ClientTable.SetTextBackColorValue(bw + 1, isRead);
                }
            }
        }
        /// <summary>
        /// 获取书签对应关键字数据
        /// </summary>
        /// <param name="DataType">数据类型</param>
        /// <param name="Items">数据对象</param>
        /// <param name="KeyValue">关键字</param>
        /// <param name="WcNum">误差次数(0=一次误差,1=二次误差。。。。。-1=误差平均值,-2=误差化整值)</param>
        /// <returns></returns>
        private string GetColValue(PrintDataType DataType, object Items, string KeyValue, int WcNum)
        {
            try
            {
                switch (DataType)
                {
                case PrintDataType.基本信息:
                    if (!((Dictionary <string, string>)Items).ContainsKey(KeyValue))
                    {
                        clsMain.WriteReportErr(2, string.Format("错误的基本信息关键字:{0}", KeyValue));
                        return("");
                    }
                    return(((Dictionary <string, string>)Items)[KeyValue]);

                case PrintDataType.误差数据:


                    CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError errorItem = clsMain.getErrorItem((Dictionary <string, CLDC_DataCore.Model.DnbModel.DnbInfo.MeterError>)Items, KeyValue);

                    if (errorItem == null)
                    {
                        clsMain.WriteReportErr(2, string.Format("错误的误差数据关键字:{0}", KeyValue));
                        return("");
                    }

                    string[] WcArr = errorItem.Me_chrWcMore.Split('|');
                    if (WcNum > WcArr.Length - 2)
                    {
                        clsMain.WriteReportErr(3, string.Format("错误的误差次数关键字:{0}", WcNum));
                        return("");
                    }
                    string WcString = "";
                    if (WcNum == -1)           //平均值
                    {
                        WcString = WcArr[WcArr.Length - 2];
                    }
                    else if (WcNum == -2)          //化整值
                    {
                        ///区分0.5s级 以及1级表以上的区别

                        WcString = WcArr[WcArr.Length - 1];
                    }
                    else
                    {
                        WcString = WcArr[WcNum];
                    }
                    return(WcString);

                case PrintDataType.多功能数据:
                    if (((Dictionary <string, string>)Items).Count == 0)
                    {
                        return("");
                    }
                    if (!((Dictionary <string, string>)Items).ContainsKey(KeyValue))
                    {
                        clsMain.WriteReportErr(2, string.Format("错误的多功能数据关键字:{0}", KeyValue));
                        return("");
                    }
                    return(((Dictionary <string, string>)Items)[KeyValue]);

                case PrintDataType.走字数据:                   //"ZZDATA:P+:FL:FL(FL\Qm\Zm\Wc\Result\Mc\zhwc\ZhResult)"
                    string[] Arr_Key = KeyValue.Split(':');
                    Dictionary <string, CLDC_DataCore.Model.DnbModel.DnbInfo.MeterZZError> ZzData = Items as Dictionary <string, CLDC_DataCore.Model.DnbModel.DnbInfo.MeterZZError>;

                    int Glfx = clsMain.GetGlfxNum(Arr_Key[1]);

                    int FeiLv = clsMain.GetFeiLvNum(Arr_Key[2]);

                    foreach (CLDC_DataCore.Model.DnbModel.DnbInfo.MeterZZError ZZError in ZzData.Values)
                    {
                        if (ZZError.Mz_chrJdfx == Glfx.ToString() && ZZError.Mz_chrFl == FeiLv.ToString())
                        {
                            switch (Arr_Key[3].ToLower())
                            {
                            case "fl": return(Arr_Key[2]);

                            case "qm": return(ZZError.Mz_chrQiMa.ToString());

                            case "zm": return(ZZError.Mz_chrZiMa.ToString());

                            case "wc": return(ZZError.Mz_chrWc);

                            case "result": return(ZZError.Mz_chrJL);

                            case "mc": return(ZZError.Mz_chrQiZiMaC);

                            default:
                                return("");
                            }
                        }
                    }
                    return("");

                default:
                    return("");
                }
            }
            catch (Exception e)
            {
                clsMain.WriteReportErr(1, e.StackTrace);
                return("");
            }
        }