Ejemplo n.º 1
0
        public void getData()
        {
            PathBll           pathBll  = new PathBll();
            MedtermQualityBll mqBll    = new MedtermQualityBll();
            ScoreBll          scoreBll = new ScoreBll();
            GuideRecordBll    guideBll = new GuideRecordBll();
            CrossBll          crossBll = new CrossBll();
            DefenceBll        dfBll    = new DefenceBll();

            state = Session["state"].ToString();
            if (state == "3")
            {
                student      = (Student)Session["loginuser"];
                stuNO        = student.StuAccount;
                recordResult = Record.selectBystuId(stuNO);
                if (recordResult)
                {
                    ds     = Record.GetByAccount(stuNO);
                    title  = ds.Tables[0].Rows[0]["title"].ToString();  //获取标题
                    planId = ds.Tables[0].Rows[0]["planId"].ToString(); //获取批次ID
                    Plan plan = planBll.Select(int.Parse(planId));      //获取批次信息
                    startTime = plan.StartTime;                         //批次开始时间
                    endTime   = plan.EndTime;                           //批次结束时间
                    string dsTime = ds.Tables[0].Rows[0]["createTime"].ToString();
                    selectTime = Convert.ToDateTime(dsTime);            //学生选定题目时间

                    //获取选题记录ID来取得学生开题报告的信息
                    titleRecordId = ds.Tables[0].Rows[0]["titleRecordId"].ToString();
                    if (opBll.selectByRecordId(int.Parse(titleRecordId)) == true)
                    {
                        opReport        = opBll.Select(int.Parse(titleRecordId));
                        opTime          = opReport.reportTime;
                        teacherOpenning = opReport.teacherOpinion;
                        pathRe          = pathBll.selectByTitleRecordId(titleRecordId);
                        if (pathRe == Result.记录存在)
                        {
                            Path        pathRecordId = pathBll.getTitleRecordId(stuNO);
                            TitleRecord tr           = pathRecordId.titleRecord;
                            pathds       = pathBll.getModel(tr.TitleRecordId, stuNO);   //遍历路径信息(type为0时)
                            checkReport  = pathBll.getCheckReport(tr.TitleRecordId);    //查重
                            mq           = mqBll.Select(tr.TitleRecordId);              //遍历中期质量报告
                            scoreDs      = scoreBll.Select(stuNO, int.Parse(planId));   //获取学生成绩
                            crossGuideDs = crossBll.Select(tr.TitleRecordId);           //遍历交叉指导信息
                            corssDs      = crossBll.SelectByStu(stuNO);
                            defenceDs    = dfBll.getModel(tr.TitleRecordId.ToString()); //遍历答辩记录信息
                        }
                    }
                }
                //else
                //{
                //    Response.Write("你还没有选题,请先进行选题");
                //}
            }
            else
            {
                Response.Write("管理员和教师没有进度条");
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TitleRecordBll trbll   = new TitleRecordBll();
            ScoreBll       sbll    = new ScoreBll();
            Student        student = (Student)Session["loginuser"];

            stuAccount = student.StuAccount;
            stuName    = student.RealName;
            proName    = student.profession.ProName;
            DataSet dsTR = trbll.GetByAccount(stuAccount);

            if (dsTR == null)
            {
                content = "暂未选题";
            }
            else
            {
                int planId = 0;
                for (int i = 0; i < dsTR.Tables[0].Rows.Count; i++)
                {
                    string stuaccount = dsTR.Tables[0].Rows[i]["stuAccount"].ToString();
                    if (stuaccount == stuAccount)
                    {
                        titleRecordId = Convert.ToInt32(dsTR.Tables[0].Rows[0]["titleRecordId"].ToString());
                        title         = dsTR.Tables[0].Rows[0]["title"].ToString();
                        planId        = Convert.ToInt32(dsTR.Tables[0].Rows[0]["planId"].ToString());
                        break;
                    }
                }
                Score _score = sbll.getState(titleRecordId.ToString());
                state = _score.state;
                if (state == 0 || state == 1 || state == 2)
                {
                    content = "暂无成绩";
                }
                else
                {
                    //获取成绩
                    DataSet ds        = sbll.Select(stuAccount, planId);
                    int     openState = Convert.ToInt32(ds.Tables[0].Rows[0]["openState"].ToString());
                    if (openState == 0)
                    {
                        Response.Write("成绩还未开放查询,请耐心等待");
                        Response.End();
                    }
                    else
                    {
                        double guideScore = 0, crossScore = 0, defenceScore = 0;
                        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                        {
                            string remarks = ds.Tables[0].Rows[i]["remarks"].ToString();
                            if (remarks == "指导成绩")
                            {
                                guideScore = Convert.ToDouble(ds.Tables[0].Rows[i]["score"].ToString());
                            }
                            else if (remarks == "交叉评阅")
                            {
                                crossScore = Convert.ToDouble(ds.Tables[0].Rows[i]["score"].ToString());
                            }
                            else if (remarks == "答辩成绩")
                            {
                                defenceScore = Convert.ToDouble(ds.Tables[0].Rows[i]["score"].ToString());
                            }
                        }
                        score = guideScore * 0.4 + crossScore * 0.3 + defenceScore * 0.3;
                    }
                }
            }
        }