A
Andy B
I have the following method in C#:
public bool AddNews(DateTime Date, String subjectm, String Body) {
NewsDataSet.NewsArticlesDataTable NewsArticles = new
NewsDataSet.NewsArticlesDataTable();
NewsDataSet.NewsArticlesRow NewsArticle = NewsArticles.NewNewsArticlesRow();
NewsArticle.Date=Date;
NewsArticle.Text=Body;
NewsArticle.Title=subjectm;
NewsArticles.AddNewsArticlesRow(NewsArticle);
int RowsAffected = NewsArticlesAdapter.Update(NewsArticles);
return RowsAffected==1;
}
What I want to do, is if the method fails, display a user friendly error in
a popup dialog and if the method was successful, show a message that it
worked. How would you do this? I am trying to put it in the
FinishButton_Click event of a Wizard control.
public bool AddNews(DateTime Date, String subjectm, String Body) {
NewsDataSet.NewsArticlesDataTable NewsArticles = new
NewsDataSet.NewsArticlesDataTable();
NewsDataSet.NewsArticlesRow NewsArticle = NewsArticles.NewNewsArticlesRow();
NewsArticle.Date=Date;
NewsArticle.Text=Body;
NewsArticle.Title=subjectm;
NewsArticles.AddNewsArticlesRow(NewsArticle);
int RowsAffected = NewsArticlesAdapter.Update(NewsArticles);
return RowsAffected==1;
}
What I want to do, is if the method fails, display a user friendly error in
a popup dialog and if the method was successful, show a message that it
worked. How would you do this? I am trying to put it in the
FinishButton_Click event of a Wizard control.