Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can i make this program Parrallel ? Pin
Phil Martin11-May-14 22:39
professionalPhil Martin11-May-14 22:39 
GeneralRe: How can i make this program Parrallel ? Pin
Phil Martin11-May-14 22:47
professionalPhil Martin11-May-14 22:47 
GeneralRe: How can i make this program Parrallel ? Pin
SledgeHammer0112-May-14 9:33
SledgeHammer0112-May-14 9:33 
GeneralRe: How can i make this program Parrallel ? Pin
Phil Martin12-May-14 11:15
professionalPhil Martin12-May-14 11:15 
QuestionStored procedures - Northwind database Pin
Vexy11-May-14 9:58
Vexy11-May-14 9:58 
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 
I have a question about plotting data from database to a line grpah. In my line graph there is 3 data that is tempin, tempout and also humdity that I must plot in a line graph..I made this coding but it seem doesn't work.I have a sql statement to selesct data but I do know how to plotting the line in a graph. Can anyone help me?

C#
string sql = "SELECT TempIn, tempOut, humidity FROM Environmnets WHERE DateT > DateADD(mi, -30, Current_TimeStamp)  INNER JOIN TDevice ON Environmnets.Deviceid = TDevice.id INNER JOIN TMushroomHouse ON TDevice.MushroomHouseId = TMushroomHouse.id WHERE TMushroomHouse.id = @id";
              using (SqlConnection con = new SqlConnection(strConnString))
              using (SqlCommand cmd = new SqlCommand(sql, con))
              {
                  cmd.Parameters.AddWithValue("@id", DropDownList1.Text);

                  con.Open();

                  using (SqlDataReader dr = cmd.ExecuteReader())
                  {
                      while (dr.Read())
                      {
                          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));
                          Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;
                      }
                      con.Close();

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 
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 

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.