• Project plan
Time required to complete this project: 5-7 days
• Project development
• Demand Analysis:
• As a volleyball event manager, I would like to be able to count the scores of each team, to better rank the teams, so that each team can master their position.
• Design Documentation
• The demand analysis of user stories from volleyball matches shows that this program is used to count the scores and points of each team and rank according to the points.
• Plan review
• Further discussions are underway.
• Code Specification
• Write according to the visual Studio 2010 specification.
• Specific Design
· The URL activity diagram is as follows:
· The URL class diagram is as follows:
Part of the code:
Namespacewindowsformsapplication1{PublicStaticClassSqlHelper {PrivateStaticReadOnlyString constr ="Server=.; Database=itcast;integrated Security=true";//Delete and changePublicStaticint ExecuteNonQuery (String sql,ParamsSqlparameter[] pams) {using (SqlConnection conn =NewSqlConnection (Constr)) {using (SqlCommand comm =NewSqlCommand (SQL, conn)) {if (pams! =Null) {Comm. Parameters.addrange (PAMS); } conn. Open ();ReturnComm. ExecuteNonQuery (); } } }//Back to SqlDataReaderPublicStatic SqlDataReader ExecuteReader (String sql,ParamsSqlparameter[] pams) {SqlConnection conn =NewSqlConnection (CONSTR);using (SqlCommand comm =NewSqlCommand (SQL, conn)) {if (pams! =Null) {Comm. Parameters.addrange (PAMS); } conn. Open ();ReturnComm. ExecuteReader (commandbehavior.closeconnection); } }PublicStaticObject ExecuteScalar (String sql,ParamsSqlparameter[] pams) {using (SqlConnection conn =NewSqlConnection (Constr)) {using (SqlCommand comm =NewSqlCommand (SQL, conn)) {if (pams! =Null) {Comm. Parameters.addrange (PAMS); } conn. Open ();Return Comm. ExecuteScalar (); }}} public static DataTable executedatatable (String sql, params sqlparameter[] pams) {DataTable dt = new DataTable (); using (SqlDataAdapter adapter = new SqlDataAdapter (SQL, constr)) { if (pams! = null) {ADAPTE R.selectcommand.parameters.addrange (PAMS); } adapter. Fill (DT); } return dt;}}}
< Span style= "COLOR: #0000ff" > < Span style= "COLOR: #000000" > < Span style= "COLOR: #000000" > < Span style= "COLOR: #0000ff" >&NBSP;
18th Week of personal work