Click here to Skip to main content
15,902,634 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: Problem with Parent Child Data Binding Pin
Marc Clifton17-Feb-08 2:05
mvaMarc Clifton17-Feb-08 2:05 
GeneralRe: Problem with Parent Child Data Binding Pin
Brady Kelly17-Feb-08 2:31
Brady Kelly17-Feb-08 2:31 
GeneralRe: Problem with Parent Child Data Binding Pin
Marc Clifton17-Feb-08 2:40
mvaMarc Clifton17-Feb-08 2:40 
GeneralCommon Features and Functions Across Forms Several Forms Pin
Brady Kelly16-Feb-08 1:36
Brady Kelly16-Feb-08 1:36 
GeneralRe: Common Features and Functions Across Forms Several Forms Pin
Luc Pattyn16-Feb-08 1:46
sitebuilderLuc Pattyn16-Feb-08 1:46 
GeneralRe: Common Features and Functions Across Forms Several Forms Pin
Brady Kelly16-Feb-08 2:24
Brady Kelly16-Feb-08 2:24 
GeneralRe: Common Features and Functions Across Forms Several Forms Pin
Luc Pattyn16-Feb-08 2:36
sitebuilderLuc Pattyn16-Feb-08 2:36 
Generaltimer problem Pin
Miss Maheshwari15-Feb-08 20:08
Miss Maheshwari15-Feb-08 20:08 
hello
i m having a timer event which runs on after 1 minute
in my project i m having the appointment details...so it throws a message that u r having appointment on this time with this person before a particular time(depends on user)..so for this i use a timer event like...
void myTimer_Elapsed(object sender, ElapsedEventArgs e)
{
strCon = strCon.Replace("CONNECTIONSTRING", "Data Source='D:\\Neetu\\Training\\My_Diary_Database.mdb';Provider='Microsoft.Jet.OLEDB.4.0';Jet OLEDB:Database Password='neetu';");
con = new OleDbConnection(strCon);
query = "select alertSetting from settings where ID1=1 ";
cmd = new OleDbCommand(query, con);
con.Open();
dr = cmd.ExecuteReader();

if (dr.Read())
{
setting = Convert.ToInt32(dr["alertSetting"]);
}
con.Close();
dt1 = System.DateTime.Today.AddDays(3);
dt = System.DateTime.Now.AddMinutes(setting);
appointment_reminder(dt, dt1);
}

private void appointment_reminder(DateTime addTime, DateTime Time)
{
int i=0,check = 0;
string appointQuery;
DateTime newdt = addTime, newdt1 = Time;
con = new OleDbConnection(strCon);
DateTime dt = System.DateTime.Now;
string dtToday1 = newdt.ToString("MM/dd/yyyy hh:mm:00 tt");
string dtToday = dt.ToString("MM/dd/yyyy");

appointQuery = @"SELECT * FROM appointment WHERE Apntmnt_date=CDate('" + dtToday + "') and Apntmnt_time = CDate('" + Convert.ToDateTime(dtToday1) + "') order by Apntmnt_time";
cmd = new OleDbCommand(appointQuery, con);
con.Open();
if (con.State.ToString() == "Open")
{
dr = cmd.ExecuteReader();

while (dr.Read())
{
check = 1;
string myTime = dr["Apntmnt_time"].ToString();
strName = dr["Apntmnt_Person"].ToString();
strplace = dr["Apntmnt_Place"].ToString();
i++;
DateTime currentTime1 = Convert.ToDateTime(myTime);
string strTime1 = currentTime1.ToString("hh:mm");
DateTime currentTime = System.DateTime.Now.AddMinutes(setting);
string strTime = currentTime.ToString("hh:mm");

MessageBox.Show("Hello! You Are Having Appointment With " + strName + " At " + strplace + " On Time " + currentTime1);


}
con.Close();
}
}

my problem is this i want to know..m i doing right coz sometimes it gives the error that database connection state is connecting...n some thread problem....so help me...how shud i use this timer event..
GeneralRe: timer problem Pin
Christian Graus16-Feb-08 11:37
protectorChristian Graus16-Feb-08 11:37 
GeneralRe: timer problem Pin
Navneet Hegde25-Feb-08 23:36
Navneet Hegde25-Feb-08 23:36 
GeneralParsing problem string to int Pin
RanaSohail15-Feb-08 5:00
RanaSohail15-Feb-08 5:00 
GeneralRe: Parsing problem string to int Pin
Colin Angus Mackay15-Feb-08 5:15
Colin Angus Mackay15-Feb-08 5:15 
GeneralRe: Parsing problem string to int Pin
Luc Pattyn15-Feb-08 7:56
sitebuilderLuc Pattyn15-Feb-08 7:56 
GeneralRe: Parsing problem string to int Pin
RanaSohail15-Feb-08 20:06
RanaSohail15-Feb-08 20:06 
GeneralRe: Parsing problem string to int Pin
Luc Pattyn16-Feb-08 1:53
sitebuilderLuc Pattyn16-Feb-08 1:53 
General[Message Deleted] Pin
Miss Maheshwari15-Feb-08 1:18
Miss Maheshwari15-Feb-08 1:18 
GeneralRe: not showing the form on mdi parent form Pin
Dave Kreskowiak15-Feb-08 6:11
mveDave Kreskowiak15-Feb-08 6:11 
Generaldatabase problem Pin
Naresh12345678914-Feb-08 23:38
Naresh12345678914-Feb-08 23:38 
GeneralRe: database problem Pin
Colin Angus Mackay15-Feb-08 1:52
Colin Angus Mackay15-Feb-08 1:52 
GeneralRe: database problem Pin
Naresh1234567896-Mar-08 1:18
Naresh1234567896-Mar-08 1:18 
GeneralRe: database problem Pin
Colin Angus Mackay6-Mar-08 1:26
Colin Angus Mackay6-Mar-08 1:26 
GeneralBest practices winforms projects in C# Pin
SimonH7614-Feb-08 22:39
SimonH7614-Feb-08 22:39 
GeneralRe: Best practices winforms projects in C# Pin
Colin Angus Mackay15-Feb-08 1:55
Colin Angus Mackay15-Feb-08 1:55 
GeneralRe: Best practices winforms projects in C# Pin
Giorgi Dalakishvili15-Feb-08 2:16
mentorGiorgi Dalakishvili15-Feb-08 2:16 
GeneralRe: Best practices winforms projects in C# Pin
SimonH7615-Feb-08 16:39
SimonH7615-Feb-08 16:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.