Pop up reminder on windows application using C#?
I am developing desktop application. i am using ms sql and C#.
testtable records.
noteid notetitle notelocation notedescription
101 Meles Zenawi Mekele meeting
102 Tigray Mekele northern star
103 Maineberi Mekele southern star
104 Axum axum centeral
now i have a form called "reminder" which is used for displaying data on loading of the page.
i want to display 3 dialog box(popup box) when the page is loading.... here is my code
Code:
private void rentalfrm_Load(object sender, EventArgs e)
{
string city="Mekele";
sqlDataReader drnote;
string selectdata = "select noteid,notetitle from remindernotetbl where notelocation='"+city+"'";
SqlCommand cmdnote = new SqlCommand(selectdata, dbcon);
drnote = cmdnote.ExecuteReader();
while(drnote.Read())
{
reminder rem = new reminder();
rem.ShowDialog();
}
//drdate.Close();
dbcon.Close();
}
This code not work correctly. it shows me 3 dialog box(pop up form of "reminder") but only retrieved the first row.
i want to see 3 dialog box(pop up form) with the 3 records on the row.
any help please
Re: Pop up reminder on windows application using C#?
All we can see from that code is that you're displaying a dialogue for each record. There's no indication that you're actually reading any of the data from the data reader.