public string GenerateFooterKey(EnumIntegralActFooterType footerType, TI_Integral_ValuesForHalfHours2 tpVals) { switch (footerType) { case EnumIntegralActFooterType.FskMsk: return(tpVals.IsMSK ? "220" : "330"); case EnumIntegralActFooterType.FactVoltage: return(tpVals.Voltage.ToString()); case EnumIntegralActFooterType.TariffLevelVoltage: if (tpVals.TpVoltageLevel.HasValue) { return(tpVals.TpVoltageLevel.Value.ToString()); } break; } return(string.Empty); }
public string GenerateFooterName(EnumIntegralActFooterType footerType, TI_Integral_ValuesForHalfHours2 tpVals) { switch (footerType) { case EnumIntegralActFooterType.FskMsk: return(tpVals.IsMSK ? "ПС 220кВ и ниже" : "ПС 330кВ и выше"); case EnumIntegralActFooterType.FactVoltage: return(string.Format("{0:###0.##}, кВ", tpVals.Voltage)); case EnumIntegralActFooterType.TariffLevelVoltage: if (tpVals.TpVoltageLevel.HasValue) { var d = tpVals.TpVoltageLevel.Value.GetEnumDescription(); if (d != null) { return(d.FullDescription); } } break; } return(string.Empty); }