Beispiel #1
0
        public override SqlParameter[] GetParameters()
        {
            M_Courseware model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.Courseware;
            sp[2].Value  = model.CoursNum;
            sp[3].Value  = model.Listen;
            sp[4].Value  = model.UpdateTime;
            sp[5].Value  = model.FileUrl;
            sp[6].Value  = model.CourseID;
            sp[7].Value  = model.Speaker;
            sp[8].Value  = model.SJName;
            sp[9].Value  = model.Status;
            sp[10].Value = model.Description;
            sp[11].Value = model.Classification;
            sp[12].Value = model.CoursType;
            sp[13].Value = model.CreationTime;
            return(sp);
        }
Beispiel #2
0
        public M_Courseware GetModelFromReader(DbDataReader rdr)
        {
            M_Courseware model = new M_Courseware();

            model.ID             = ConvertToInt(rdr["ID"]);
            model.Courseware     = ConverToStr(rdr["Courseware"]);
            model.CoursNum       = ConvertToInt(rdr["CoursNum"]);
            model.Listen         = ConvertToInt(rdr["Listen"]);
            model.UpdateTime     = ConvertToDate(rdr["UpdateTime"]);
            model.FileUrl        = ConverToStr(rdr["FileUrl"]);
            model.CourseID       = ConvertToInt(rdr["CourseID"]);
            model.Speaker        = ConverToStr(rdr["Speaker"]);
            model.SJName         = ConverToStr(rdr["SJName"]);
            model.Status         = ConvertToInt(rdr["Status"]);
            model.Description    = ConverToStr(rdr["Description"]);
            model.Classification = ConverToStr(rdr["Classification"]);
            model.CoursType      = ConvertToInt(rdr["CoursType"]);
            model.CreationTime   = ConvertToDate(rdr["CreationTime"]);
            rdr.Close();
            rdr.Dispose();
            return(model);
        }