public override void SetMailsSummary() { Link = "Notification/BillingEmail"; PlatformsMail = new List <MailPlatfrom>(); IEnumerable <D_Mail> hotelMailData = _data.Where(x => x.HotelPlatformType == "Hotel"); TotalInformation = hotelMailData.Sum(x => x.TotalInformation); TotalOther = hotelMailData.Sum(x => x.TotalOther); foreach (var item in hotelMailData) { item.TotalMatched = -1; if (item.BookingPlatformName == HotelPlatformName.HRS.ToString()) { item.BookingPlatformName = item.BookingPlatformName + "/HDE"; D_Mail HDEMailData = hotelMailData.Where(x => x.BookingPlatformName == HotelPlatformName.HDE.ToString()).FirstOrDefault(); if (HDEMailData != null) { item.TotalInformation += HDEMailData.TotalInformation; item.TotalOther += HDEMailData.TotalOther; } } if (item.BookingPlatformName != HotelPlatformName.HDE.ToString()) { PlatformsMail.Add((MailPlatfrom)item); } } }
public override void SetMailsSummary() { Link = "RentalCar/BillingEmail"; PlatformsMail = new List <MailPlatfrom>(); D_Mail hotelMailData = _data.Where(x => x.HotelPlatformType == "Car").FirstOrDefault(); TotalMatched = hotelMailData.TotalMatched; TotalInformation = hotelMailData.TotalInformation; PlatformsMail.Add(new MailPlatfrom { BookingPlatformName = HotelPlatformName.BCD.ToString(), M_HotelPlatformSettingID = hotelMailData.M_HotelPlatformSettingID, TotalInformation = hotelMailData.TotalInformation, TotalMatched = hotelMailData.TotalMatched }); }