zoukankan      html  css  js  c++  java
  • 最后冲刺

    计划:

    估计需要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天
    事后总结:
    具体功能还不完善,有待提高与改进,希望老师和同学多多指教。

  • 相关阅读:
    unity中制作模拟第一人称视角下的指南针
    unity3D 中的C#脚本一个类调用另一类中简单方法
    unity中UI的屏幕自适应代码
    unity中导入插件时报错处理办法
    Unity3D在C#编程中的一些命名空间的引用及说明
    Unity中物体碰撞后去掉相互之间的反弹力
    unity3D打包发布Apk详细步骤
    unity3D开发的程序发布到Android平台上进行运行测试的详细步骤
    JAVA的环境变量配置(方式二)
    Java中的 JDK下载和环境配置(方式一)
  • 原文地址:https://www.cnblogs.com/fujunyi/p/6257068.html
Copyright © 2011-2022 走看看