Ejemplo n.º 1
0
        public override SqlParameter[] GetParameters()
        {
            M_ScoreStatics model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.CourseID;
            sp[2].Value  = model.PID;
            sp[3].Value  = model.UserID;
            sp[4].Value  = model.Fraction;
            sp[5].Value  = model.ExamTime;
            sp[6].Value  = model.ErrorID;
            sp[7].Value  = model.QuestionIDs;
            sp[8].Value  = model.Answer;
            sp[9].Value  = model.ProfileScore;
            sp[10].Value = model.GraderWill;
            return(sp);
        }
Ejemplo n.º 2
0
        public M_ScoreStatics GetModelFromReader(DbDataReader rdr)
        {
            M_ScoreStatics model = new M_ScoreStatics();

            model.ID           = Convert.ToInt32(rdr["ID"]);
            model.CourseID     = Convert.ToInt32(rdr["CourseID"]);
            model.PID          = Convert.ToInt32(rdr["PID"]);
            model.UserID       = Convert.ToInt32(rdr["UserID"]);
            model.Fraction     = Convert.ToInt64(rdr["Fraction"]);
            model.ExamTime     = Convert.ToDateTime(rdr["ExamTime"]);
            model.ErrorID      = Convert.ToInt32(rdr["ErrorID"]);
            model.QuestionIDs  = rdr["QuestionIDs"].ToString();
            model.Answer       = rdr["Answer"].ToString();
            model.ProfileScore = Convert.ToInt64(rdr["ProfileScore"]);
            model.GraderWill   = rdr["GraderWill"].ToString();
            rdr.Close();
            rdr.Dispose();
            return(model);
        }