Click here to Skip to main content
15,893,381 members
Home / Discussions / C#
   

C#

 
AnswerRe: Stored procedures - Northwind database Pin
Rob Philpott12-May-14 1:33
Rob Philpott12-May-14 1:33 
AnswerRe: Stored procedures - Northwind database Pin
sankarsan parida12-May-14 19:29
professionalsankarsan parida12-May-14 19:29 
QuestionPlot line graph from database Pin
Syafiqah Zahirah11-May-14 4:44
Syafiqah Zahirah11-May-14 4:44 
AnswerRe: Plot line graph from database Pin
V.11-May-14 20:19
professionalV.11-May-14 20:19 
GeneralRe: Plot line graph from database Pin
Syafiqah Zahirah11-May-14 20:52
Syafiqah Zahirah11-May-14 20:52 
GeneralRe: Plot line graph from database Pin
V.11-May-14 21:01
professionalV.11-May-14 21:01 
GeneralRe: Plot line graph from database Pin
Syafiqah Zahirah15-May-14 6:53
Syafiqah Zahirah15-May-14 6:53 
AnswerRe: Plot line graph from database Pin
Bernhard Hiller11-May-14 22:14
Bernhard Hiller11-May-14 22:14 
Syafiqah Zahirah wrote:
TempInTextBox.Text = dr.GetValue(0).ToString();
TempOutTextBox.Text = dr.GetValue(1).ToString();
HumidTextBox.Text = dr.GetValue(2).ToString();
Chart1.Series["TempIn"].Points.AddXY(DateTime.Now.ToShortTimeString(), Double.Parse(TempInTextBox.Text));
Chart1.Series["TempOut"].Points.AddXY(DateTime.Now.ToShortTimeString(), Double.Parse(TempOutTextBox.Text));
Chart1.Series["Humidity"].Points.AddXY(DateTime.Now.ToShortTimeString(), Double.Parse(HumidTextBox.Text));

Why do you send the values from the database to textboxes, and then parse them from the textboxes to numeric values again?
What about
C#
double tempIn = dr.GetDouble(0);
Chart1.Series["TempIn"].Points.AddXY(DateTime.Now.ToShortTimeString(), tempIn);

And since you always use DateTime.Now on the x axis, I think you are missing something else. What about querying the DateTime value also from the database, and using it here instead of DateTime.Now?
GeneralRe: Plot line graph from database Pin
Syafiqah Zahirah15-May-14 7:13
Syafiqah Zahirah15-May-14 7:13 
GeneralRe: Plot line graph from database Pin
Syafiqah Zahirah20-May-14 9:24
Syafiqah Zahirah20-May-14 9:24 
QuestionDeleting Read Bytes Pin
computerpublic10-May-14 23:49
computerpublic10-May-14 23:49 
AnswerRe: Deleting Read Bytes Pin
OriginalGriff11-May-14 0:49
mveOriginalGriff11-May-14 0:49 
GeneralRe: Deleting Read Bytes Pin
computerpublic11-May-14 5:58
computerpublic11-May-14 5:58 
GeneralRe: Deleting Read Bytes Pin
OriginalGriff11-May-14 6:22
mveOriginalGriff11-May-14 6:22 
GeneralRe: Deleting Read Bytes Pin
Richard MacCutchan11-May-14 7:17
mveRichard MacCutchan11-May-14 7:17 
GeneralRe: Deleting Read Bytes Pin
Richard MacCutchan11-May-14 7:17
mveRichard MacCutchan11-May-14 7:17 
QuestionHow Do I Select Particular Data From Sql Database In C#? Pin
hahaahahaahahhahahahhahaha10-May-14 18:29
hahaahahaahahhahahahhahaha10-May-14 18:29 
AnswerRe: How Do I Select Particular Data From Sql Database In C#? Pin
OriginalGriff10-May-14 21:31
mveOriginalGriff10-May-14 21:31 
QuestionUpdating UI from Task Pin
GrooverFromHolland10-May-14 5:40
GrooverFromHolland10-May-14 5:40 
AnswerRe: Updating UI from Task Pin
Eddy Vluggen12-May-14 8:31
professionalEddy Vluggen12-May-14 8:31 
GeneralRe: Updating UI from Task Pin
GrooverFromHolland13-May-14 10:31
GrooverFromHolland13-May-14 10:31 
GeneralRe: Updating UI from Task Pin
Eddy Vluggen14-May-14 7:19
professionalEddy Vluggen14-May-14 7:19 
QuestionEditing values in List? Pin
Member 1044193910-May-14 4:16
professionalMember 1044193910-May-14 4:16 
AnswerRe: Editing values in List? Pin
Wes Aday10-May-14 4:25
professionalWes Aday10-May-14 4:25 
AnswerRe: Editing values in List? Pin
pradeep surya10-May-14 5:19
pradeep surya10-May-14 5:19 

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.