public override SqlParameter[] GetParameters() { M_Result model = this; SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.Result; sp[2].Value = model.ResultTime; sp[3].Value = model.ProblemID; sp[4].Value = model.UserID; return(sp); }
public M_Result GetModelFromReader(DbDataReader rdr) { M_Result model = new M_Result(); model.ID = Convert.ToInt32(rdr["ID"]); model.Result = rdr["Result"].ToString(); model.ResultTime = Convert.ToDateTime(rdr["ResultTime"]); model.ProblemID = Convert.ToInt32(rdr["ProblemID"]); model.UserID = Convert.ToInt32(rdr["UserID"]); rdr.Close(); rdr.Dispose(); return(model); }