when i add data to additionalservicesnew list but not add data its null
here is my code
public class BookingDetailsData
{
public List LstbookingPassengerDetails { get; set; }
public List lstFlightDetail { get; set; }
public List golstFlightDetail { get; set; }
public List backlstFlightDetail { get; set; }
public List lstAdditionServiceDetails { get; set; }
public List lstAdditionServiceDetailsNew { get; set; }
public int TotalAmount { get; set; }
public double goFinalTotalAmount { get; set; }
public double backFinalTotalAmount { get; set; }
public int UserId { get; set; }
public double FinalTotalAmount { get; set; }
}
public class AdditionalServiceNew
{
public int PaxSeqNo { get; set; }
public string FromStationCode { get; set; }
public string ToStationCode { get; set; }
public string Type { get; set; }
public double BaggageAmount { get; set; }
public double MealAmount { get; set; }
public string ServiceCode { get; set; }
public string ServiceName { get; set; }
public double Amount { get; set; }
public double TotalAmount { get; set; }
}
/// in cs file
on click confirmed i added additionalservices
List data1 = new List();
//new codse meal
AdditionalServiceNew additionalmeal = new AdditionalServiceNew();
additionalmeal.Amount = Convert.ToDouble(bookingDetails.lstFlightDetail[0].TotalAmount);
additionalmeal.MealAmount = Convert.ToDouble(subitemSelectedm.MealAmount);
additionalmeal.Type = "Meal";
additionalmeal.TotalAmount = bookingDetails.FinalTotalAmount;
additionalmeal.PaxSeqNo = 1;
additionalmeal.ServiceCode = subitemSelectedm.MealServiceCode;
additionalmeal.ServiceName = subitemSelectedm.MealServiceName;
//new codse baggage
AdditionalServiceNew additionalbag = new AdditionalServiceNew();
additionalbag.Amount = Convert.ToDouble(bookingDetails.lstFlightDetail[0].TotalAmount);
additionalbag.MealAmount = Convert.ToDouble(subitemSelectedb.BaggageAmount);
additionalbag.Type = "Baggage";
additionalbag.TotalAmount = bookingDetails.FinalTotalAmount;
additionalbag.PaxSeqNo = 1;
additionalbag.ServiceCode = subitemSelectedb.BaggageServiceCode;
additionalbag.ServiceName = subitemSelectedb.BaggageServiceCode;
data1.Add(additionalbag);
data1.Add(additionalmeal);
// this is my listview bookingDetails.lstAdditionsServicesDetailsNew not added data
bookingDetails.lstAdditionServiceDetailsNew.AddRange(data1);