0
修改这是我收集: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公共字符串服务名{获得;设置} 怎么能这样做呢?我甚至不会在我的子窗口中看到checkoutdata。 所以我的主要任务是在checkoutdata中添加新的集合,然后重新绑定datagrid。谁能帮我?
private CheckOut m_parent;
public AddActionService(CheckOut parent)
{
InitializeComponent();
m_parent = parent;
}