コード例 #1
0
ファイル: MenusPage.java プロジェクト: afiantara/erp
 public void getMenus(String menu) {
   Object[] params = new Object[] {menu};
   Class[] retTypes = new Class[] {sf.file.Menus.class};
   try {
     String method = "getMenus";
     if (menu != null && !menu.equals("")) method = "getMenuByName";
     Object[] response = _service.callServiceAccounting(method, params, retTypes);
     sf.file.Menus item = (sf.file.Menus) response[0];
     if (item == null) return;
     if (item.getMenus() == null) return;
     int count = item.getMenus().length;
     list = new ArrayList<Menus>();
     for (int i = 0; i < count; i++) {
       sf.file.Menus prheader = item.getMenus()[i];
       if (prheader == null) continue;
       Menus _prheader = new Menus();
       _prheader.setNo(i + 1);
       _prheader.setMenuname(prheader.getMenuname());
       _prheader.setRecstatus(prheader.getRecstatus());
       if (null != _prheader) {
         list.add(_prheader);
       }
     }
   } catch (AxisFault e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
コード例 #2
0
 public void getPRHeaderequest(int idx) {
   Object[] params = null;
   params = new Object[] {"", "", 0};
   Class[] retTypes = new Class[] {sf.purchasing.PRHeader.class};
   try {
     Object[] response = _service.callServicePurchasing("getPrequisitionHeader", params, retTypes);
     sf.purchasing.PRHeader item = (sf.purchasing.PRHeader) response[0];
     if (item == null) return;
     if (item.getHeaders() == null) return;
     int count = item.getHeaders().length;
     search = new String[count];
     maps1.clear();
     for (int i = 0; i < count; i++) {
       sf.purchasing.PRHeader prheader = item.getHeaders()[i];
       if (idx == 0) {
         if (!maps1.containsKey(prheader.getNobukti())) {
           maps1.put(prheader.getNobukti(), prheader);
           search[i] = prheader.getNobukti();
         }
       } else if (idx == 1) {
         if (!maps1.containsKey(prheader.getTglbukti())) {
           maps1.put(prheader.getTglbukti(), prheader);
           search[i] = prheader.getTglbukti();
         }
       } else if (idx == 2) {
         String bulan = prheader.getTglbukti().substring(4, 6);
         if (!maps1.containsKey(bulan)) {
           maps1.put(bulan, prheader);
           search[i] = bulan;
         }
       } else if (idx == 3) {
         if (!maps1.containsKey(prheader.getUserinput())) {
           maps1.put(prheader.getUserinput(), prheader);
           search[i] = prheader.getUserinput();
         }
       }
     }
   } catch (AxisFault e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }