0
我在父視圖中有一個數據網格。將選定值傳遞給子窗口
當我選擇在網格中的項目,
我想開一個子窗口
被選中的項值傳遞給子窗口
我需要根據所選值提交更改。
我正在修改以下代碼,這是我需要轉移到子窗口的點擊事件。
我可以從父視圖繼承域數據源嗎?
private void ApproveCmd_Click(object sender, RoutedEventArgs e)
{
PA_Request selReq =(PA_Request) this.onticPMA_RequestRadGridView.SelectedItem;
if (selReq != null)
{
((PA_Request)this.PA_RequestRadGridView.SelectedItem).STATUS = "Approved";
this.PA_RequestDomainDataSource.SubmitChanges();
}
}
private void DissaproveCmd_Click(object sender, RoutedEventArgs e)
{
PA_Request selReq = (PA_Request)this.PA_RequestRadGridView.SelectedItem;
if (selReq != null)
{
((PA_Request)this.PA_RequestRadGridView.SelectedItem).STATUS = "Disapproved";
this.PA_RequestDomainDataSource.SubmitChanges();
}
}
private void ApplyCmd_Click(object sender, RoutedEventArgs e)
{
PA_Request selReq = (PA_Request)this.PA_RequestRadGridView.SelectedItem;
if (selReq != null)
{
((PA_Request)this.PA_RequestRadGridView.SelectedItem).STATUS = "Applied";
this.PA_RequestDomainDataSource.SubmitChanges();
}