Example #1
0
        /// <summary>
        /// 根据选题记录id获取开题报告对象
        /// </summary>
        /// <param name="titleRecordId"></param>
        /// <returns></returns>
        public OpenReport Select(int titleRecordId)
        {
            DataSet    ds = odao.Select(titleRecordId);
            OpenReport or = new OpenReport();

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                int i = ds.Tables[0].Rows.Count - 1;
                or.openId    = Convert.ToInt32(ds.Tables[0].Rows[i]["ID"].ToString());
                or.meaning   = ds.Tables[0].Rows[i]["meaning"].ToString();
                or.content   = ds.Tables[0].Rows[i]["openContent"].ToString();
                or.method    = ds.Tables[0].Rows[i]["method"].ToString();
                or.outline   = ds.Tables[0].Rows[i]["outline"].ToString();
                or.plan      = ds.Tables[0].Rows[i]["openPlan"].ToString();
                or.reference = ds.Tables[0].Rows[i]["reference"].ToString();
                TitleRecord titleRecord = new TitleRecord();
                titleRecord.TitleRecordId = Convert.ToInt32(ds.Tables[0].Rows[i]["titleRecordId"].ToString());
                or.titleRecord            = titleRecord;
                or.reportTime             = Convert.ToDateTime(ds.Tables[0].Rows[i]["reportTime"].ToString());
                or.trend          = ds.Tables[0].Rows[i]["trend"].ToString();
                or.teacherOpinion = ds.Tables[0].Rows[i]["teacherOpinion"].ToString();
                or.deanOpinion    = ds.Tables[0].Rows[i]["deanOpinion"].ToString();
                or.state          = Convert.ToInt32(ds.Tables[0].Rows[i]["state"]);
                return(or);
            }
            else
            {
                return(null);
            }
        }
Example #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("管理员和教师没有进度条");
            }
        }
Example #3
0
        public void PrintOpenBox(Turno t)
        {
            OpenReport invoiceReportPOS = new OpenReport();

            invoiceReportPOS.initDate(t);
            // documentViewer1.DocumentSource = invoiceReportPOS; // Para Preview
            // autoPrintDocument(invoiceReportPOS);
            autoPrintDocument(invoiceReportPOS);
        }
Example #4
0
        /// <summary>
        /// 学生提交开题报告
        /// </summary>
        /// <param name="report">开题报告对象</param>
        /// <returns>成功返回Result.添加成功,失败返回Result.添加失败</returns>
        public Result stuInsert(OpenReport report)
        {
            int row = odao.stuInsert(report);

            if (row > 0)
            {
                return(Result.添加成功);
            }
            return(Result.添加失败);
        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Student        student        = (Student)Session["loginuser"];
            string         stuAccount     = student.StuAccount;
            TitleRecordBll titleRecordBll = new TitleRecordBll();
            PathBll        pathBll        = new PathBll();
            TitleRecord    titleRecord    = titleRecordBll.getRtId(stuAccount);
            int            titleRecordId  = titleRecord.TitleRecordId;
            OpenReport     openReport     = titleRecordBll.getState(titleRecordId);
            Path           path           = pathBll.getState(titleRecordId, 0);

            openState = openReport.state;
            state     = path.state;
        }
Example #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TitleRecordBll trbll = new TitleRecordBll();

            student    = (Student)Session["loginuser"];
            stuAccount = student.StuAccount;
            stuName    = student.RealName;
            profession = student.profession.ProName;
            dsTR       = trbll.GetByAccount(stuAccount);
            if (dsTR == null)
            {
                opinion = "暂未选题";
            }
            else
            {
                for (int i = 0; i < dsTR.Tables[0].Rows.Count; i++)
                {
                    string stuaccount = dsTR.Tables[0].Rows[i]["stuAccount"].ToString();
                    if (stuaccount == stuAccount)
                    {
                        title         = dsTR.Tables[0].Rows[0]["title"].ToString();
                        teaName       = dsTR.Tables[0].Rows[0]["teaName"].ToString();
                        planId        = Convert.ToInt32(dsTR.Tables[0].Rows[0]["planId"].ToString());
                        titleRecordId = Convert.ToInt32(dsTR.Tables[0].Rows[0]["titleRecordId"].ToString());
                        break;
                    }
                }
                OpenReport openReport = trbll.getState(titleRecordId);
                state = openReport.state;
                or    = orbll.Select(titleRecordId);
                open  = orbll.Select(titleRecordId);
                if (open == null)
                {
                    opinion = "教师未回复,请耐心等待";
                }
                else
                {
                    opinion     = open.teacherOpinion;
                    deanOpinion = open.deanOpinion;
                }
            }

            Result result = orbll.isOpenReport(stuAccount, planId);

            if (result == Result.记录存在)
            {
                insert();
            }
        }
Example #7
0
 /// <summary>
 /// 学生提交开题报告
 /// </summary>
 /// <param name="openReport">开题报告实体</param>
 /// <returns>返回受影响行数</returns>
 public int stuInsert(OpenReport openReport)
 {
     try
     {
         string   cmdText = "insert into T_OpeningReport(titleRecordId,meaning,trend,openContent,openPlan,method,outline,reference,reportTime) values(@titleRecordId, @meaning, @trend, @content, @plan, @method, @outline, @reference, @reportTime)";
         string[] param   = { "@titleRecordId", "@meaning", "@trend", "@content", "@plan", "@method", "@outline", "@reference", "@reportTime" };
         object[] values  = { openReport.titleRecord.TitleRecordId, openReport.meaning, openReport.trend, openReport.content, openReport.plan, openReport.method, openReport.outline, openReport.reference, openReport.reportTime };
         int      row     = db.ExecuteNoneQuery(cmdText.ToString(), param, values);
         return(row);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #8
0
        /// <summary>
        /// 获取开题报告的state
        /// </summary>
        /// <param name="titleRecordId">选题记录id</param>
        /// <returns></returns>
        public OpenReport getState(int titleRecordId)
        {
            string sql = "select top 1 state from T_OpeningReport where titleRecordId=@titleRecordId order by ID desc";

            string[]      param      = { "@titleRecordId" };
            object[]      values     = { titleRecordId };
            OpenReport    openReport = new OpenReport();
            SqlDataReader reader     = db.ExecuteReader(sql, param, values);

            while (reader.Read())
            {
                openReport.state = reader.GetInt32(0);
            }
            reader.Close();
            return(openReport);
        }
Example #9
0
 //添加开题报告
 private void insert()
 {
     try
     {
         string op = Context.Request["op"];
         if (op == "add")
         {
             string      meaning     = Request["meaning"];
             string      trend       = Request["trend"];
             string      content     = Request["content"];
             string      plan        = Request["plan"];
             string      method      = Request["method"];
             string      outline     = Request["outline"];
             string      reference   = Request["reference"];
             OpenReport  open        = new OpenReport();
             TitleRecord titleRecord = new TitleRecord();
             titleRecord.TitleRecordId = titleRecordId;
             open.titleRecord          = titleRecord;
             open.meaning    = meaning;
             open.trend      = trend;
             open.content    = content;
             open.plan       = plan;
             open.method     = method;
             open.outline    = outline;
             open.reference  = reference;
             open.reportTime = DateTime.Now;
             Result row    = orbll.stuInsert(open);
             Result result = orbll.updateState(2, titleRecordId);
             if (row == Result.添加成功 && result == Result.更新成功)
             {
                 LogHelper.Info(this.GetType(), student.StuAccount + " - " + student.RealName + " - 添加开题报告");
                 Response.Write("提交成功");
                 Response.End();
             }
             else
             {
                 Response.Write("提交失败");
                 Response.End();
             }
         }
     }
     catch (Exception ex)
     {
         LogHelper.Error(this.GetType(), ex);
     }
 }
Example #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TitleRecordBll trbll         = new TitleRecordBll();
            OpenReportBll  orbll         = new OpenReportBll();
            Teacher        teacher       = (Teacher)Session["loginuser"];
            string         teaAccount    = teacher.TeaAccount;
            DataSet        ds            = trbll.GetByAccount(teaAccount);
            int            titleRecordId = 0;
            string         account       = Request.QueryString["stuAccount"];

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string stuaccount = ds.Tables[0].Rows[i]["stuAccount"].ToString();
                if (stuaccount == account)
                {
                    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();
                    titleRecordId = Convert.ToInt32(ds.Tables[0].Rows[i]["titleRecordId"].ToString());
                    break;
                }
            }
            or      = orbll.Select(titleRecordId);
            teaName = teacher.TeaName;
            string op             = Request["op"];
            string teacherOpinion = Request["teacherOpinion"];
            string deanOpinion    = Request["deanOpinion"];

            try
            {
                if (op == "no")
                {
                    int    openId = or.openId;
                    Result row    = orbll.teaInsert(openId, teacherOpinion);
                    Result state  = orbll.updateState(1, titleRecordId);
                    if (deanOpinion != "")
                    {
                        Result dean = orbll.deanInsert(openId, teacherOpinion);
                        if (row == Result.添加成功 && dean == Result.添加成功)
                        {
                            LogHelper.Info(this.GetType(), teacher.TeaAccount + " - " + teacher.TeaName + " - 教师不同意并回复 - " + stuAccount + " - " + stuName + " - 学生的开题报告");
                            Response.Write("提交成功");
                            Response.End();
                        }
                        else
                        {
                            Response.Write("提交失败");
                            Response.End();
                        }
                    }
                    if (row == Result.添加成功)
                    {
                        LogHelper.Info(this.GetType(), teacher.TeaAccount + " - " + teacher.TeaName + " - 教师不同意并回复 - " + stuAccount + " - " + stuName + " - 学生的开题报告");
                        Response.Write("提交成功");
                        Response.End();
                    }
                    else
                    {
                        Response.Write("提交失败");
                        Response.End();
                    }
                }
                else if (op == "yes")
                {
                    int    openId = or.openId;
                    Result row    = orbll.teaInsert(openId, teacherOpinion);
                    Result state  = orbll.updateState(3, titleRecordId);
                    if (deanOpinion != "")
                    {
                        Result dean = orbll.deanInsert(openId, teacherOpinion);
                        if (row == Result.添加成功 && dean == Result.添加成功 && state == Result.更新成功)
                        {
                            LogHelper.Info(this.GetType(), teacher.TeaAccount + " - " + teacher.TeaName + " - 教师同意并回复 - " + stuAccount + " - " + stuName + " - 学生的开题报告");
                            Response.Write("提交成功");
                            Response.End();
                        }
                        else
                        {
                            Response.Write("提交失败");
                            Response.End();
                        }
                    }
                    if (row == Result.添加成功 && state == Result.更新成功)
                    {
                        LogHelper.Info(this.GetType(), teacher.TeaAccount + " - " + teacher.TeaName + " - 教师同意并回复 - " + stuAccount + " - " + stuName + " - 学生的开题报告");
                        Response.Write("提交成功");
                        Response.End();
                    }
                    else
                    {
                        Response.Write("提交失败");
                        Response.End();
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(this.GetType(), ex);
            }
        }