Examples of Oreda


Examples of com.ordobill.webapp.beans.Oreda

  @SuppressWarnings("unchecked")
  public String getOredaDataXML() throws Exception {
    String xml = "";
    int controlNum = 0;
    int categoryUid = 0; // db 검색 pk 0일경우 전체 검색 0< 경우 단일row 검색
    Oreda _Oreda = new Oreda();
    _Oreda.setCategoryUid(categoryUid);
   
    ArrayList<Oreda> tableList = (ArrayList<Oreda>) sqlMap.queryForList("Oreda.tableList", _Oreda);
   
   
    if (tableList.size()>0) {
View Full Code Here

Examples of com.ordobill.webapp.beans.Oreda

    private SqlMapClient sqlMap = SqlMapClientManager.getSqlMapClient();
   
  @SuppressWarnings("unchecked")
  public ActionForward list(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    Oreda _Oreda = (Oreda)form;
   
    ArrayList<Oreda> tableList = (ArrayList<Oreda>) sqlMap.queryForList("Oreda.tableList", _Oreda);
     
      request.setAttribute("tableList", tableList);
      request.setAttribute("oredaForm", _Oreda);
View Full Code Here

Examples of com.ordobill.webapp.beans.Oreda

  }
 
  @SuppressWarnings("unchecked")
  public ActionForward infoList(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    Oreda _Oreda = (Oreda)form;
    OredaEqipment _OredaEqipment = new OredaEqipment();
     
    ArrayList<Oreda> oredaListInfo = (ArrayList<Oreda>) sqlMap.queryForList("Oreda.listInfo", _Oreda);
    String taxono = "";
    String title_item = "";
        if (oredaListInfo.size()>0) {
          title_item = oredaListInfo.get(0).getTop_item().replace("||", "&nbsp");
        StringTokenizer strT = new StringTokenizer(oredaListInfo.get(0).getTop_taxonomyno() , "||");
          int cnt = strT.countTokens()
          while(strT.hasMoreTokens()){
            String tempStr = strT.nextToken();
            if(!tempStr.equals("") && !tempStr.equals(null)){
              //taxono += (String) sqlMap.queryForObject("Oreda.getUid", Integer.parseInt(tempStr));
              taxono += tempStr+".";
            }
          }
        
      String Top_item = oredaListInfo.get(0).getTop_item().replace("||", "<br>");
     
      oredaListInfo.get(0).setTop_item(Top_item);
        }
       
        String result = "";
        ArrayList<OredaEqipment> oredaListEqipment = new ArrayList<OredaEqipment>();
      if (oredaListInfo.size()>0) {
       
        int cate_uid = oredaListInfo.get(0).getTop_category();
        if (_Oreda.getStep0().equals("TopSide")) {
          result = "listInfoTop";
            oredaListEqipment = (ArrayList<OredaEqipment>)sqlMap.queryForList("Oreda.listTOPEqipment",  cate_uid);
        } else if (_Oreda.getStep0().equals("SubSea")) {
          _OredaEqipment.setCategorytableUid(cate_uid);
          result = "listInfoSub";
          oredaListEqipment = (ArrayList<OredaEqipment>)sqlMap.queryForList("Oreda.listSUBEqipment",  _OredaEqipment);
        }
       
      } else {
        PrintWriter out = response.getWriter();
        out.println("<script language='javascript'>");
        out.println("if(confirm('검색 결과가 없습니다. 등록하시겟습니까?')){");
        out.println("location.href = 'oreda-info.do?method=infoForm&mode=ins&categoryUid="+_Oreda.getCategoryUid()+"';");
        out.println("} else {");
        out.println("location.href = 'oreda-list.do?method=list';");
        out.println("}");
        out.println("</script>");
        out.close();
View Full Code Here

Examples of com.ordobill.webapp.beans.Oreda

  }
 
  @SuppressWarnings("unchecked")
  public ActionForward tableData(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    Oreda _Oreda = (Oreda)form;
    int cateUid = 0;
    String result = "";
   
    ArrayList<Oreda> tableList = (ArrayList<Oreda>) sqlMap.queryForList("Oreda.tableList", _Oreda);
   
    if (tableList.size() == 1) {
      cateUid = tableList.get(0).getCategoryUid();
    } else if (tableList.size() > 1) {
      tableList = new ArrayList<Oreda>();
      tableList.add(new Oreda());
      tableList.get(0).setCateDepth(0);
      tableList.get(0).setCategoryUid(0);
      cateUid = 0;
    }
   
    if (_Oreda.getMode().equals("ins") || _Oreda.getMode().equals("upd")) {
      result = "update";
    } else if (_Oreda.getMode().equals("del")) {
      result = "delete";
    }
   
    ArrayList<Oreda> nodeTableList = (ArrayList<Oreda>) sqlMap.queryForList("Oreda.nodeTableList",cateUid );
    request.setAttribute("oredaForm", _Oreda);
View Full Code Here

Examples of com.ordobill.webapp.beans.Oreda

  }
 
  @SuppressWarnings("unchecked")
  public void tableMultiSQL(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    Oreda _Oreda = (Oreda)form;
   
    ActionMessages msg = new ActionMessages();
        int message = -1;
        String alertMsg = "";
        String returnUrl = "opener.parent.location.href = 'oreda-list.do?method=list';window.close();";
        if (_Oreda.getMode().equals("ins")) {
          sqlMap.insert("Oreda.TableInsert", _Oreda);
          alertMsg = "등록 되었습니다.";
        } else if (_Oreda.getMode().equals("upd")) {//update
          sqlMap.update("Oreda.TableUpdate", _Oreda);
          alertMsg = "수정 되었습니다.";
        } else if (_Oreda.getMode().equals("del")) {
          int cateUid = _Oreda.getCategoryUid();
          if(((ArrayList<Oreda>)sqlMap.queryForList("Oreda.nodeTableList",cateUid)).size()<1){
            alertMsg = "삭제 되었습니다.";
            sqlMap.delete("Oreda.TableDelete", _Oreda);
          } else {
            alertMsg = "삭제 중 오류가 발생 하였습니다.";
View Full Code Here

Examples of com.ordobill.webapp.beans.Oreda

  }
 
  @SuppressWarnings("unchecked")
  public ActionForward infoForm(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    Oreda _Oreda = (Oreda)form;
    ArrayList<Oreda> tableList = (ArrayList<Oreda>) sqlMap.queryForList("Oreda.tableList", _Oreda);
    request.setAttribute("oredaForm", _Oreda);
    request.setAttribute("tableList",tableList );
    return mapping.findForward("ins");
  }
View Full Code Here

Examples of com.ordobill.webapp.beans.Oreda

  }
 
  @SuppressWarnings("unchecked")
  public void infoInsert(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    Oreda _Oreda = (Oreda)form;
    _Oreda.setCateName(_Oreda.getCateName().replace(" ", "||")+"||");
    _Oreda.setCateFullCode(_Oreda.getCateFullCode().replace(".", "||")+"||");
    sqlMap.insert("Oreda.infoInsert", _Oreda);
   
    PrintWriter out = response.getWriter();
      out.println("<script language='javascript'>");
      out.println("location.href='/oreda-info.do?method=infoList&categoryUid="+_Oreda.getCategoryUid()+"&step0="+_Oreda.getStep0()+"';");
      out.println("</script>");
      out.close();
  }
View Full Code Here

Examples of com.ordobill.webapp.beans.Oreda

  }
 
  @SuppressWarnings("unchecked")
  public ActionForward infoUpdate(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    Oreda _Oreda = (Oreda)form;
    sqlMap.update("Oreda.infoUpdate", _Oreda);
    return mapping.findForward("infoUpdate");
  }
View Full Code Here

Examples of com.ordobill.webapp.beans.Oreda

  }
 
  @SuppressWarnings("unchecked")
  public void eqTopDelete(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    Oreda _Oreda = new Oreda();
    OredaEqDB _OredaEqDB = (OredaEqDB)form;
    int eqUid = 0;
    eqUid = _OredaEqDB.getTopsideEqipmentUid2();
    sqlMap.delete("Oreda.topEqDelete", eqUid);
    eqUid = _OredaEqDB.getTopsideEqipmentUid1();
    sqlMap.delete("Oreda.topEqDelete", eqUid);
    sqlMap.delete("Oreda.topEqNodeDelete", eqUid);
   
    sqlMap.update("Oreda.topEqoredernoUpdateMinus", _OredaEqDB);
    _Oreda.setCategoryUid(_OredaEqDB.getCategorytableUid());
    ArrayList<Oreda> oredaListInfo = (ArrayList<Oreda>) sqlMap.queryForList("Oreda.tableList", _Oreda);
   
    String returnUrl = "location.href = 'oreda-info.do?method=infoList&categoryUid="+_OredaEqDB.getCategorytableUid()+"&step0="+oredaListInfo.get(0).getStep0()+"';";
         
      PrintWriter out = response.getWriter();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.