Exemple #1
0
  public boolean testClosed(DbCnt cnt) throws ISPACException {
    String sql = "WHERE ID_EXP = " + getInt(IDKEY);
    CollectionDAO objlist = new CollectionDAO(TXTramiteDAO.class);
    if (objlist.exist(cnt, sql)) return false;

    sql = "WHERE ID_EXP = " + getInt(IDKEY);
    objlist = new CollectionDAO(TXFaseDAO.class);
    if (objlist.exist(cnt, sql)) return false;

    sql = "WHERE ID_EXP = " + getInt(IDKEY);
    objlist = new CollectionDAO(TXSincNodoDAO.class);
    if (objlist.exist(cnt, sql)) return false;

    return true;
  }
Exemple #2
0
  /**
   * Devuelve cierto si el usuario tiene el permiso
   *
   * @param respList cadena de responsabilidad
   * @param type Tipo de permiso a comprobar 0-->Eliminar expediente (enviar a la papelera)
   *     1->Iniciar expediente
   * @param idpcd Identificador del procedimiento para el que se va a comprobar el permiso
   * @return Cierto si el usuario tiene el permiso, falso en caso contrario
   * @throws ISPACException
   */
  public boolean isPermission(String respList, int type, int idpcd) throws ISPACException {

    if (!respList.equals(Responsible.SUPERVISOR)) {
      String sql =
          "WHERE ID_PCD = "
              + idpcd
              + DBUtil.addAndInResponsibleCondition("UID_USR", respList)
              + " AND PERMISO="
              + type;

      CollectionDAO objlist = new CollectionDAO(PermissionsDAO.class);
      return objlist.exist(mDbCnt, sql);
    }
    return false;
  }