public M_Permission GetModelFromReader(DbDataReader rdr) { M_Permission model = new M_Permission(); model.ID = Convert.ToInt32(rdr["ID"]); model.RoleName = ConverToStr(rdr["RoleName"]); model.RoleImg = ConverToStr(rdr["RoleImg"]); model.Info = ConverToStr(rdr["Info"]); model.Perlist = ConverToStr(rdr["Perlist"]); model.UserGroup = ConverToStr(rdr["UserGroup"]); model.Precedence = ConvertToInt(rdr["Precedence"]); model.IsTrue = ConverToBool(rdr["IsTrue"]); model.Auth_OA = ConverToStr(rdr["Auth_OA"]); rdr.Close(); return(model); }
public override SqlParameter[] GetParameters() { M_Permission model = this; SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.RoleName; sp[2].Value = model.RoleImg; sp[3].Value = model.Info; sp[4].Value = model.Perlist; sp[5].Value = model.UserGroup; sp[6].Value = model.Precedence; sp[7].Value = model.IsTrue; sp[8].Value = model.Auth_OA; return(sp); }