protected bool getPowerByName(string powerName) { RolePowerModel rolePower = new RolePowerModel(); rolePower.RoleID = this.roleInfo.Role.Evenid.ToString(); rolePower.PowerName = powerName; return this.roleInfo.RolePowerList.Contains(rolePower); }
public RolePowerModel getDtlModel(IList<QueryModel> qmlist) { SqlConnection cn = null; RolePowerModel pm = new RolePowerModel(); try { cn = DbHelperSQL.getConnection(); pm = rolePowerDal.getModel(cn, null, qmlist); } catch (SqlException sqlex) { throw new MakeException(ExpSort.数据库, sqlex.Message); } finally { DbHelperSQL.closeConnection(cn); } return pm; }
public bool update(SqlConnection cn, SqlTransaction tc, RolePowerModel model) { return DbHelperSQL.updateModel<RolePowerModel>(model, "RolePower", "Evenid", model.Evenid.ToString(), "'", cn, tc); }