Пример #1
0
 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);
 }
Пример #2
0
 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;
 }
Пример #3
0
 public bool update(SqlConnection cn, SqlTransaction tc, RolePowerModel model)
 {
     return DbHelperSQL.updateModel<RolePowerModel>(model, "RolePower", "Evenid", model.Evenid.ToString(), "'", cn, tc);
 }