public override void SetData(CLDC_DataCore.Model.DnbModel.DnbInfo.MeterBasicInfo MeterInfo, bool allowedit) { if (MeterInfo.MeterDgns.Count == 0) { return; } Dgw_Data.Rows.Clear(); foreach (string _Key in MeterInfo.MeterCostControls.Keys) { CLDC_DataCore.Model.DnbModel.DnbInfo.MeterFK _Cost = MeterInfo.MeterCostControls[_Key]; if (_Cost.Mcc_PrjName == null) { continue; } if (_Cost.Mfk_chrItemType.Length == 3) //大ID { int rowIndex = Dgw_Data.Rows.Add(); Dgw_Data["表位", rowIndex].Value = MeterInfo.ToString(); Dgw_Data["项目名称", rowIndex].Value = _Cost.Mcc_PrjName; Dgw_Data["项目结论", rowIndex].Value = " " + _Cost.Mfk_chrJL; } } base.SetData(MeterInfo, allowedit); }
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> public void SetData(List <CLDC_DataCore.Model.DnbModel.DnbInfo.MeterBasicInfo> MeterGroup) { for (int i = 0; i < MeterGroup.Count; i++) { CLDC_DataCore.Model.DnbModel.DnbInfo.MeterBasicInfo meterTemp = MeterGroup[i]; if (meterTemp.YaoJianYn) { if (meterTemp.MeterCostControls.ContainsKey(Key)) { CLDC_DataCore.Model.DnbModel.DnbInfo.MeterFK meterFk = meterTemp.MeterCostControls[Key]; string[] arrayResult = meterFk.Mfk_chrData.Split('|'); if (arrayResult.Length == 6) { //当前电价|开始剩余金额|开始总电量|结束剩余金额|结束总电量|误差 Data_View.Rows[i].Cells["当前电价"].Value = arrayResult[0]; Data_View.Rows[i].Cells["开始剩余金额"].Value = arrayResult[1]; Data_View.Rows[i].Cells["开始总电量"].Value = arrayResult[2]; Data_View.Rows[i].Cells["结束剩余金额"].Value = arrayResult[3]; Data_View.Rows[i].Cells["结束总电量"].Value = arrayResult[4]; Data_View.Rows[i].Cells["误差"].Value = arrayResult[5]; } Data_View.Rows[i].Cells["结论"].Value = meterFk.Mfk_chrJL; Data_View.Rows[i].Cells["不合格原因"].Value = meterFk.AVR_DIS_REASON; } } } }