public static DayAQIResult ToDayAQIResult(AirDayAQIData src) { DayAQIResult dar = new DayAQIResult(); dar.SO2 = src.SO2; dar.NO2 = src.NO2; dar.PM10 = src.PM10; dar.CO = src.CO; dar.O38H = src.O38H; dar.PM25 = src.PM25; return dar; }
public static AirDayAQIData ToAirDayAQIData(CityDayAQIPublishLive src) { AirDayAQIData data = new AirDayAQIData(); ToAirDayAQIData(src, data); return data; }
public static void ToAirDayAQIData(CityDayAQIPublishLive source, AirDayAQIData target) { ToAirDayData(source, target); try { if (source.AQI != ConfigHelper.EmptyValueString) { target.AQI = int.Parse(source.AQI); } } catch (Exception e) { LogHelper.Logger.Error("CityDayAQIPublishLive To AirDayAQIData", e); } target.PrimaryPollutant = source.PrimaryPollutant; target.Type = source.Quality; target.Effect = source.Unheathful; target.Measure = source.Measure; }