Beta冲刺(周五)

这个作业属于哪个课程

https://edu.cnblogs.com/campus/xnsy/SoftwareEngineeringClass1

这个作业要求在哪里

https://edu.cnblogs.com/campus/xnsy/SoftwareEngineeringClass1/homework/3346

团队名称

机你太美   博客链接:https://www.cnblogs.com/cadaver/

团队成员 学号
李博   201731062327
蒋东航 201731062328
黄宇杰 201731062326
唐弋力 201731062330

一、SCRUM部分

李博:

扫描二维码关注公众号,回复: 6479989 查看本文章

 今日:实现了考勤模块的所有功能

代码截图:

        /// <summary>
        /// 开始考勤,显示二维码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.SelectedItem == null)
            {
                MessageBox.Show("请选择要考勤的课程!");
            }
            else
            {
                isStart = true;
                //生成初始化考勤记录(全为缺勤)
                string cNum = "";
                //List<string> sNum = new List<string>();
                //查询课程号
                string sqlCommand_cNum = "select cNum from Course where cName='" + comboBox1.Text + "' and tNum='"+ toolStripStatusLabel2.Text + "'";
                DataSet ds = new DataSet();
                SqlDataAdapter da = SqlTool.DataAdapter(User.Student.sqlConStr, sqlCommand_cNum);
                da.Fill(ds);
                da.Dispose();
                cNum = ds.Tables[0].Rows[0][0].ToString();
                ds.Dispose();
                //查询对应课程的学生学号
                string sqlCommand_sNum = "select sNum from Class where cNum='" + cNum + "'";
                DataSet ds_sNum = new DataSet();
                SqlDataAdapter Da = SqlTool.DataAdapter(User.Student.sqlConStr, sqlCommand_sNum);
                Da.Fill(ds_sNum);
                //获取时间
                string localtime = DateTime.Now.ToLocalTime().ToString();        // 2019-6-14 20:12:12
                string date = localtime.Split(' ')[0];
                string time = localtime.Split(' ')[1].Split(':')[0];
                c_date = date;
                c_time = time;
                foreach (DataRow dr in ds_sNum.Tables[0].Rows)
                {
                    string sqlCmd = "insert into AttendanceRecord values('"+ cNum +"','"+ dr[0].ToString() +"','"+ "缺勤" +"','"+ date +"','"+ time +"')";
                    SqlTool.ExecuteNonQuery(User.Student.sqlConStr, sqlCmd);
                }
                MessageBox.Show("考勤开始,请扫描屏幕二维码进行签到!");
                
                //显示二维码
                string url = string.Format(@"http://123.207.221.113:8080/home/qiandao.png");
                System.Net.WebRequest webreq = System.Net.WebRequest.Create(url);
                System.Net.WebResponse webres = webreq.GetResponse();
                using (System.IO.Stream stream = webres.GetResponseStream())
                {
                    pictureBox1.Image = Image.FromStream(stream);
                }
            }
        }

        /// <summary>
        /// 选择考勤课程
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ComboBox1_DropDown(object sender, EventArgs e)
        {
            string sqlCommand = "select cName from Course where tNum='" + toolStripStatusLabel2.Text + "'";
            DataSet ds = new DataSet();
            SqlDataAdapter da = SqlTool.DataAdapter(User.Teacher.sqlConStr, sqlCommand);
            da.Fill(ds, "cName");
            da.Dispose();
            this.comboBox1.DataSource = ds.Tables["cName"];
            this.comboBox1.DisplayMember = "cName";
            this.comboBox1.ValueMember = "cName";
        }

        /// <summary>
        /// 停止考勤
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void Button2_Click(object sender, EventArgs e)
        {
            if (isStart)
            {
                isStart = false;
                pictureBox1.Image = null;
                //查询本次考勤信息
                string sqlCommand = "select * from AttendanceRecord where date='" + c_date + "' and time='" + c_time + "' and cNum in (select cNum from Course where cName='"+ comboBox1.Text +"')";
                DataSet ds = new DataSet();
                SqlDataAdapter da = SqlTool.DataAdapter(User.Student.sqlConStr, sqlCommand);
                da.Fill(ds);
                da.Dispose();
                //创建窗口显示本次考勤信息
                本次考勤信息 msg = new 本次考勤信息(ds);
                msg.Show();
            }
            else
            {
                MessageBox.Show("未开始考勤!");
            }
        }

蒋东航:

今日:实现了从服务器上在线读取二维码图片的功能

代码截图:

                //显示二维码
                string url = string.Format(@"http://123.207.221.113:8080/home/qiandao.png");
                System.Net.WebRequest webreq = System.Net.WebRequest.Create(url);
                System.Net.WebResponse webres = webreq.GetResponse();
                using (System.IO.Stream stream = webres.GetResponseStream())
                {
                    pictureBox1.Image = Image.FromStream(stream);
                }

黄宇杰:

 今日:完成了项目涉及到的网页发布部署和服务器的配置

 

 

唐弋力:

今日:完成了项目涉及到的网页发布部署和服务器的配置

 

二、PM 报告:

 燃尽图:

 

部分程序运行最新截图:

 

猜你喜欢

转载自www.cnblogs.com/cadaver/p/11025750.html