Package org.compiere.model

Examples of org.compiere.model.MUserQuery


      if (Util.isEmpty(name, true))
      {
        ADialog.warn(m_targetWindowNo, this, "FillMandatory", Msg.translate(Env.getCtx(), "Name"));
        return;
      }
      MUserQuery uq = MUserQuery.get(Env.getCtx(), m_AD_Tab_ID, name);
      if (uq == null && code.length() > 0)
      {       
        uq = new MUserQuery (Env.getCtx(), 0, null);
        uq.setName (name);
        uq.setAD_Tab_ID(m_AD_Tab_ID); //red1 UserQuery [ 1798539 ] taking in new field from Compiere
        uq.setAD_User_ID(Env.getAD_User_ID(Env.getCtx())); //red1 - [ 1798539 ] missing in Compiere delayed source :-)
      }     
      else if (uq != null && code.length() == 0)
      {
        if (uq.delete(true))
        {
          ADialog.info (m_targetWindowNo, this, "Deleted", name);
          refreshUserQueries();
        }
        else
          ADialog.warn (m_targetWindowNo, this, "DeleteError", name);
        return;
      }
      else
        return;
      uq.setCode (code.toString());
      uq.setAD_Table_ID (m_AD_Table_ID);
      //
      if (uq.save())
      {
        ADialog.info (m_targetWindowNo, this, "Saved", name);
        refreshUserQueries();
      }
      else
View Full Code Here

TOP

Related Classes of org.compiere.model.MUserQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.