public override SqlParameter[] GetParameters() { M_NodeRole model = this; SqlParameter[] sp = GetSP(); sp[0].Value = model.RN_ID; sp[1].Value = model.RID; sp[2].Value = model.NID; sp[3].Value = model.look; sp[4].Value = model.Modify; sp[5].Value = model.State; sp[6].Value = model.addTo; sp[7].Value = model.Columns; sp[8].Value = model.Comments; sp[9].Value = model.pNid; return(sp); }
public M_NodeRole GetModelFromReader(DbDataReader rdr) { M_NodeRole model = new M_NodeRole(); model.RN_ID = Convert.ToInt32(rdr["RN_ID"]); model.RID = Convert.ToInt32(rdr["RID"]); model.NID = Convert.ToInt32(rdr["NID"]); model.look = Convert.ToInt32(rdr["look"]); model.Modify = Convert.ToInt32(rdr["Modify"]); model.State = Convert.ToInt32(rdr["State"]); model.addTo = Convert.ToInt32(rdr["addTo"]); model.Columns = Convert.ToInt32(rdr["Columns"]); model.Comments = Convert.ToInt32(rdr["Comments"]); model.pNid = Convert.ToInt32(rdr["PNid"]); rdr.Close(); rdr.Dispose(); return(model); }