//计算检定结果是否合格
        private void SetDetectResult(E_DetectResultEntity ere, DetectResultDataItem preSession)
        {
            ere.TestedPerissibleError = Math.Round((ere.TestedValue - ere.TestStandardValue), 5);
            if (Math.Abs(ere.TestedPerissibleError) <= Math.Abs(ere.MaxPerMissibleError))
            {
                ere.Result = "合格";
            }
            else
            {
                ere.Result = "不合格";
            }

            preSession.TestedPerissibleError = ere.TestedPerissibleError;
            preSession.ValueResult = ere.Result;
        }
        private void SetDetectResult(P_DetectResultEntity p, DetectResultDataItem preSession)
        {
            if (Math.Abs(p.StandardValue - p.UpValue) < p.ValuePerMissibleError && Math.Abs(p.StandardValue - p.DownValue) < p.ValuePerMissibleError)
                p.ValueResult = "合格";
            else
                p.ValueResult = "不合格";

            if (p.UpChange < p.ChangePerMissibleError && p.DownChange < p.ChangePerMissibleError)
                p.ChangeResult = "合格";
            else
                p.ChangeResult = "不合格";

            p.HysteresisErrorValue = Math.Round((p.DownValue - p.UpValue), 5);
            if (p.HysteresisErrorValue < p.H_PerMissibleError)
                p.H_Result = "合格";
            else
                p.H_Result = "不合格";

            preSession.ValueResult = p.ValueResult;
            preSession.ChangeResult = p.ChangeResult;
            preSession.HysteresisErrorValue = p.HysteresisErrorValue;
            preSession.H_Result = p.H_Result;
        }