private void Btn_GetDetail_Click(object sender, RoutedEventArgs e) { try { if (SelectedGrid != null) { GetDetail getDetail = new GetDetail(); getDetail.Owner = mainWindow; getDetail.Plan = SelectedGrid.SelectedItem as DB.WeeklyPlan; mainWindow.Opacity = 0.5; getDetail.WindowStartupLocation = WindowStartupLocation.CenterOwner; getDetail.ShowDialog(); } } catch (Exception ex) { DB.AddLog(new Log { error_page = "ucweeklyplan", error_text = ex.Message, log_user = User.id }); } }
private void Grid_onlyPlan_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { try { if (grid_onlyPlan != null) { GetDetail getDetail = new GetDetail(); getDetail.Owner = mainWindow; getDetail.Plan = grid_onlyPlan.SelectedItem as DB.WeeklyPlan; mainWindow.Opacity = 0.5; getDetail.WindowStartupLocation = WindowStartupLocation.CenterOwner; getDetail.ShowDialog(); } } catch (Exception ex) { DB.AddLog(new Log { error_page = "ucreport_gridonlyplan_doubleclick", error_text = ex.Message, log_user = User.id }); } }