Web/Model/ExaminationPaperExtend.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Maticsoft.DBUtility;
using System.Web.UI.WebControls;
using System.Collections.Generic;//Please add references

namespace StudentExamination.Model
{
    //扩展EvaluateRecord类,增加自定义的方法

    public partial class ExaminationPaper
    {
        /// <summary>
        /// 获得考卷信息
        /// </summary>
        public void LoadBySubject(string SubjectID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select top 1 * from dbo.ExaminationPaper where IsUsed = 1  ");
            strSql.AppendFormat(" and subjectID = {0} order by CreateDate Desc ", SubjectID);
           
            DataSet ds =  DbHelperSQL.Query(strSql.ToString());
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["PaperID"] != null && ds.Tables[0].Rows[0]["PaperID"].ToString() != "")
                {
                    this.PaperID = int.Parse(ds.Tables[0].Rows[0]["PaperID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["PaperName"] != null && ds.Tables[0].Rows[0]["PaperName"].ToString() != "")
                {
                    this.PaperName = ds.Tables[0].Rows[0]["PaperName"].ToString();
                }
                if (ds.Tables[0].Rows[0]["SubjectID"] != null && ds.Tables[0].Rows[0]["SubjectID"].ToString() != "")
                {
                    this.SubjectID = int.Parse(ds.Tables[0].Rows[0]["SubjectID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["IsUsed"] != null && ds.Tables[0].Rows[0]["IsUsed"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["IsUsed"].ToString() == "1") || (ds.Tables[0].Rows[0]["IsUsed"].ToString().ToLower() == "true"))
                    {
                        this.IsUsed = true;
                    }
                    else
                    {
                        this.IsUsed = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["CreateDate"] != null && ds.Tables[0].Rows[0]["CreateDate"].ToString() != "")
                {
                    this.CreateDate = DateTime.Parse(ds.Tables[0].Rows[0]["CreateDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["CreateUser"] != null && ds.Tables[0].Rows[0]["CreateUser"].ToString() != "")
                {
                    this.CreateUser = ds.Tables[0].Rows[0]["CreateUser"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ExamineTime"] != null && ds.Tables[0].Rows[0]["ExamineTime"].ToString() != "")
                {
                    this.ExamineTime = int.Parse(ds.Tables[0].Rows[0]["ExamineTime"].ToString());
后面还有 55 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。