首页 > 其他 > 详细

最后冲刺

时间:2017-01-06 22:26:20      阅读:137      评论:0      收藏:0      [点我收藏+]

 

计划:

估计需要6-7天

开发:

需求分析:

作为一名排球教练的助手,我需要统计对手球队的每一名球员,在每场各个技术动作的发挥情况(救球、发球、拦网...);每个队员的技术习惯(扣斜球、扣直线、...);每支对手球队的战术手段(背溜、双快一游动、...)及队员组合,以便教练指定比赛的对策。

3、生成设计文档:

技术分享

4、设计复审:三个小时
5、代码规范 无
6、具体编码:

技术分享

技术分享

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

/// <summary>
///SqlHelper 
/// </summary>
public static class SqlHelper
{
public SqlHelper()
{

private static readonly string constr = ConfigurationManager.ConnectionStrings["conStr"].ConnectionString;
public static int ExecuteNonQuery(string sql,params SqlParameter[] pms)
{
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand(sql, con))
{
if (pms != null)
{
cmd.Parameters.AddRange(pms);

}
con.Open();
return cmd.ExecuteNonQuery();
}
}

}
public static object ExecuteScalar(string sql,params SqlParameter[] pms)
{
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand(sql, con))
{
if (pms != null)
{
cmd.Parameters.AddRange(pms);

}
con.Open();
return cmd.ExecuteScalar();
}
}
}
public static SqlDataReader ExecuteReader(string sql, params SqlParameter[] pms)
{
SqlConnection con = new SqlConnection(constr);
using (SqlCommand cmd = new SqlCommand(sql, con))
{
if (pms != null)
{
cmd.Parameters.AddRange(pms);

}
try
{
con.Open();
return cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection);
}
catch(Exception)
{
con.Close();
con.Dispose();
throw;
}
}
}
public static DataTable ExecuteDataTable(string sql, params SqlParameter[] pms)
{
DataTable dt = new DataTable();
using (SqlDataAdapter adapter = new SqlDataAdapter(sql, constr))
{
if (pms != null)
{
adapter.SelectCommand.Parameters.AddRange(pms);

}
adapter.Fill(dt);
}
return dt;
}

}


 

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.Management;
using System.IO;

namespace 排球
{
public partial class ZhuShou : Form
{

public ZhuShou()
{
InitializeComponent();
}

private void btnOK_Click(object sender, EventArgs e)
{
string ZhuGong111 = txtZhuGong1.Text;
string ZhuGong222 = txtZhuGong2.Text;
string FuGong111 = txtFuGong1.Text;
string FuGong222 = txtFuGong2.Text;
string JieYing111 = txtJieYing.Text;
string ErChuan111 = txtErChuan.Text;
string ZiYouRen111 = txtZiYouRen.Text;
if (string.IsNullOrEmpty(ZhuGong111)) { MessageBox.Show("输入本场比赛的主攻手一"); }
else if (string.IsNullOrEmpty(FuGong111)) { MessageBox.Show("输入本场比赛的副攻手一"); }
else if (string.IsNullOrEmpty(ZhuGong222)) { MessageBox.Show("输入本场比赛的主攻手二"); }
else if (string.IsNullOrEmpty(FuGong222)) { MessageBox.Show("输入本场比赛的副攻手二"); }
else if (string.IsNullOrEmpty(JieYing111)) { MessageBox.Show("输入本场比赛的接应"); }
else if (string.IsNullOrEmpty(ErChuan111)) { MessageBox.Show("输入本场比赛的二传"); }
else if (string.IsNullOrEmpty(ZiYouRen111)) { MessageBox.Show("输入本场比赛的自由人"); }
else
{
groupBox1.Visible = false;
groupBox2.Visible = true;
linkZhuGong1.Text = ZhuGong1.Text + txtZhuGong1.Text;
linkFuGong1.Text=FuGong1.Text+txtFuGong1.Text;
linkZhuGong2.Text = ZhuGong2.Text + txtZhuGong2.Text;
linkFuGong2.Text = FuGong2.Text + txtFuGong2.Text;
linkJieYing.Text = JieYing.Text + txtJieYing.Text;
linkErChuan.Text = ErChuan.Text + txtErChuan.Text;
linkZiYouRen.Text = ZiYouRen.Text + txtZiYouRen.Text;
}
}

private void ZhuShou_Load(object sender, EventArgs e)
{
groupBox1.Visible = true;
groupBox2.Visible = false;
}
int i = 0;

private void button1_Click(object sender, EventArgs e)
{
i++;
txtFen.AppendText (lblName.Text + button1.Text + " " + i);
}
int FQ = 0;
private void btnFaQiu_Click(object sender, EventArgs e)
{
FQ++;
txtFen.AppendText(lblName.Text+btnFaQiu.Text+" "+FQ);
}
int KQ=0;
private void btnKouQiu_Click(object sender, EventArgs e)
{
KQ++;
txtFen.AppendText(lblName.Text + btnKouQiu.Text + " " + KQ);
}
int CW=0;
private void btnChouWang_Click(object sender, EventArgs e)
{
CW++;
txtFen.AppendText(lblName.Text + btnChouWang.Text + " " + CW);
}
int DQ = 0;
private void btnDiaoQiu_Click(object sender, EventArgs e)
{
DQ++;
txtFen.AppendText(lblName.Text + btnDiaoQiu.Text + " " + DQ);
}
int LWCJ = 0;
private void btnLWChuJie_Click(object sender, EventArgs e)
{
LWCJ++;
txtFen.AppendText(lblName.Text + btnLWChuJie.Text + " " + LWCJ);
}
int FQSW = 0;
private void btnFaQiuShiWu_Click(object sender, EventArgs e)
{
FQSW++;
txtFen.AppendText(lblName.Text + btnFaQiuShiWu.Text + " " + FQSW);
}
int KQCJ = 0;
private void btnKouQiuChuJie_Click(object sender, EventArgs e)
{
KQCJ++;
txtFen.AppendText(lblName.Text + btnKouQiuChuJie.Text + " " + KQCJ);
}
private void lastOK_Click(object sender, EventArgs e)
{
FileStream fs = new FileStream("C:\\file.txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter m_streamWriter = new StreamWriter(fs);
m_streamWriter.Flush();
m_streamWriter.BaseStream.Seek(0, SeekOrigin.Begin);
m_streamWriter.Write(txtFen.Text);
m_streamWriter.Close();
MessageBox.Show("发送成功!");
groupBox2.Visible = false;
groupBox1.Visible = true;
}

private void linkZhuGong1_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e)
{
lblName.Text = linkZhuGong1.Text;
}

private void linkFuGong1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
lblName.Text = linkFuGong1.Text;
}

private void linkZhuGong2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
lblName.Text = linkZhuGong2.Text;
}

private void linkFuGong2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
lblName.Text = linkFuGong2.Text;
}

private void linkJieYing_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
lblName.Text = linkJieYing.Text;
}

private void linkErChuan_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
lblName.Text = linkErChuan.Text;
}

private void linkZiYouRen_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
lblName.Text = linkZiYouRen.Text;
}

private void groupBox1_Enter(object sender, EventArgs e)
{

}

private void groupBox2_Enter(object sender, EventArgs e)
{

}

 

 

 



}
}

 

7、代码复审:30min
8、报告
测试报告:30min
计算工作量:7天
事后总结:
具体功能还不完善,有待提高与改进,希望老师和同学多多指教。

 

最后冲刺

原文:http://www.cnblogs.com/fujunyi/p/6257068.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!