public override SqlParameter[] GetParameters() { M_Plan model = this; SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.PlanName; sp[2].Value = model.PlanRule; sp[3].Value = model.DataSet; sp[4].Value = model.ExecutionTime; sp[5].Value = model.Description; sp[6].Value = model.Step; sp[7].Value = model.CreationTime; return(sp); }
public M_Plan GetModelFromReader(DbDataReader rdr) { M_Plan model = new M_Plan(); model.ID = Convert.ToInt32(rdr["ID"]); model.PlanName = rdr["PlanName"].ToString(); model.PlanRule = rdr["PlanRule"].ToString(); model.DataSet = rdr["DataSet"].ToString(); model.ExecutionTime = Convert.ToDateTime(rdr["ExecutionTime"]); model.Description = rdr["Description"].ToString(); model.Step = rdr["Step"].ToString(); model.CreationTime = Convert.ToDateTime(rdr["CreationTime"]); rdr.Close(); return(model); }