private void DrawWaveFromDB(string inid, string outid)
        {
            try
            {
                testDataManager      = SpringUtils.Context.GetObject("TestDataManager") as ITBTestDataManager;
                testParameterManager = SpringUtils.Context.GetObject("TestParameterManager") as ITBTestParameterManager;
                DASP.Domain.Entitys.TBTestDataEntity      inentity      = testDataManager.Get(Guid.Parse(inid));
                DASP.Domain.Entitys.TBTestDataEntity      outentity     = testDataManager.Get(Guid.Parse(outid));
                DASP.Domain.Entitys.TBTestParameterEntity inparaentity  = testParameterManager.Get(Guid.Parse(inid));
                DASP.Domain.Entitys.TBTestParameterEntity outparaentity = testParameterManager.Get(Guid.Parse(outid));
                inlist  = DASP.Tools.SerializerUtils.SerializeToObject(inentity.Data) as List <float>;
                outlist = DASP.Tools.SerializerUtils.SerializeToObject(outentity.Data) as List <float>;
                float ingain = inparaentity.Gain;
                float incv   = Convert.ToSingle(inparaentity.CV);
                //this.CalCv.Text = Convert.ToString(cv);
                //this.WavePtNum.Text = "1024";
                this.txt4.Text = Convert.ToString(inparaentity.SF);
                this.txt2.Text = Convert.ToString(outparaentity.SF);
                this.txt1.Text = Convert.ToString(inlist.Count);
                //  nWavePtNum = paraentity.
                for (int i = 0; i < inlist.Count; i++)
                {
                    inlist[i] = inlist[i] * ingain / incv;
                }
                for (int i = 0; i < outlist.Count; i++)
                {
                    outlist[i] = outlist[i] * outparaentity.Gain / Convert.ToSingle(outparaentity.CV);
                }
                IList <int>             scape    = new List <int>();
                IList <DataBase>        dbex     = new List <DataBase>();
                IList <IList <float>[]> datalsts = new List <IList <float>[]>();
                IList <float>[]         waveData = new IList <float> [1]; //波形图只有一组绘制数据
                waveData[0] = inlist;                                     // new List<float>();  //初始化第一组数据
                datalsts.Add(waveData);

                waveData    = new IList <float> [1];//波形图只有一组绘制数据
                waveData[0] = outlist;

                datalsts.Add(waveData);
                scape.Add(50);
                scape.Add(50);
                DataBase db = new DataBase(1000f / Convert.ToSingle(inparaentity.SF), "ms", 1f, inparaentity.EU, "输入信号波形全图");
                dbex.Add(db);
                db = new DataBase(1000f / Convert.ToSingle(outparaentity.SF), "ms", 1f, outparaentity.EU, "输出信号波形全图");
                dbex.Add(db);
                this.mcadLine1.DrawParts = 2;
                this.mcadLine1.BmSpan    = 30;
                this.mcadLine1.drawall   = true;
                this.mcadLine1.SetDrawDataAll(datalsts, scape, dbex);
                this.mcadLine1.Focus();
            }
            catch (Exception ex)
            {
            }
            //this.pointsperpage.SelectedIndex = 5;
            //this.mcadLine1.Focus();
        }
Beispiel #2
0
        /// 根据试验标识读试验波形数据
        /// </summary>
        /// <param name="Fname"></param>
        private void GetWavData(string serialid)
        {
            IList <int>      scape = new List <int>();
            IList <DataBase> dbex  = new List <DataBase>();

            List <float>[] waveData   = new List <float> [1]; //波形图只有一组绘制数据
            List <float>[] SprectData = new List <float> [1]; //自谱分析结果数据
            waveData[0]   = null;                             // new List<float>();  //初始化第一组数据
            SprectData[0] = null;
            float gain = 1f;

            try
            {
                testDataManager      = SpringUtils.Context.GetObject("TestDataManager") as ITBTestDataManager;
                testParameterManager = SpringUtils.Context.GetObject("TestParameterManager") as ITBTestParameterManager;
                DASP.Domain.Entitys.TBTestDataEntity      entity     = testDataManager.Get(Guid.Parse(serialid));//"f2d72bcb-88b2-4f93-af7a-0b10834848d9"));
                DASP.Domain.Entitys.TBTestParameterEntity paraentity = testParameterManager.Get(Guid.Parse(serialid));
                // byte[] bufferData = DASP.Tools.SerializerUtils.SerializeFromObject(entity.Data) as byte[];
                waveData[0] = DASP.Tools.SerializerUtils.SerializeToObject(entity.Data) as List <float>;
                gain        = paraentity.Gain;
                float sf = Convert.ToSingle(paraentity.SF);
                float cv = Convert.ToSingle(paraentity.CV);
                //  nWavePtNum = paraentity.
                //for (int i = 0; i < waveData[0].Count; i++)
                //{
                //    waveData[0][i] = waveData[0][i] ;
                //}
                datalsts.Add(waveData);
                //datalsts.Add(waveData);
                SprectData[0] = GetSprectData(waveData[0]);
                datalsts.Add(SprectData);

                scape.Add(30);
                scape.Add(70);

                DataBase db = new DataBase(1 / sf, "s", 1f, "N");
                dbex.Add(db);
                db = new DataBase(sf / spepara.nFftPtNum, "Hz", 1f, "N");
                dbex.Add(db);

                this.mcadLine1.drawall = true;
                this.mcadLine1.SetDrawDataAll(datalsts, scape, dbex);
                //this.mcadLine1.SetDrawDataAll(datalsts);
                this.mcadLine1.Focus();
            }
            catch { }

            //datalsts.Add(waveData);
            //datalsts.Add(waveData);
            //this.mcadLine1.drawall = true;
            //this.mcadLine1.SetDrawDataAll( datalsts);
        }
Beispiel #3
0
        private List <float> GetWaveDataFromDB(string serialid, out float sf)
        {
            List <float> list = null;

            sf = 1f;
            try
            {
                testDataManager      = SpringUtils.Context.GetObject("TestDataManager") as ITBTestDataManager;
                testParameterManager = SpringUtils.Context.GetObject("TestParameterManager") as ITBTestParameterManager;
                DASP.Domain.Entitys.TBTestDataEntity      entity     = testDataManager.Get(Guid.Parse(serialid));//"f2d72bcb-88b2-4f93-af7a-0b10834848d9"));
                DASP.Domain.Entitys.TBTestParameterEntity paraentity = testParameterManager.Get(Guid.Parse(serialid));
                // byte[] bufferData = DASP.Tools.SerializerUtils.SerializeFromObject(entity.Data) as byte[];
                list = DASP.Tools.SerializerUtils.SerializeToObject(entity.Data) as List <float>;
                float gain = paraentity.Gain;
                float cv   = Convert.ToSingle(paraentity.CV);
                sf = Convert.ToSingle(paraentity.SF);
                //  nWavePtNum = paraentity.
                for (int i = 0; i < list.Count; i++)
                {
                    list[i] = list[i] * gain / cv;
                }
                //  IList<int> scape = new List<int>();
                //  IList<DataBase> dbex = new List<DataBase>();
                //  IList<IList<float>[]> datalsts = new List<IList<float>[]>();
                //  IList<float>[] waveData = new IList<float>[2];//波形图只有一组绘制数据
                //  waveData[0] = list;// new List<float>();  //初始化第一组数据
                //  // this.mcadLine1.DrawParts = 2;
                //  waveData[1] = list;
                //  this.mcadLine1.BmSpan = 30;
                //  datalsts.Add(waveData);
                // // datalsts.Add(waveData);

                //  scape.Add(40);
                // // scape.Add(60);

                //  DataBase db = new DataBase(1 / sf, "s", 1f, "N");
                //  dbex.Add(db);
                ////  dbex.Add(db);
                //  //this.mcadLine1.drawall = true;
                //  this.mcadLine1.SetDrawDataAll(datalsts, scape, dbex);
                //  this.mcadLine1.Focus();
            }
            catch (Exception ex)
            {
            }
            return(list);
        }
Beispiel #4
0
 /// <summary>
 /// 参数设置时的界面
 /// </summary>
 /// <param name="serialid"></param>
 private void DrawWaveFromDB(string serialid)
 {
     try
     {
         testDataManager      = SpringUtils.Context.GetObject("TestDataManager") as ITBTestDataManager;
         testParameterManager = SpringUtils.Context.GetObject("TestParameterManager") as ITBTestParameterManager;
         DASP.Domain.Entitys.TBTestDataEntity      entity     = testDataManager.Get(Guid.Parse(serialid));//"f2d72bcb-88b2-4f93-af7a-0b10834848d9"));
         DASP.Domain.Entitys.TBTestParameterEntity paraentity = testParameterManager.Get(Guid.Parse(serialid));
         // byte[] bufferData = DASP.Tools.SerializerUtils.SerializeFromObject(entity.Data) as byte[];
         List <float> list = DASP.Tools.SerializerUtils.SerializeToObject(entity.Data) as List <float>;
         float        gain = paraentity.Gain;
         float        cv   = Convert.ToSingle(paraentity.CV);
         this.CalCv.Text     = Convert.ToString(cv);
         this.WavePtNum.Text = "1024";
         this.WaveSf.Text    = Convert.ToString(paraentity.SF);
         indata = list;
         //  nWavePtNum = paraentity.
         for (int i = 0; i < list.Count; i++)
         {
             list[i] = list[i] * gain / cv;
         }
         IList <IList <float>[]> datalsts = new List <IList <float>[]>();
         IList <DataBase>        dbex     = new List <DataBase>();
         DataBase        db       = new DataBase(1000f / Convert.ToSingle(paraentity.SF), "ms", 1f, paraentity.EU, "波形图全程预览");
         IList <float>[] waveData = new IList <float> [1]; //波形图只有一组绘制数据
         waveData[0] = list;                               // new List<float>();  //初始化第一组数据
         this.mcadLine1.DrawParts = 2;
         this.mcadLine1.BmSpan    = 30;
         datalsts.Add(waveData);
         dbex.Add(db);
         this.mcadLine1.drawall = true;
         this.mcadLine1.SetDrawDataAll(datalsts, dbex);
         this.mcadLine1.Focus();
     }
     catch (Exception ex)
     {
     }
     //this.pointsperpage.SelectedIndex = 5;
     //this.mcadLine1.Focus();
 }
Beispiel #5
0
        /// <summary>
        /// 根据试验标识读试验波形数据
        /// </summary>
        /// <param name="Fname"></param>
        private void GetWavData(string serialid)
        {
            List <float>[] waveData   = new List <float> [1]; //波形图只有一组绘制数据
            List <float>[] SprectData = new List <float> [1]; //自谱分析结果数据
            waveData[0]   = null;                             // new List<float>();  //初始化第一组数据
            SprectData[0] = null;
            float gain = 1f;

            try
            {
                testDataManager      = SpringUtils.Context.GetObject("TestDataManager") as ITBTestDataManager;
                testParameterManager = SpringUtils.Context.GetObject("TestParameterManager") as ITBTestParameterManager;
                DASP.Domain.Entitys.TBTestDataEntity      entity     = testDataManager.Get(Guid.Parse(serialid));//"f2d72bcb-88b2-4f93-af7a-0b10834848d9"));
                DASP.Domain.Entitys.TBTestParameterEntity paraentity = testParameterManager.Get(Guid.Parse(serialid));
                // byte[] bufferData = DASP.Tools.SerializerUtils.SerializeFromObject(entity.Data) as byte[];
                waveData[0] = DASP.Tools.SerializerUtils.SerializeToObject(entity.Data) as List <float>;
                gain        = paraentity.Gain;
                float cv = Convert.ToSingle(paraentity.CV);
                //  nWavePtNum = paraentity.
                for (int i = 0; i < waveData[0].Count; i++)
                {
                    waveData[0][i] = waveData[0][i] * gain / cv;
                }
                datalsts.Add(waveData);
                SprectData[0] = GetSprectData(waveData[0]);
                datalsts.Add(SprectData);
                this.mcadLine1.drawall = true;
                this.mcadLine1.SetDrawDataAll(datalsts);
            }
            catch { }

            //datalsts.Add(waveData);
            //datalsts.Add(waveData);
            //this.mcadLine1.drawall = true;
            //this.mcadLine1.SetDrawDataAll( datalsts);
        }
Beispiel #6
0
        /// <summary>
        /// 从数据库中读取观测记录
        /// </summary>
        /// <param name="serialid"></param>
        private void DrawWaveFromDB(string serialid)
        {
            try
            {
                testDataManager      = SpringUtils.Context.GetObject("TestDataManager") as ITBTestDataManager;
                testParameterManager = SpringUtils.Context.GetObject("TestParameterManager") as ITBTestParameterManager;
                DASP.Domain.Entitys.TBTestDataEntity      entity     = testDataManager.Get(Guid.Parse(serialid));//"f2d72bcb-88b2-4f93-af7a-0b10834848d9"));
                DASP.Domain.Entitys.TBTestParameterEntity paraentity = testParameterManager.Get(Guid.Parse(serialid));
                // byte[] bufferData = DASP.Tools.SerializerUtils.SerializeFromObject(entity.Data) as byte[];
                List <float> list = DASP.Tools.SerializerUtils.SerializeToObject(entity.Data) as List <float>;
                float        gain = paraentity.Gain;
                float        cv   = Convert.ToSingle(paraentity.CV);
                float        sf   = Convert.ToSingle(paraentity.SF);

                WavePoints.Text   = Convert.ToString(list.Count);
                FreqSampling.Text = Convert.ToString(sf);
                Gain.Text         = Convert.ToString(paraentity.Gain);
                Cv.Text           = Convert.ToString(paraentity.CV);
                zUnit.Text        = paraentity.EU;
                //  nWavePtNum = paraentity.
                for (int i = 0; i < list.Count; i++)
                {
                    list[i] = list[i] * gain / cv;
                }
                IList <int>             scape    = new List <int>();
                IList <DataBase>        dbex     = new List <DataBase>();
                IList <IList <float>[]> datalsts = new List <IList <float>[]>();
                IList <float>[]         waveData = new IList <float> [1]; //波形图只有一组绘制数据
                waveData[0] = list;                                       // new List<float>();  //初始化第一组数据
                // this.mcadLine1.DrawParts = 2;
                this.mcadLine1.BmSpan = 30;
                datalsts.Add(waveData);
                datalsts.Add(waveData);

                scape.Add(35);
                scape.Add(65);

                DataBase db = new DataBase(1000f / sf, "ms", 1f, paraentity.EU, "波形图全程预览");
                dbex.Add(db);
                db = new DataBase(1000f / sf, "ms", 1f, paraentity.EU, "时域图 ");
                dbex.Add(db);
                //this.mcadLine1.drawall = true;

                this.mcadLine1.SetDrawDataAll(datalsts, scape, dbex);
                switch (this.pointsperpage.SelectedIndex)
                {
                case 0:
                    this.mcadLine1.SetDrawAera(1, 0, 128);
                    break;

                case 1:
                    this.mcadLine1.SetDrawAera(1, 0, 256);
                    break;

                case 2:
                    this.mcadLine1.SetDrawAera(1, 0, 512);
                    break;

                case 3:
                    this.mcadLine1.SetDrawAera(1, 0, 1024);
                    break;

                case 4:
                    this.mcadLine1.SetDrawAera(1, 0, 2048);
                    break;

                case 5:
                    this.mcadLine1.SetDrawAera(1, 0, 4096);
                    break;

                case 6:
                    this.mcadLine1.SetDrawAera(1, 0, 8192);
                    break;

                default:
                    //this.mcadLine1.PageNumberOfValue = -1;
                    break;
                }
                this.mcadLine1.Focus();
                this.mcadLine1.Focus();
            }
            catch (Exception ex)
            {
            }
            //this.pointsperpage.SelectedIndex = 5;
            //this.mcadLine1.Focus();
        }
Beispiel #7
0
        /// <summary>
        /// 根据参数设置界面得到的输入数据绘制自谱图像
        /// </summary>
        /// <param name="Fname"></param>
        private void GetSpectData(List <float> indata, string serialid)
        {
            IList <int>      scape = new List <int>();
            IList <DataBase> dbex  = new List <DataBase>();

            List <float>[] waveData   = new List <float> [1]; //波形图只有一组绘制数据
            List <float>[] SprectData = new List <float> [1]; //自谱分析结果数据
            waveData[0]   = indata;
            SprectData[0] = null;
            float gain = 1f;

            try
            {
                testDataManager      = SpringUtils.Context.GetObject("TestDataManager") as ITBTestDataManager;
                testParameterManager = SpringUtils.Context.GetObject("TestParameterManager") as ITBTestParameterManager;
                //  DASP.Domain.Entitys.TBTestDataEntity entity = testDataManager.Get(Guid.Parse(serialid));//"f2d72bcb-88b2-4f93-af7a-0b10834848d9"));
                DASP.Domain.Entitys.TBTestParameterEntity paraentity = testParameterManager.Get(Guid.Parse(serialid));
                gain = paraentity.Gain;
                float sf = Convert.ToSingle(paraentity.SF);
                float cv = Convert.ToSingle(paraentity.CV);

                //for (int i = 0; i < waveData[0].Count; i++)
                //{
                //    waveData[0][i] = waveData[0][i] ;
                //}
                datalsts.Add(waveData);
                //datalsts.Add(waveData);
                SprectData[0] = GetSprectData(waveData[0]);
                datalsts.Add(SprectData);

                scape.Add(30);
                scape.Add(70);
                /// <summary>
                /// 频谱类型 0 单峰值 1 有效值 2 功率谱 3PSD
                /// </summary>

                DataBase db = new DataBase(1000f / sf, "ms", 1f, paraentity.EU);
                dbex.Add(db);
                switch (spepara.nSpectrumType)
                {
                case 0:
                    db = new DataBase(sf / spepara.nFftPtNum, "Hz", 1f, "(N)", "单峰值");
                    break;

                case 1:
                    db = new DataBase(sf / spepara.nFftPtNum, "Hz", 1f, "(N)", "有效值");
                    break;

                case 2:
                    db = new DataBase(sf / spepara.nFftPtNum, "Hz", 1f, "(N)", "功率谱");
                    break;

                case 3:
                    db = new DataBase(sf / spepara.nFftPtNum, "Hz", 1f, "(N)", "PSD");
                    break;

                default:
                    db = new DataBase(sf / spepara.nFftPtNum, "Hz", 1f, "(N)", " ");
                    break;
                }

                dbex.Add(db);

                this.mcadLine1.drawall = true;
                this.mcadLine1.SetDrawDataAll(datalsts, scape, dbex);
                //this.mcadLine1.SetDrawDataAll(datalsts);
                this.mcadLine1.Focus();
            }
            catch { }

            //datalsts.Add(waveData);
            //datalsts.Add(waveData);
            //this.mcadLine1.drawall = true;
            //this.mcadLine1.SetDrawDataAll( datalsts);
        }
Beispiel #8
0
        void BindData()
        {
            List <ListItem> channelList = new List <ListItem>()
            {
                new ListItem("请选择", "-1"),
                new ListItem("1通道", "1"),
                new ListItem("2通道", "2")
            };


            List <ListItem> dataTypeList = new List <ListItem>()
            {
                new ListItem("请选择", "-1"),
                new ListItem("N", "1"),
                new ListItem("m/ss", "2")
            };

            cboBoxChannel.DataSource    = channelList;
            cboBoxChannel.DisplayMember = "Key";
            cboBoxChannel.ValueMember   = "Value";

            cboBoxDataType.DataSource    = dataTypeList;
            cboBoxDataType.DisplayMember = "Key";
            cboBoxDataType.ValueMember   = "Value";

            IList <DASP.Domain.Entitys.TBFanPositionEntity> fanPosList = fanPositionManager.GetAll();

            if (null == fanPosList)
            {
                fanPosList = new List <DASP.Domain.Entitys.TBFanPositionEntity>();
            }
            fanPosList.Insert(0, new DASP.Domain.Entitys.TBFanPositionEntity()
            {
                PositionId = Guid.Empty, PositionName = "--请选择--"
            });
            cboBoxFanPos.DataSource    = fanPosList;
            cboBoxFanPos.DisplayMember = "PositionName";
            cboBoxFanPos.ValueMember   = "PositionId";
            if (null != testDataEntity)
            {
                DASP.Domain.Entitys.TBTestParameterEntity entity = testParamManager.Get(testDataEntity.DataId);
                TspConfig tspConfig = new TspConfig();
                tspConfig.ADVer    = entity.ADVer;
                tspConfig.Ch       = entity.Ch;
                tspConfig.CV       = entity.CV;
                tspConfig.EU       = entity.EU;
                tspConfig.Gain     = entity.Gain;
                tspConfig.ISC      = entity.ISC;
                tspConfig.Pages    = entity.Pages;
                tspConfig.SF       = entity.SF;
                tspConfig.TotalCh  = entity.TotalCh;
                tspConfig.FileHash = entity.FileHash;

                tspConfigList = new List <TspConfig>();
                tspConfigList.Add(tspConfig);
                dgvDataSource.AutoGenerateColumns = false;
                dgvDataSource.DataSource          = tspConfigList;

                txtTestName.Text = testDataEntity.TestName;
                txtTestCode.Text = testDataEntity.TestCode.ToString();
                txtSort.Text     = testDataEntity.SortCode.ToString();
                mTxtRemark.Text  = testDataEntity.Remark;

                cboBoxFanPos.SelectedValue   = testDataEntity.Position.PositionId;
                cboBoxDataType.SelectedValue = testDataEntity.DataType.ToString();
                cboBoxChannel.SelectedValue  = testDataEntity.ChannelCode.ToString();
            }
        }
Beispiel #9
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (formValid.IsValid)
            {
                if (tspConfigList == null || (tspConfigList != null && tspConfigList.Count <= 0))
                {
                    ZMessageBox.Show(this, "请选导入配置数据!", "提示", ZMessageBoxIcon.Information,
                                     ZMessageBoxButtons.OK);
                    return;
                }

                if (stsDataList == null || (stsDataList != null && stsDataList.Count <= 0))
                {
                    ZMessageBox.Show(this, "请选导入数据!", "提示", ZMessageBoxIcon.Information,
                                     ZMessageBoxButtons.OK);
                    return;
                }
                bool isUpdate = false;

                if (testDataEntity == null)
                {
                    testDataEntity            = new DASP.Domain.Entitys.TBTestDataEntity();
                    testDataEntity.DataId     = Guid.NewGuid();
                    testDataEntity.CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    isUpdate = false;
                }
                else
                {
                    isUpdate = true;
                }


                string       data = DASP.Tools.SerializerUtils.SerializeFromString(stsDataList[0].Data);
                List <float> v    = DASP.Tools.SerializerUtils.SerializeToObject(data) as List <float>;
                testDataEntity.Data        = data;
                testDataEntity.TestName    = txtTestName.Text.Trim();
                testDataEntity.FileHash    = stsDataList[0].FileHash;
                testDataEntity.TestCode    = int.Parse(txtTestCode.Text.Trim());
                testDataEntity.ChannelCode = int.Parse(cboBoxChannel.SelectedValue.ToString());
                testDataEntity.DataType    = byte.Parse(cboBoxDataType.SelectedValue.ToString());

                testDataEntity.SortCode   = int.Parse(txtSort.Text.Trim());
                testDataEntity.Remark     = mTxtRemark.Text.Trim();
                testDataEntity.Creator    = Global.UserInfoInstance.CurrentLoginUser;
                testDataEntity.TestTime   = dtpTestTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                testDataEntity.UpdateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                DASP.Domain.Entitys.TBFanPositionEntity position = cboBoxFanPos.SelectedItem as DASP.Domain.Entitys.TBFanPositionEntity;
                testDataEntity.Position = position;

                DASP.Domain.Entitys.TBTestParameterEntity testParamEntity = new DASP.Domain.Entitys.TBTestParameterEntity();
                testParamEntity.ParamId    = testDataEntity.DataId;
                testParamEntity.FileHash   = tspConfigList[0].FileHash;
                testParamEntity.SF         = tspConfigList[0].SF;
                testParamEntity.TotalCh    = tspConfigList[0].TotalCh;
                testParamEntity.UpdateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                testParamEntity.CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                testParamEntity.ADVer      = tspConfigList[0].ADVer;
                testParamEntity.Ch         = tspConfigList[0].Ch;
                testParamEntity.CV         = tspConfigList[0].CV;
                testParamEntity.Data       = testDataEntity;
                testParamEntity.EU         = tspConfigList[0].EU;
                testParamEntity.Gain       = tspConfigList[0].Gain;
                testParamEntity.ISC        = tspConfigList[0].ISC;
                testParamEntity.Pages      = tspConfigList[0].Pages;


                try
                {
                    if (isUpdate)
                    {
                        testDataManager.Update(testDataEntity);
                        testParamManager.Update(testParamEntity);
                    }
                    else
                    {
                        testDataManager.Save(testDataEntity);
                        testParamManager.Save(testParamEntity);
                    }

                    ZMessageBox.Show(this, "保存成功!", "提示", ZMessageBoxIcon.Information, ZMessageBoxButtons.OK);
                    this.Close();
                }
                catch (Exception ex)
                {
                    ZMessageBox.Show(this, string.Format("保存失败:{0}!", ex.Message), "提示", ZMessageBoxIcon.Information, ZMessageBoxButtons.OK);
                }
            }
        }