• 三层架构


    1、计划

     

    计划时间

    实际完成时间

    估计任务需要时间

    7天

     

    需求分析

    10min

     

    生成设计文档

    30min

     

    设计复审

    1h

     

    代码规范

    20min

     

    具体设计

    3h

     

    具体编码

    5day

     

    代码复审

    1h

     

    测试

    1h

     

    测试报告

    30min

     

    计算工作量

    30min

     

    事后总结并提出过程改进计划

     

     

    2、

    开发
       需求分析
          作为一名现场记分员,我希望详细记录比赛现场比分增长情况,以便观众及运动员、教练员及时掌握比赛状况。
        生成设计文档

     设计复审

    代码规范
      SQL server2008、Visual Studio2010

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

    private static readonly string constr = ConfigurationManager.ConnectionStrings["itcast"].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.Linq;
    using System.Text;
    using System.Data.SqlClient;
    using Model;


    namespace sceneJiFenDAL
    {

    public class BeginDal
    {

    public int Insert(Fen fen)
    {
    string sql = "insert into Fen values(@TeamA,@ADeFen,@TeamAFenName,@TeamB,@BDeFen,@TeamBFenName)";
    SqlParameter[] paras = new SqlParameter[]{
    new SqlParameter("@TeamA",fen.TeamA),
    new SqlParameter("@TeamAFenName",fen.TeamAFenName),
    new SqlParameter("@TeamA",fen.TeamB),
    new SqlParameter("@TeamAFenName",fen.TeamBFenName)
    };
    int count = SqlHelper.ExecuteNonQuery(sql,paras);
    return count;
    }
    public List<Fen> SelectAllFen()
    {
    string sql = "select * from Fen";
    List<Fen> fenlist = new List<Fen>();
    using (SqlDataReader reader = SqlHelper.ExecuteReader(sql))
    {
    if(reader.HasRows)
    {
    while (reader.Read())
    {
    Fen fen = new Fen();
    fen.TeamA = reader.GetString(1);
    fen.ADeFen = reader.GetString(2);
    fen.TeamAFenName = reader.GetString(3);
    fen.TeamB = reader.GetString(4);
    fen.BDeFen = reader.GetString(5);
    fen.TeamBFenName = reader.GetString(6);
    fenlist.Add(fen);
    }

    }
    }
    return fenlist;
    }

    }
    }

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Model;
    using sceneJiFenDAL;

    namespace sceneJiFenBLL
    {
    public class FenBLL
    {
    BeginDal dal = new BeginDal();
    public bool Insert(Fen fen)
    {

    return dal.Insert(fen) > 0;
    }
    public List<Fen> GetAllFen()
    {
    return dal.SelectAllFen().Count > 0 ? dal.SelectAllFen() : null;
    }
    }
    }

    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 Model;
    using sceneJiFenBLL;


    namespace sceneJiFen
    {
    public partial class One : Form
    {
    public One()
    {
    InitializeComponent();
    }
    int Adefen=0;
    int Bdefen = 0;
    private FenBLL bll = new FenBLL();
    private void button1_Click(object sender, EventArgs e)
    {
    Adefen++;
    Fen fen=new Fen();
    fen.TeamA=label1.Text;
    fen.TeamB = label2.Text;
    fen.ADeFen = Adefen.ToString();
    if (radioBtn2.Checked == true)

    fen.TeamAFenName = radioBtn2.Text;
    }

    if (radioButton2.Checked == true)
    {
    fen.TeamAFenName = radioButton2.Text;
    }
    if (radioButton3.Checked == true)
    {
    fen.TeamAFenName = radioButton3.Text;
    }
    if (radioButton14.Checked == true)
    {
    fen.TeamAFenName = radioButton14.Text;
    }
    if (radioButton6.Checked == true)
    {
    fen.TeamAFenName = radioButton6.Text;
    }
    if (radioButton5.Checked == true)
    {
    fen.TeamAFenName = radioButton5.Text;
    }
    if (radioButton4.Checked == true)
    {
    fen.TeamAFenName = radioButton4.Text;
    }
    if (radioButton13.Checked == true)
    {
    fen.TeamAFenName = radioButton13.Text;
    }

    }

    private void button2_Click(object sender, EventArgs e)
    {
    Bdefen++;
    Fen fen = new Fen();
    fen.TeamA = label1.Text;
    fen.TeamB = label2.Text;
    fen.BDeFen = Bdefen.ToString();
    if (radioButton12.Checked == true)
    {
    fen.TeamAFenName = radioButton12.Text;
    }

    if (radioButton11.Checked == true)
    {
    fen.TeamAFenName = radioButton11.Text;
    }
    if (radioButton10.Checked == true)
    {
    fen.TeamAFenName = radioButton10.Text;
    }
    if (radioButton9.Checked == true)
    {
    fen.TeamAFenName = radioButton9.Text;
    }
    if (radioButton8.Checked == true)
    {
    fen.TeamAFenName = radioButton8.Text;
    }
    if (radioButton7.Checked == true)
    {
    fen.TeamAFenName = radioButton7.Text;
    }

    }

    private void One_Load(object sender, EventArgs e)
    {

    }
    }
    }

    最终测试结果

    计算工作量

     

    计划时间

    实际完成时间

    估计任务需要时间

    7天

     8day

    需求分析

    10min

     10,min

    生成设计文档

    30min

     45min

    设计复审

    1h

     2h

    代码规范

    20min

     10min

    具体设计

    3h

     5h

    具体编码

    5day

     6day

    代码复审

    1h

     30min

    测试

    1h

     1.5h

    测试报告

    30min

     10min

    计算工作量

    30min

     40min

    事后总结并提出过程改进计划

     

     

     总结

    好难啊,知识点一会不用就会忘,以后要学一步做一步

  • 相关阅读:
    【转】.net 在线播放各类视频
    引用母版页的内容页添加CSS文件
    NET上传大文件出现网页无法显示的问题 默认的上传文件大小是4M
    DropDownList1.Items.Insert 与 DropDownList1.Items.Add 的区别
    暑假集训8.10-网络流套树剖套线段树
    暑假集训8.10—网络流(黑白染色法)
    暑假集训8.7数据结构专题—网络流套线段树
    暑假集训8.7数据结构专题-线段树存直线
    暑假集训8.7数据结构专题-很妙的线段树( 觉醒力量(hidpower))
    可修改主席树&树上可修改主席树—树套树套树!!!
  • 原文地址:https://www.cnblogs.com/152miaomiao/p/6569058.html
Copyright © 2020-2023  润新知