public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) { int intFirstMeter = MeterGroup.GetFirstYaoJianMeterBwh(); if (MeterGroup.MeterGroup[intFirstMeter].MeterSjJLgns.Count == 0) { return; } Dgw_Data.Rows.Clear(); for (int i = 0; i < MeterGroup._Bws; i++) { foreach (string _Key in MeterGroup.MeterGroup[i].MeterSjJLgns.Keys) { CLDC_DataCore.Model.DnbModel.DnbInfo.MeterSjJLgn _Event = MeterGroup.MeterGroup[i].MeterSjJLgns[_Key]; if (_Event.StatusNo == null) { continue; } if (_Event.StatusNo.Length == 3) //大ID { int rowIndex = Dgw_Data.Rows.Add(); Dgw_Data["表位", rowIndex].Value = MeterGroup.MeterGroup[i].ToString(); Dgw_Data["项目名称", rowIndex].Value = _Event.ItemName; Dgw_Data["项目结论", rowIndex].Value = " " + _Event.ItemConc; } } } //SpanRow(0, Dgw_Data.Rows.Count, 0); base.SetData(MeterGroup, allowedit); }
/// <summary> /// 设置创建表格列的样式 /// </summary> /// <param name="Index">列下标</param> private void CreateColumnStyle(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, StPlan_SpecalCheck Item) { if (Data_Error.Columns.Count != Item.WcCheckNumic + 4 + 2) //如果误差数据表格的列数大于默认列数,则需要删除大于部分 误差次数+固定列+平均值,化整值列 { for (int i = Data_Error.Columns.Count - 1; i > 3; i--) { Data_Error.Columns.RemoveAt(i); } for (int i = 0; i < Item.WcCheckNumic; i++) { Data_Error.Columns.Add("Tmp_Col" + i.ToString(), "误差" + (i + 1).ToString()); } Data_Error.Columns.Add("Tmp_Pj", "平均值"); Data_Error.Columns.Add("Tmp_Hz", "化整值"); } float _FillWeight = 100F / (Data_Error.Columns.Count - 4); for (int i = 4; i < Data_Error.Columns.Count; i++) { DataGridViewColumn _Column = Data_Error.Columns[i]; _Column.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; _Column.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; _Column.FillWeight = _FillWeight; } Data_Error.Refresh(); }
public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) { Dgw_Data.Rows.Clear(); for (int i = 0; i < MeterGroup._Bws; i++) { if (MeterGroup.MeterGroup[i].YaoJianYn == false) { continue; } MeterInfo = MeterGroup.MeterGroup[i]; foreach (string _Key in MeterInfo.MeterSpecialErrs.Keys) { int rowIndex = Dgw_Data.Rows.Add(); Dgw_Data["表位", rowIndex].Value = MeterInfo.ToString(); Dgw_Data["项目名称", rowIndex].Value = MeterInfo.MeterSpecialErrs[_Key].Mse_PrjName; Dgw_Data["项目结论", rowIndex].Value = " " + MeterInfo.MeterSpecialErrs[_Key].Mse_Result; string[] Arr_Err = MeterInfo.MeterSpecialErrs[_Key].Mse_Wc.Split('|'); if (Arr_Err.Length != 4) { continue; } Dgw_Data[3, rowIndex].Value = Arr_Err[0]; Dgw_Data[4, rowIndex].Value = Arr_Err[1]; Dgw_Data[5, rowIndex].Value = Arr_Err[2]; Dgw_Data[6, rowIndex].Value = Arr_Err[3]; } base.SetData(MeterInfo, allowedit); } }
/// <summary> /// 初始化数据菜单 /// </summary> /// <param name="MeterGroup"></param> private void InitializationGrid(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup) { if (CLDC_DataCore.Function.Common.IsVSDevenv()) { return; } int _Count = MeterGroup.MeterGroup.Count; if (dgv_Data.Rows.Count != _Count) { dgv_Data.Rows.Clear(); for (int i = 0; i < _Count; i++) { int Index = dgv_Data.Rows.Add(); if ((Index + 1) % 2 == 0) { dgv_Data.Rows[Index].DefaultCellStyle.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Alter; } else { dgv_Data.Rows[Index].DefaultCellStyle.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Normal; } dgv_Data.Rows[Index].Cells[0].Style.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Frone; dgv_Data.Rows[Index].Cells[1].Style.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Frone; } } dgv_Data.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dgv_Data.Refresh(); }
public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) { int intFirstMeter = MeterGroup.GetFirstYaoJianMeterBwh(); if (MeterGroup.MeterGroup[intFirstMeter].MeterCostControls.Count == 0) { return; } Dgw_Data.Rows.Clear(); for (int i = 0; i < MeterGroup._Bws; i++) { if (!MeterGroup.MeterGroup[i].YaoJianYn) { continue; } foreach (string _Key in MeterGroup.MeterGroup[i].MeterCostControls.Keys) { CLDC_DataCore.Model.DnbModel.DnbInfo.MeterFK _Cost = MeterGroup.MeterGroup[i].MeterCostControls[_Key]; if (_Cost.Mfk_chrItemType.Length == 3) //大ID { int rowIndex = Dgw_Data.Rows.Add(); Dgw_Data["表位", rowIndex].Value = MeterGroup.MeterGroup[i].ToString(); Dgw_Data["项目名称", rowIndex].Value = _Cost.Mcc_PrjName; Dgw_Data["项目结论", rowIndex].Value = " " + _Cost.Mfk_chrJL; } } } SpanRow(0, Dgw_Data.Rows.Count, 0); base.SetData(MeterGroup, allowedit); }
/// <summary> /// 初始化数据菜单 /// </summary> /// <param name="MeterGroup"></param> private void InitializationGrid(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup) { if (CLDC_DataCore.Function.Common.IsVSDevenv()) { return; } int _Count = MeterGroup.MeterGroup.Count; if (Data_Error.Rows.Count != _Count) //初始化右部数据表单 { Data_Error.Rows.Clear(); for (int i = 0; i < _Count; i++) { int index = Data_Error.Rows.Add(); if ((index + 1) % 2 == 0) { Data_Error.Rows[index].DefaultCellStyle.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Alter; } else { Data_Error.Rows[index].DefaultCellStyle.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Normal; } Data_Error.Rows[index].Cells[0].Style.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Frone; Data_Error.Rows[index].Cells[1].Style.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Frone; } } Data_Error.Refresh(); }
/// <summary> /// 刷新表单数据 /// </summary> /// <param name="MeterGroup"></param> public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) { if (MeterGroup.MeterGroup.Count == 0) { return; } Data_View.Rows.Clear(); string _Key = Key + "01"; for (int i = 0; i < MeterGroup._Bws; i++) { if (!MeterGroup.MeterGroup[i].YaoJianYn) { continue; } if (MeterGroup.MeterGroup[i].MeterCostControls.ContainsKey(_Key)) { if (MeterGroup.MeterGroup[i].MeterCostControls[_Key].Mcc_PrjName != null && MeterGroup.MeterGroup[i].MeterCostControls[_Key].Mfk_chrData != string.Empty) { int rowIndex = Data_View.Rows.Add(); Data_View["表位", rowIndex].Value = MeterGroup.MeterGroup[i].ToString(); Data_View["ESAM数据内容", rowIndex].Value = MeterGroup.MeterGroup[i].MeterCostControls[_Key].Mfk_chrData; } } } base.SetData(MeterGroup, allowedit); }
public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) { if (MeterGroup.MeterGroup.Count == 0) { return; } Dgw_Data.Rows.Clear(); for (int i = 0; i < MeterGroup._Bws; i++) { if (!MeterGroup.MeterGroup[i].YaoJianYn) { continue; } foreach (string _Key in MeterGroup.MeterGroup[i].MeterCarrierDatas.Keys) { CLDC_DataCore.Model.DnbModel.DnbInfo.MeterCarrierData _Carrier = MeterGroup.MeterGroup[i].MeterCarrierDatas[_Key]; if (_Carrier.Mce_PrjID.Length > 0) //大ID { int rowIndex = Dgw_Data.Rows.Add(); Dgw_Data["表位", rowIndex].Value = MeterGroup.MeterGroup[i].ToString(); Dgw_Data["项目名称", rowIndex].Value = _Carrier.Mce_PrjName; Dgw_Data["数据", rowIndex].Value = _Carrier.Mce_PrjValue; Dgw_Data["结论", rowIndex].Value = " " + _Carrier.Mce_ItemResult; } } } SpanRow(0, Dgw_Data.Rows.Count, 0); base.SetData(MeterGroup, allowedit); }
private void InitializationGrid(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup) { _DnbGroup = MeterGroup; int _Count = MeterGroup.MeterGroup.Count; if (Data_ZouZi.Rows.Count != _Count) { Data_ZouZi.Rows.Clear(); for (int i = 0; i < _Count; i++) { int RowIndex = Data_ZouZi.Rows.Add(); if ((RowIndex + 1) % 2 == 0) { Data_ZouZi.Rows[RowIndex].DefaultCellStyle.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Alter; } else { Data_ZouZi.Rows[RowIndex].DefaultCellStyle.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Normal; } Data_ZouZi.Rows[RowIndex].Cells[0].Style.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Frone; Data_ZouZi.Rows[RowIndex].Cells[1].Style.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Frone; } Data_ZouZi.SelectionMode = DataGridViewSelectionMode.FullRowSelect; Data_ZouZi.Refresh(); } }
/// <summary> /// /// </summary> /// <param name="meterGroup"></param> /// <param name="taiType"></param> public AuditingSave( Main parent , CLDC_DataCore.Model.DnbModel.DnbGroupInfo meterGroup , int taiType , int taiId) : base(parent, meterGroup, taiType, taiId) { InitializeComponent(); if (CLDC_DataCore.Function.Common.IsVSDevenv()) { return; } Btn_DoComplated.Visible = false; try { this.Dgv_Result.Cursor = base.CurHand; } catch { this.Dgv_Result.Cursor = Cursors.Default; } }
public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) { int intFirstMeter = MeterGroup.GetFirstYaoJianMeterBwh(); if (MeterGroup.MeterGroup[intFirstMeter].MeterFunctions.Count == 0) { return; } Dgw_Data.Rows.Clear(); for (int i = 0; i < MeterGroup._Bws; i++) { foreach (string _Key in MeterGroup.MeterGroup[i].MeterFunctions.Keys) { CLDC_DataCore.Model.DnbModel.DnbInfo.MeterFunction _Function = MeterGroup.MeterGroup[i].MeterFunctions[_Key]; if (_Function.Mf_PrjID.Length == 3) //大ID { int rowIndex = Dgw_Data.Rows.Add(); Dgw_Data["表位", rowIndex].Value = MeterGroup.MeterGroup[i].ToString(); Dgw_Data["项目名称", rowIndex].Value = _Function.Mf_PrjName; Dgw_Data["项目结论", rowIndex].Value = " " + _Function.Mf_chrValue; } } } SpanRow(0, Dgw_Data.Rows.Count, 0); base.SetData(MeterGroup, allowedit); }
/// <summary> /// 初始化数据菜单 /// </summary> /// <param name="MeterGroup"></param> private void InitializationGrid(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup) { _DnbGroup = MeterGroup; if (CLDC_DataCore.Function.Common.IsVSDevenv()) { return; } int _Count = MeterGroup.MeterGroup.Count; if (Data_Prepare.Rows.Count != _Count) { Data_Prepare.Rows.Clear(); for (int i = 0; i < MeterGroup.MeterGroup.Count; i++) //根据电能台表位数添加表位行 { int _RowIndex = Data_Prepare.Rows.Add(); if ((_RowIndex + 1) % 2 == 0) { Data_Prepare.Rows[_RowIndex].DefaultCellStyle.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Alter; } else { Data_Prepare.Rows[_RowIndex].DefaultCellStyle.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Normal; } Data_Prepare.Rows[_RowIndex].Cells[0].Style.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Frone; Data_Prepare.Rows[_RowIndex].Cells[1].Style.BackColor = CLDC_DataCore.Const.Variable.Color_Grid_Frone; } Data_Prepare.SelectionMode = DataGridViewSelectionMode.FullRowSelect; Data_Prepare.Refresh(); } }
/// <summary> /// 数据刷新,外部调用方法 /// </summary> /// <param name="meterGroup"></param> /// <param name="CheckOrderID"></param> public void RefreshData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo meterGroup, int CheckOrderID) { #region -----刷新日记时误差数据表格----- InitDataTimeErr(meterGroup, CheckOrderID); #endregion this.RefreshGrid(meterGroup, CheckOrderID); Data_QianDong.Enabled = true; }
public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) { try { if (MeterGroup.MeterGroup.Count == 0) { return; } Conn_Data.Rows.Clear(); DataTable dtKeys = new DataTable(); dtKeys.Columns.Add("Keys", typeof(string)); dtKeys.Columns.Add("PrjId", typeof(string)); foreach (string Key in MeterGroup.MeterGroup[MeterGroup.GetFirstYaoJianMeterBwh()].MeterResults.Keys) { if (Key.IndexOf(((int)CLDC_Comm.Enum.Cus_MeterResultPrjID.通讯协议检查试验).ToString("D3")) != -1) { CLDC_DataCore.Model.DnbModel.DnbInfo.MeterResult meterResult = MeterGroup.MeterGroup[MeterGroup.GetFirstYaoJianMeterBwh()].MeterResults[Key]; if (meterResult.Mr_chrRstId != null && meterResult.Mr_chrRstName != null) { dtKeys.Rows.Add(Key, meterResult.Mr_chrRstId); } } } //只计算基本误差的数据 DataRow[] Rows = dtKeys.Select("Keys <> '' and PrjId Like '" + ((int)CLDC_Comm.Enum.Cus_MeterResultPrjID.通讯协议检查试验).ToString("D3") + "%' ", "PrjId asc"); for (int i = 0; i < MeterGroup._Bws; i++) { if (!MeterGroup.MeterGroup[i].YaoJianYn) { continue; } for (int j = 0; j < Rows.Length; j++) { string Key = Rows[j][0].ToString(); if (!MeterGroup.MeterGroup[i].MeterResults.ContainsKey(Key)) { continue; } CLDC_DataCore.Model.DnbModel.DnbInfo.MeterResult meterResult = MeterGroup.MeterGroup[i].MeterResults[Key]; if (meterResult.Mr_chrRstId != null) { int rowIndex = Conn_Data.Rows.Add(); Conn_Data["表位", rowIndex].Value = MeterGroup.MeterGroup[i].ToString(); Conn_Data["项目名称", rowIndex].Value = meterResult.Mr_chrRstName; Conn_Data["项目数据", rowIndex].Value = meterResult.Mr_chrRstValue; } } } } catch (Exception ex) { MessageBox.Show(ex.StackTrace); } }
public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) { base.SetData(MeterGroup, allowedit); if (allowedit) //是否启用编辑 { Dgv_PrjData.ReadOnly = false; } this.Refresh(MeterGroup); }
public DisplayEventLog(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) : base(MeterGroup, allowedit) { InitializeComponent(); if (CLDC_DataCore.Function.Common.IsVSDevenv()) { return; } SetData(MeterGroup, AllowEdit); }
/// <summary> /// 刷新数据事件 /// </summary> /// <param name="meterGroup"></param> /// <param name="taiType"></param> /// <param name="taiId"></param> public void RefreshData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo meterGroup, int CheckOrderID) { if (!(meterGroup.CheckPlan[CheckOrderID] is CLDC_DataCore.Struct.StPlan_WGJC)) { return; } this.RefreshGrid(meterGroup, CheckOrderID); Data_WGJC.Enabled = true; }
/// <summary> /// 外部调用刷新事件 /// </summary> /// <param name="meterGroup"></param> /// <param name="CheckOrderID"></param> public void RefreshData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo meterGroup, int CheckOrderID) { this.RefreshGrid(meterGroup, CheckOrderID); if (meterGroup.CheckState == CLDC_Comm.Enum.Cus_CheckStaute.停止检定) { Table_CheckDns.Enabled = false; } Data_ZouZi.Enabled = true; }
public DgnPramView(ref CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup) { _DnbInfo = MeterGroup; InitializeComponent(); List <string> _DgnProtoNames = CLDC_DataCore.Model.DgnProtocol.DgnProtocolInfo.getProtocolNames(); for (int i = 0; i < _DgnProtoNames.Count; i++) { _ProtocolNameCol.Items.Add(_DgnProtoNames[i]); } }
public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) { base.SetData(MeterGroup, allowedit); IsDisplayAll = Chk_DisplayAll.Checked; checkWC_Normal1.IsDisplayAll = IsDisplayAll; checkWC_PianCha1.IsDisplayAll = IsDisplayAll; checkWC_Normal1.SetData(MeterGroup, allowedit); checkWC_PianCha1.SetData(MeterGroup, allowedit); }
public Base( Main parent , CLDC_DataCore.Model.DnbModel.DnbGroupInfo meterGroup , int taiType , int taiId) { InitializeComponent(); CurHand = new Cursor(Application.StartupPath + @"\Pic\hand.ico"); ParentMain = parent; MeterGroup = meterGroup; _TaiType = taiType; _TaiId = taiId; }
/// <summary> /// 构造函数,当前检定项目ID /// </summary> /// <param name="parent">Main窗体</param> /// <param name="meterGroup">电能表数据集合</param> /// <param name="CheckOrderID">当前检定点</param> /// <param name="TaiID">台体编号</param> /// <param name="taiType">台体类型</param> public CheckYuRe(Main parent, CLDC_DataCore.Model.DnbModel.DnbGroupInfo meterGroup, int CheckOrderID, int taiType, int TaiID) { InitializeComponent(); ParentMain = parent; if (CLDC_DataCore.Function.Common.IsVSDevenv()) { return; } this.InitializationGrid(meterGroup); this.RefreshGrid(meterGroup, CheckOrderID); }
/// <summary> /// 构造函数,当前检定项目ID /// </summary> /// <param name="parent">Main窗体</param> /// <param name="meterGroup">电能表数据集合</param> /// <param name="CheckOrderID">当前检定点</param> /// <param name="TaiID">台体编号</param> /// <param name="taiType">台体类型</param> public CheckQiDong(Main parent, CLDC_DataCore.Model.DnbModel.DnbGroupInfo meterGroup, int CheckOrderID, int taiType, int TaiID) { InitializeComponent(); ParentMain = parent; if (CLDC_DataCore.Function.Common.IsVSDevenv()) { return; } Data_QiDong.CellMouseUp += new DataGridViewCellMouseEventHandler(Data_QiDong_CellMouseUp); this.InitializationGrid(meterGroup); this.RefreshGrid(meterGroup, CheckOrderID); }
public DisplayQiQianDong(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) : base(MeterGroup, allowedit) { InitializeComponent(); if (CLDC_DataCore.Function.Common.IsVSDevenv()) { return; } Dgv_PrjData.TopLeftHeaderCell.Value = "项目名称"; if (allowedit) //是否启用编辑 { Dgv_PrjData.ReadOnly = false; } this.Refresh(); }
public DisplayWcAndPianCha(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) : base(MeterGroup, allowedit) { InitializeComponent(); if (CLDC_DataCore.Function.Common.IsVSDevenv()) { return; } this.Controls.Add(Chk_DisplayAll); this.Controls.SetChildIndex(Chk_DisplayAll, 0); Chk_DisplayAll.Location = new Point(150, 3); Chk_DisplayAll.CheckedChanged += new EventHandler(Chk_DisplayAll_CheckedChanged); SetData(MeterGroup, AllowEdit); }
/// <summary> /// 构造函数 /// </summary> /// <param name="FaList">方案列表</param> /// <param name="CzFzd">参照负载点</param> /// <param name="CzQs">参照圈数</param> public WcPrjView(ref CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup) { _DnbGroup = MeterGroup; InitializeComponent(); #region 加载电流倍数字典列表 CLDC_DataCore.SystemModel.Item.csxIbDic _xIbDic = new CLDC_DataCore.SystemModel.Item.csxIbDic(); _xIbDic.Load(); List <string> _xIbs = _xIbDic.getxIb(); Cmb_xIb.Items.Clear(); for (int i = 0; i < _xIbs.Count; i++) { Cmb_xIb.Items.Add(_xIbs[i]); } _xIbs = null; _xIbDic = null; #endregion #region 加载误差限列表 CLDC_DataCore.DataBase.clsWcLimitDataControl _WcLimit = new CLDC_DataCore.DataBase.clsWcLimitDataControl(); List <CLDC_DataCore.DataBase.IDAndValue> _WcLimitNames = _WcLimit.WcLimitName(); Cmb_WcLimit.Items.Add("规程误差限"); for (int i = 0; i < _WcLimitNames.Count; i++) { Cmb_WcLimit.Items.Add(_WcLimitNames[i].Value); } _WcLimitNames = null; _WcLimit = null; #endregion this.CreateFaInfo(); }
public void RefreshData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo meterGroup, int CheckOrderID) { this.RefreshGrid(meterGroup, CheckOrderID); Data_LoadRecord.Enabled = true; CLDC_DataCore.Struct.StPlan_LoadRecord _Item = (CLDC_DataCore.Struct.StPlan_LoadRecord)meterGroup.CheckPlan[CheckOrderID]; bool bFind = false; if (Tab_EventLog.TabPages.Count > 1) //如果Tab的页数大于1,那表示存在动态增加的数据页 { if (Data_LoadRecord.Tag != null && Data_LoadRecord.Tag.ToString() == _Item.PrjID) { bFind = true; } else { for (int i = Tab_EventLog.TabPages.Count - 1; i > 0; i--) { Tab_EventLog.TabPages.RemoveAt(i); } bFind = false; } } if (!bFind) { Data_LoadRecord.Tag = _Item.PrjID; //将ID值放到数据列表的Tag中,供数据刷新使用 switch (_Item.PrjID) { case "001": { Tab_EventLog.TabPages.Add("负荷记录数据"); CLDC_MeterUI.UI_Detection_New.LoadRecordDataView.ViewLoadRecord _View = new CLDC_MeterUI.UI_Detection_New.LoadRecordDataView.ViewLoadRecord(); Tab_EventLog.TabPages[1].Controls.Add(_View); _View.Dock = DockStyle.Fill; _View.Margin = new System.Windows.Forms.Padding(0); break; } } } }
/// <summary> /// 初始化日计时数据 /// </summary> /// <param name="meterGroup"></param> private void InitDataTimeErr(CLDC_DataCore.Model.DnbModel.DnbGroupInfo meterGroup, int CheckOrderID) { StPlan_QianDong _Item; _Item = (StPlan_QianDong)meterGroup.CheckPlan[CheckOrderID]; string[] GetString = new string[4]; if (_Item.DayCheckTimesSetting != null) { GetString = _Item.DayCheckTimesSetting.Split('|'); } else { GetString[0] = "0"; } if (GetString[0] == "1") { if (tabControl1.TabPages.Count == 1) //如果Tab的页数大于1,那表示存在动态增加的数据页 { int Count; if (GetString.Length > 3) { int.TryParse(GetString[2], out Count); } else { Count = 10; } tabControl1.TabPages.Add("日计时误差数据"); CLDC_MeterUI.UI_Detection_New.DgnDataView.ViewDateTimeErr _DateTimeErr = new CLDC_MeterUI.UI_Detection_New.DgnDataView.ViewDateTimeErr(Count); tabControl1.TabPages[1].Controls.Add(_DateTimeErr); _DateTimeErr.Dock = DockStyle.Fill; _DateTimeErr.Margin = new System.Windows.Forms.Padding(0); } } else { if (tabControl1.TabPages.Count > 1) { tabControl1.TabPages.RemoveAt(tabControl1.TabPages.Count - 1); } } }
/// <summary> /// 构造函数,当前检定项目ID /// </summary> /// <param name="parent">Main窗体</param> /// <param name="meterGroup">电能表数据集合</param> /// <param name="CheckOrderID">当前检定点</param> /// <param name="TaiID">台体编号</param> /// <param name="taiType">台体类型</param> public CheckErr(Main parent, CLDC_DataCore.Model.DnbModel.DnbGroupInfo meterGroup, int CheckOrderID, int taiType, int TaiID) { InitializeComponent(); ParentMain = parent; if (CLDC_DataCore.Function.Common.IsVSDevenv()) { return; } this.DoubleBuffered = true; //开启双缓存 this._TaiID = TaiID; this._TaiType = taiType; this.InitializationGrid(meterGroup); this.RefreshGrid(meterGroup, CheckOrderID); }
/// <summary> /// 显示所有要检电表的数据 /// </summary> /// <param name="MeterGroup"></param> /// <param name="allowedit"></param> public override void SetData(CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup, bool allowedit) { Dgw_Data.Rows.Clear(); for (int i = 0; i < MeterGroup._Bws; i++) { if (MeterGroup.MeterGroup[i].YaoJianYn == false) { continue; } MeterInfo = MeterGroup.MeterGroup[i]; if (MeterInfo.MeterResults.ContainsKey(ItemKey)) { int rowIndex = Dgw_Data.Rows.Add(); Dgw_Data["表位", rowIndex].Value = MeterInfo.ToString(); Dgw_Data["项目名称", rowIndex].Value = MeterInfo.MeterResults[ItemKey].Mr_chrRstName; Dgw_Data["项目结论", rowIndex].Value = " " + MeterInfo.MeterResults[ItemKey].Mr_chrRstValue; } } SpanRow(0, Dgw_Data.Rows.Count, 0); base.SetData(MeterGroup, allowedit); }