Esempio n. 1
0
        //获取表格数据
        public void getPage(String strWhere)
        {
            string currentPage = Request.QueryString["currentPage"];

            if (currentPage == null || currentPage.Length <= 0)
            {
                currentPage = "1";
            }

            CrossBll crossBll = new CrossBll();

            teaAccount = tea.TeaAccount;
            string       where1    = "teaAccount = " + teaAccount;
            string       where2    = "teaAccount = " + teaAccount + " and " + strWhere;
            TableBuilder tabuilder = new TableBuilder()
            {
                StrTable      = "V_TitleRecord",
                StrWhere      = strWhere == null || strWhere == "" ? where1 : where2,
                IntColType    = 0,
                IntOrder      = 0,
                IntPageNum    = int.Parse(currentPage),
                IntPageSize   = pagesize,
                StrColumn     = "titleRecordId",
                StrColumnlist = "*"
            };

            getCurrentPage = int.Parse(currentPage);
            ds             = crossBll.SelectBypage(tabuilder, out count);
        }
Esempio n. 2
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("管理员和教师没有进度条");
            }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TitleRecordBll trbll    = new TitleRecordBll();
            CrossBll       crossBll = new CrossBll();

            teacher = (Teacher)Session["loginuser"];
            string  teaAccount = teacher.TeaAccount;
            DataSet ds         = crossBll.SelectByTea(teaAccount);

            if (ds != null)
            {
                int planId = 0;
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string stuAccount = ds.Tables[0].Rows[i]["stuAccount"].ToString();
                    string account    = Request.QueryString["stuAccount"];
                    if (account == null || account == "")
                    {
                        string op = Request["op"];
                        if (op == "add")
                        {
                            insert();
                        }
                    }
                    else
                    {
                        if (stuAccount == account)
                        {
                            Session["stuAccount"] = stuAccount;
                            stuName           = ds.Tables[0].Rows[i]["realName"].ToString();
                            proName           = ds.Tables[0].Rows[i]["proName"].ToString();
                            title             = ds.Tables[0].Rows[i]["title"].ToString();
                            planId            = Convert.ToInt32(ds.Tables[0].Rows[i]["planId"].ToString());
                            Session["planId"] = planId;
                            break;
                        }
                    }
                }
            }
        }
Esempio n. 4
0
        //获取表格数据
        public void getPage(String strWhere)
        {
            string currentPage = Request.QueryString["currentPage"];

            if (currentPage == null || currentPage.Length <= 0)
            {
                currentPage = "1";
            }

            CrossBll crossBll = new CrossBll();
            Teacher  tea      = (Teacher)Session["loginuser"];

            teaAccount = tea.TeaAccount;
            TitleRecordBll trbll = new TitleRecordBll();
            DataSet        ds    = trbll.GetByAccount(teaAccount);

            if (ds != null)
            {
                int i             = ds.Tables[0].Rows.Count - 1;
                int titleRecoreId = Convert.ToInt32(ds.Tables[0].Rows[i]["titleRecordId"].ToString());
            }
            DataSet      dsTRAll   = trbll.Select();
            string       where1    = "teaAccount = " + teaAccount;
            string       where2    = "teaAccount = " + teaAccount + " and " + strWhere;
            TableBuilder tabuilder = new TableBuilder()
            {
                StrTable      = "V_Cross",
                StrWhere      = strWhere == null || strWhere == "" ? where1 : where2,
                IntColType    = 0,
                IntOrder      = 0,
                IntPageNum    = int.Parse(currentPage),
                IntPageSize   = pagesize,
                StrColumn     = "titleRecordId",
                StrColumnlist = "*"
            };

            getCurrentPage = int.Parse(currentPage);
            dsTR           = crossBll.SelectBypage(tabuilder, out count);
        }
Esempio n. 5
0
        public void insert()
        {
            //获取评定及成绩
            double score         = Convert.ToDouble(Request["score"]);
            string investigation = Request["investigation"];
            string practice      = Request["practice"];
            string solveProblem  = Request["solveProblem"];
            string workAttitude  = Request["workAttitude"];
            string quality       = Request["quality"];
            string evaluate      = Request["evaluate"];
            string innovate      = Request["innovate"];
            string crossTea      = Request["crossTea"];
            //添加评定及成绩
            Student student = new Student();
            Plan    plan    = new Plan();

            try
            {
                student.StuAccount       = stuAccount;
                plan.PlanId              = planId;
                scoreModel.student       = student;
                scoreModel.plan          = plan;
                scoreModel.guideScore    = score;
                scoreModel.investigation = investigation;
                scoreModel.practice      = practice;
                scoreModel.solveProblem  = solveProblem;
                scoreModel.workAttitude  = workAttitude;
                scoreModel.paperDesign   = quality;
                scoreModel.innovate      = innovate;
                scoreModel.evaluate      = evaluate;
                //添加交叉指导教师
                CrossBll    crossBll    = new CrossBll();
                PathBll     pathBll     = new PathBll();
                TitleRecord titleRecord = new TitleRecord();
                Cross       cross       = new Cross();
                Path        path        = new Path();
                Teacher     teacher     = new Teacher();
                titleRecord.TitleRecordId = titleRecordId;
                cross.titleRecord         = titleRecord;
                teacher.TeaAccount        = crossTea;
                cross.teacher             = teacher;

                path.titleRecord = titleRecord;
                path.state       = 3;
                path.type        = 0;
                Result state = pathBll.updateState(path);
                if (state == Result.更新成功)
                {
                    Result recordState = titlebll.updateState(titleRecord.TitleRecordId);
                    if (recordState == Result.更新成功)
                    {
                        Result result = crossBll.Insert(cross);
                        if (result == Result.添加成功)
                        {
                            StudentBll studentBll = new StudentBll();
                            Student    stu        = studentBll.GetModel(stuAccount);
                            TeacherBll teacherBll = new TeacherBll();
                            Teacher    tea        = teacherBll.GetModel(crossTea);
                            LogHelper.Info(this.GetType(), teacher.TeaAccount + " - " + teacher.TeaName + " - 教师指定 - " + stuAccount + " - " + stu.RealName + " - 学生的交叉指导教师 - " + teacher + " - " + tea.TeaName);
                            Result row = sbll.insertInstructorsComments(scoreModel);
                            if (row == Result.添加成功)
                            {
                                LogHelper.Info(this.GetType(), teacher.TeaAccount + " - " + teacher.TeaName + " - 教师添加 - " + stuAccount + " - " + stu.RealName + " - 学生的指导成绩及评定");
                                Response.Write("提交成功");
                                Response.End();
                            }
                            else
                            {
                                Response.Write("提交失败");
                                Response.End();
                            }
                        }
                        else
                        {
                            Response.Write("提交失败");
                            Response.End();
                        }
                    }
                    else
                    {
                        Response.Write("提交失败");
                        Response.End();
                    }
                }
                else
                {
                    Response.Write("提交失败");
                    Response.End();
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(this.GetType(), ex);
            }
        }