Psp
Plan
Five days or so
Demand analysis
As an audience, I would like to know the score of a match in order to understand
Design document
Design review: Not currently
Code specification
Visual Studio,Sql Server2008
Specific design
Specific code
Using System;
Using System.Collections.Generic;
Using System.ComponentModel;
Using System.Data;
Using System.Drawing;
Using System.Linq;
Using System.Text;
Using System.Windows.Forms;
Using System.Data.SqlClient;
Using Model;
Namespace Volleyball
{
public partial class Spectator:form
{
Public Spectator ()
{
InitializeComponent ();
}
private void Spectator_load (object sender, EventArgs e)
{
Groupbox1.visible = false;
}
private void Btnselect_click (object sender, EventArgs e)
{
if (!string. IsNullOrEmpty (Combobox1.text))
{
Groupbox1.visible = true;
Enquiry Team
String sql = "Select team from Team where tname= '%" +combobox1.selectedtext+ "% '";
SqlDataReader read = Sqlhelper.executereader (sql,null);
if (read. Read ())
{
int id = read. GetInt32 (2);
Bureau of Enquiry
String SQL1 = "SELECT * from Jufen where tid= '%" +id+ "% '";
SqlDataReader reader = Sqlhelper.executereader (SQL1, NULL);
if (reader. Read ())
{
Txtafirst.text = reader. GetString (2);
Txtasec.text = reader. GetString (2);
Txtathi.text = reader. GetString (2);
Txtafou.text = reader. GetString (2);
Txtafive.text = reader. GetString (2);
Txtbfirst.text = reader. GetString (3);
Txtbsec.text = reader. GetString (3);
Txtbthi.text = reader. GetString (3);
Txtbfou.text = reader. GetString (3);
Txtbfive.text = reader. GetString (3);
}
}
}
Else
{
MessageBox.Show ("Please enter the competition team to inquire!") ");
Groupbox1.visible = false;
}
}
private void Labfirst_linkclicked (object sender, LinkLabelLinkClickedEventArgs e)
{
First A = new first ();
A.show ();
}
private void Combobox1_textchanged (object sender, EventArgs e)
{
Add the query to the comboBox1 about the input team
Combobox1.droppeddown = true;
String sql = "Select Tname from the Team where tname like '%" +combobox1.text.trim () + "% '";
SqlDataReader read = Sqlhelper.executereader (sql, NULL);
if (read. Read ())
{
COMBOBOX1.ITEMS.ADD (read. HasRows);
}
}
private void Labsecond_linkclicked (object sender, LinkLabelLinkClickedEventArgs e)
{
Second = new ();
Second. Show ();
}
}
}
Code review
Not currently
Test
There was a problem with the specific farm run because of a temporary problem with the database connection
Test report
When you query, the value of the ComboBox is added and cannot be added accurately
After the summary:
The runtime also has some errors that need to be perfected
16th Week personal Assignments