public UI_LoadRecord(CLDC_Comm.Enum.Cus_TaiType Ttype, CLDC_DataCore.Model.Plan.Plan_LoadRecord FaItem)
     : base(Ttype, FaItem.Name)
 {
     InitializeComponent();
     base.Init(dgv_RunningE, null, null);
     InitUI();
     LoadFA(FaItem);
 }
        private void LoadPlan(CLDC_DataCore.Model.Plan.Plan_LoadRecord FaItem)
        {
            dgv_RunningE.Rows.Clear();

            base.FaName = FaItem.Name;
            StPlan_LoadRecord _ObjA = FaItem.GetCurrentPrj(0);         //取出一个方案项目

            txt_overTime.Text   = _ObjA.OverTime.ToString();
            comboBox1.Text      = _ObjA.danWei;;
            txt_marginTime.Text = _ObjA.MarginTime.ToString();
            string moType = _ObjA.ModeByte + "110000";

            for (int i = 0; i < 6; i++)
            {
                dgv_ModeByte[i, 0].Value = moType[i];
            }

            int cut = 0;

            if (_ObjA.RunningEPrj != null)
            {
                cut = _ObjA.RunningEPrj.Count;
            }
            for (int _i = 0; _i < cut; _i++)            //循环方案对象
            {
                StRunningE _Obj = _ObjA.RunningEPrj[_i];

                int RowIndex = dgv_RunningE.Rows.Add();
                dgv_RunningE.Rows[RowIndex].Cells[0].Value = _i + 1;
                ((DataGridViewComboBoxCell)dgv_RunningE.Rows[RowIndex].Cells[1]).Value = _Obj.PowerFX.ToString();        //功率方向
                ((DataGridViewComboBoxCell)dgv_RunningE.Rows[RowIndex].Cells[2]).Value = _Obj.xIB.ToString();            //元件
                ((DataGridViewComboBoxCell)dgv_RunningE.Rows[RowIndex].Cells[3]).Value = _Obj.Glys;                      //功率因素
                dgv_RunningE.Rows[RowIndex].Cells[4].Value = _Obj.RunningTime;

                dgv_RunningE.Rows[RowIndex].Cells[dgv_RunningE.Columns.Count - 1].Value = CONST_NOTESTRING; //删除按钮
                dgv_RunningE[dgv_RunningE.Columns.Count - 1, RowIndex].Style.ForeColor  = Color.Red;        //删除按钮为红色
            }

            {
                int RowIndex = dgv_RunningE.Rows.Add();                 //最后增加一个空行,用于新增
                dgv_RunningE.Rows[RowIndex].Cells[dgv_RunningE.Columns.Count - 1].Value           = CONST_ADD;
                dgv_RunningE.Rows[RowIndex].Cells[dgv_RunningE.Columns.Count - 1].Style.ForeColor = Color.Blue;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 创建方案,这个创建方案仅仅是创建方案项目列表,在09-7-2日以后使用
        /// </summary>
        /// <returns></returns>
        public List <object> CreateFA(Model.DnbModel.DnbInfo.MeterBasicInfo mb_Info, ref string Ib, ref int Qs, ref string WcLimit)
        {
            List <object> CheckFaItem = new List <object>();

            if (_Plan.Count == 0)
            {
                return(CheckFaItem);
            }

            for (int i = 0; i < _Plan.Count; i++)
            {
                StFAGroup _Item = _Plan[i];
                switch (_Item.FAType)
                {
                case Cus_FAGroup.预先调试:                  //预热方案加载
                    Plan_PrepareTest _Pre = new Plan_PrepareTest(_TaiType, _Item.FAName);
                    for (int j = 0; j < _Pre.Count; j++)
                    {
                        CheckFaItem.Add(_Pre.getDgnPrj(j));
                    }
                    _Pre = null;
                    break;

                case Cus_FAGroup.预热试验:                  //预热方案加载
                    Plan_YuRe _YuRe = new Plan_YuRe(_TaiType, _Item.FAName);
                    for (int j = 0; j < _YuRe.Count; j++)
                    {
                        CheckFaItem.Add(_YuRe.getYuRePrj(j));
                    }
                    _YuRe = null;
                    break;

                case Cus_FAGroup.外观检查试验:                  //外观检查试验方案加载
                    Plan_WGJC _WGJC = new Plan_WGJC(_TaiType, _Item.FAName);
                    for (int j = 0; j < _WGJC.Count; j++)
                    {
                        CheckFaItem.Add(_WGJC.getWGJCPrj(j));
                    }
                    _WGJC = null;
                    break;

                case Cus_FAGroup.起动试验:                  //启动方案项目加载
                    Plan_QiDong _QiDong = new Plan_QiDong(_TaiType, _Item.FAName);
                    for (int j = 0; j < _QiDong.Count; j++)
                    {
                        StPlan_QiDong stQiD = _QiDong.getQiDongPrj(j);
                        stQiD.CheckTimeAndIb(mb_Info.GuiChengName, CLDC_DataCore.Const.GlobalUnit.Clfs,
                                             CLDC_DataCore.Const.GlobalUnit.U,
                                             mb_Info.Mb_chrIb,
                                             mb_Info.Mb_chrBdj,
                                             mb_Info.Mb_chrBcs,
                                             mb_Info.Mb_BlnZnq,
                                             mb_Info.Mb_BlnHgq);
                        CheckFaItem.Add(stQiD);
                    }
                    _QiDong = null;
                    break;

                case Cus_FAGroup.潜动试验:                  //潜动项目方案加载
                    Plan_QianDong _QianDong = new Plan_QianDong(_TaiType, _Item.FAName);
                    for (int j = 0; j < _QianDong.Count; j++)
                    {
                        StPlan_QianDong stQianD = _QianDong.getQianDongPrj(j);
                        stQianD.CheckTimeAndIb(mb_Info.GuiChengName,
                                               CLDC_DataCore.Const.GlobalUnit.Clfs,
                                               CLDC_DataCore.Const.GlobalUnit.U,
                                               mb_Info.Mb_chrIb,
                                               mb_Info.Mb_chrBdj,
                                               mb_Info.Mb_chrBcs,
                                               mb_Info.Mb_BlnZnq,
                                               mb_Info.Mb_BlnHgq);
                        CheckFaItem.Add(stQianD);
                    }
                    _QianDong = null;
                    break;

                case Cus_FAGroup.基本误差试验:              //基本误差试验方案加载
                    Plan_WcPoint _Wc = new Plan_WcPoint(_TaiType, _Item.FAName);

                    Ib = _Wc.Qscz;

                    Qs = _Wc.Czqs;

                    WcLimit = _Wc.CzWcLimit;

                    for (int j = 0; j < _Wc.Count; j++)
                    {
                        CheckFaItem.Add(_Wc.getCheckPoint(j));
                    }
                    _Wc = null;
                    break;

                case Cus_FAGroup.走字试验:              //走字试验方案项目加载
                    Plan_ZouZi _Zouzi = new Plan_ZouZi(_TaiType, _Item.FAName);
                    for (int j = 0; j < _Zouzi.Count; j++)
                    {
                        StPlan_ZouZi _ZouPrjPlan = _Zouzi.getZouZiPrj(j);
                        for (int z = 0; z < _ZouPrjPlan.ZouZiPrj.Count; z++)
                        {
                            CheckFaItem.Add(_ZouPrjPlan.getNewPlan(z));
                        }
                    }
                    _Zouzi = null;
                    break;

                case Cus_FAGroup.多功能试验:            //多功能试验方案项目加载
                    Plan_Dgn _Dgn = new Plan_Dgn(_TaiType, _Item.FAName);
                    for (int j = 0; j < _Dgn.Count; j++)
                    {
                        CheckFaItem.Add(_Dgn.getDgnPrj(j));
                    }
                    _Dgn = null;
                    break;

                case Cus_FAGroup.通讯协议检查试验:            //通讯协议检查试验
                    Plan_ConnProtocolCheck _Cpc = new Plan_ConnProtocolCheck(_TaiType, _Item.FAName);
                    for (int j = 0; j < _Cpc.Count; j++)
                    {
                        CheckFaItem.Add(_Cpc.getConnProtocolPrj(j));
                    }
                    _Dgn = null;
                    break;

                case Cus_FAGroup.影响量试验:
                    Plan_Specal _Specal = new Plan_Specal(_TaiType, _Item.FAName);
                    for (int j = 0; j < _Specal.Count; j++)
                    {
                        CheckFaItem.Add(_Specal.getSpecalPrj(j));
                    }
                    _Specal = null;
                    break;

                case Cus_FAGroup.载波试验:
                    Plan_Carrier _ZaiBo = new Plan_Carrier(_TaiType, _Item.FAName);
                    for (int j = 0; j < _ZaiBo.Count; j++)
                    {
                        CheckFaItem.Add(_ZaiBo.GetCarrierPrj(j));
                    }
                    _ZaiBo = null;
                    break;

                case Cus_FAGroup.误差一致性:
                    Plan_ErrAccord _ErrAccord = new Plan_ErrAccord(_TaiType, _Item.FAName);
                    for (int j = 0; j < _ErrAccord.Count; j++)
                    {
                        CheckFaItem.Add(_ErrAccord.getErrAccordPrj(j));
                    }
                    _ErrAccord = null;
                    break;

                case Cus_FAGroup.功耗试验:
                {
                    Plan_PowerConsume _PowerConsume = new Plan_PowerConsume(_TaiType, _Item.FAName);
                    for (int j = 0; j < _PowerConsume.Count; j++)
                    {
                        CheckFaItem.Add(_PowerConsume.getPowerConsumePrj(j));
                    }
                    _PowerConsume = null;
                }
                break;

                case Cus_FAGroup.冻结功能试验:
                    Plan_Freeze _Freeze = new Plan_Freeze(_TaiType, _Item.FAName);
                    for (int j = 0; j < _Freeze.Count; j++)
                    {
                        CheckFaItem.Add(_Freeze.getFreezePrj(j));
                    }
                    _Freeze = null;
                    break;

                case Cus_FAGroup.费控功能试验:
                    Plan_CostControl _CostControl = new Plan_CostControl(_TaiType, _Item.FAName);
                    for (int j = 0; j < _CostControl.Count; j++)
                    {
                        CheckFaItem.Add(_CostControl.getCostControlPrj(j));
                    }
                    _CostControl = null;
                    break;

                case Cus_FAGroup.智能表功能试验:
                    Plan_Function _Function = new Plan_Function(_TaiType, _Item.FAName);
                    for (int j = 0; j < _Function.Count; j++)
                    {
                        CheckFaItem.Add(_Function.getFunctionPrj(j));
                    }
                    _Function = null;
                    break;

                case Cus_FAGroup.事件记录试验:
                    Plan_EventLog _Eventlog = new Plan_EventLog(_TaiType, _Item.FAName);
                    for (int j = 0; j < _Eventlog.Count; j++)
                    {
                        CheckFaItem.Add(_Eventlog.getEventLogPrj(j));
                    }
                    _Eventlog = null;
                    break;

                case Cus_FAGroup.数据转发试验:
                    Plan_DataSendForRelay _DataSend = new Plan_DataSendForRelay(_TaiType, _Item.FAName);
                    for (int j = 0; j < _DataSend.Count; j++)
                    {
                        CheckFaItem.Add(_DataSend.getDataSendForRelay(j));
                    }
                    _DataSend = null;
                    break;

                case Cus_FAGroup.工频耐压试验:
                    Plan_Insulation planInsulation = new Plan_Insulation(_TaiType, _Item.FAName);
                    for (int j = 0; j < planInsulation.Count; j++)
                    {
                        CheckFaItem.Add(planInsulation.GetPlan(j));
                    }
                    planInsulation = null;
                    break;

                case Cus_FAGroup.红外数据比对试验:
                    Plan_Infrared planInfrared = new Plan_Infrared(_TaiType, _Item.FAName);
                    for (int j = 0; j < planInfrared.Count; j++)
                    {
                        CheckFaItem.Add(planInfrared.GetCarrierPrj(j));
                    }
                    planInfrared = null;
                    break;

                case Cus_FAGroup.负荷记录试验:
                    Plan_LoadRecord planA = new Plan_LoadRecord(_TaiType, _Item.FAName);
                    for (int j = 0; j < planA.Count; j++)
                    {
                        CheckFaItem.Add(planA.GetCurrentPrj(j));
                    }
                    planA = null;
                    break;
                }
            }
            return(CheckFaItem);
        }
 internal void LoadFA(CLDC_DataCore.Model.Plan.Plan_LoadRecord plan_LoadRecord)
 {
     base.FaName = plan_LoadRecord.Name;
     this.LoadPlan(plan_LoadRecord);
 }