public M_ExLecturer GetModelFromReader(DbDataReader rdr) { M_ExLecturer model = new M_ExLecturer(); model.ID = Convert.ToInt32(rdr["ID"]); model.TechName = rdr["TechName"].ToString(); model.TechType = rdr["TechType"].ToString(); model.TechSex = Convert.ToInt32(rdr["TechSex"]); model.TechTitle = rdr["TechTitle"].ToString(); model.TechPhone = rdr["TechPhone"].ToString(); model.CreateTime = Convert.ToDateTime(rdr["CreateTime"]); model.TechSpecialty = rdr["TechSpecialty"].ToString(); model.TechHobby = rdr["TechHobby"].ToString(); model.TechIntrodu = rdr["TechIntrodu"].ToString(); model.TechLevel = rdr["TechLevel"].ToString(); model.TechDepart = Convert.ToInt32(rdr["TechDepart"]); model.TechClass = Convert.ToInt32(rdr["TechClass"]); model.TechRecom = Convert.ToInt32(rdr["TechRecom"]); model.Popularity = Convert.ToInt32(rdr["Popularity"]); model.Awardsinfo = rdr["Awardsinfo"].ToString(); model.FileUpload = rdr["FileUpload"].ToString(); model.AddUser = Convert.ToInt32(rdr["AddUser"]); model.Professional = Convert.ToInt32(rdr["Professional"]); rdr.Close(); rdr.Dispose(); return(model); }
public override SqlParameter[] GetParameters() { M_ExLecturer model = this; SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.TechName; sp[2].Value = model.TechType; sp[3].Value = model.TechSex; sp[4].Value = model.TechTitle; sp[5].Value = model.TechPhone; sp[6].Value = model.CreateTime; sp[7].Value = model.TechSpecialty; sp[8].Value = model.TechHobby; sp[9].Value = model.TechIntrodu; sp[10].Value = model.TechLevel; sp[11].Value = model.TechDepart; sp[12].Value = model.TechClass; sp[13].Value = model.TechRecom; sp[14].Value = model.Popularity; sp[15].Value = model.Awardsinfo; sp[16].Value = model.FileUpload; sp[17].Value = model.AddUser; sp[18].Value = model.Professional; return(sp); }