から変更し、この私のコレクションされていますWPF observablecollection。子ウィンドウ
public ObservableCollection<CheckOutData> _CheckOutCollection = new ObservableCollection<CheckOutData>();
public ObservableCollection<CheckOutData> CheckOutCollection
{
get { return _CheckOutCollection; }
}
public class CheckOutData
{
public int ID { get; set; }
public string RoomType { get; set; }
public string RoomNumber { get; set; }
public decimal RoomPrice { get; set; }
public string RoomPriceWithCurrency { get; set; }
public decimal Discount { get; set; }
public decimal DiscountedPrice { get; set; }
public string DiscountedPriceWithCurrency { get; set; }
public string CheckIn { get; set; }
public string CheckOut { get; set; }
public int TotalDay { get; set; }
public string CheckOutHour { get; set; }
}
私は次の操作を実行したい別のウィンドウがあります。CheckOutDataパブリック文字列serviceNameを追加取得または設定} はどのようにこれを行うことができますか?私は私の子供のウィンドウでチェックアウトデータが表示されません。 私の主な仕事はcheckoutdataに新しいコレクションを追加し、次にDataGridを再バインドすることです。誰でも助けてくれますか?
private CheckOut m_parent;
public AddActionService(CheckOut parent)
{
InitializeComponent();
m_parent = parent;
}