private void openAddBranchPage(object sender, RoutedEventArgs e) { Window AddBranchWindows = new addBranchWindows(); (AddBranchWindows as addBranchWindows).refresh += refreshTable; AddBranchWindows.Show(); }
/// <summary> /// יופעל בעת לחיצה על שורה בטבלה, יפעיל את העריכה של אותו אובייקט /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void clickOnTableForUpdate(object sender, MouseButtonEventArgs e) { BE.Branch branch = new BE.Branch(); branch = (BE.Branch)(branchDataGrid.SelectedItem); Window AddBranchWindows = new addBranchWindows(branch.branchId); // שליחת מספר המסעדה לחלון עריכת מסעדה (AddBranchWindows as addBranchWindows).refresh += refreshTable; //הרשמה לאירוע של חלון העריכה , יפעיל את ריענון הטבלה AddBranchWindows.Show(); }