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

            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.TClsss;
            sp[2].Value = model.TName;
            sp[3].Value = model.Post;
            sp[4].Value = model.Teach;
            sp[5].Value = model.FileUpload;
            sp[6].Value = model.Remark;
            sp[7].Value = model.CreatTime;
            sp[8].Value = model.AddUser;
            return(sp);
        }
Beispiel #2
0
        public M_ExTeacher GetModelFromReader(DbDataReader rdr)
        {
            M_ExTeacher model = new M_ExTeacher();

            model.ID         = Convert.ToInt32(rdr["ID"]);
            model.TClsss     = Convert.ToInt32(rdr["TClsss"]);
            model.TName      = rdr["TName"].ToString();
            model.Post       = rdr["Post"].ToString();
            model.Teach      = rdr["Teach"].ToString();
            model.FileUpload = rdr["FileUpload"].ToString();
            model.Remark     = rdr["Remark"].ToString();
            model.CreatTime  = Convert.ToDateTime(rdr["CreatTime"]);
            model.AddUser    = Convert.ToInt32(rdr["AddUser"]);
            rdr.Close();
            rdr.Dispose();
            return(model);
        }