Пример #1
0
        private void btnView_Click(object sender, RoutedEventArgs e)
        {
            if (dgRequests.SelectedIndex == -1) {
                MessageBox.Show("Select a request first");
                return;
            }

            RequestModel model = dgRequests.SelectedItem as RequestModel;
            ViewRequest request = new ViewRequest(model, mainWindow);
            request.ShowDialog();
        }
        private void btnView_Click(object sender, RoutedEventArgs e)
        {
            if (dgRequests.SelectedIndex == -1) {
                MessageBox.Show("Please select a request from the list");
                return;
            }

            model = (RequestModel)dgRequests.SelectedItem;

            viewDialog = new ViewRequest(model, mainWindow);

            viewDialog.ShowDialog();
        }