private void ArticlesList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var            article   = (ArticleDTO)ArticlesList.SelectedItem;
            ArticleDetails newWindow = new ArticleDetails(article);

            newWindow.ShowDialog();
        }
Exemple #2
0
 private void ArticlesList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (ArticlesList.SelectedItem != null)
     {
         ArticleDetails newWindow = new ArticleDetails((ArticleDTO)ArticlesList.SelectedItem);
         newWindow.ShowDialog();
     }
 }
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            var article = await articleCore.GetArticleByIdAsync(presentation.ArticleId);

            if (article != null)
            {
                ArticleDetails newWindow = new ArticleDetails(article);
                newWindow.ShowDialog();
            }
        }
Exemple #4
0
        private async void EditArticles_Click(object sender, RoutedEventArgs e)
        {
            if (ArticleDataGrid.SelectedIndex >= 0)
            {
                var article = await articleCore.GetArticleByIdAsync(((ArticleDTO)ArticleDataGrid.SelectedItem).ArticleId);

                ArticleDetails newArticleDetailsWindow = new ArticleDetails(article);
                newArticleDetailsWindow.ShowDialog();
            }
            else
            {
                MessageBox.Show("Choose article first");
            }
        }