Как суммировать общее время от данных в sql до gridview - PullRequest
0 голосов
/ 09 декабря 2018

string timeFromYourTextBox = label1.Text;TimeSpan time = TimeSpan.Parse (timeFromYourTextBox);

            string q2 = "insert into HoursStats (Hours, Bills) values ('" + time+ "','" + this.textBox1.Text + " ') ;";

            SqlConnection con = new SqlConnection(ss);
            SqlCommand cmd = new SqlCommand(q2, con);
            SqlDataReader read;
            con.Open();
            read = cmd.ExecuteReader();
            while (read.Read()) { };
...