コード例 #1
0
 private void getCustomerAssignmentsAfterUpdate() {
   YRCApiContext apiCtx = new YRCApiContext();
   String[] apinames = {"getXPEDXMyItemsListDetail"};
   Document[] docInput = {
     YRCXmlUtils.createFromString("<XPEDXMyItemsList MyItemsListKey='" + strMILKey + "'/>")
   };
   apiCtx.setApiNames(apinames);
   apiCtx.setInputXmls(docInput);
   apiCtx.setUserData("isCustomerListQueried", true);
   apiCtx.setFormId(getFormId());
   callApi(apiCtx);
 }
コード例 #2
0
 public void initPage() {
   YRCApiContext apiCtx = new YRCApiContext();
   if (!YRCPlatformUI.isVoid(strMILCustomerID)) {
     String[] apinames = {"getListOfXPEDXMyItemsLists", "getCustomerList"};
     Document[] docInput = {
       YRCXmlUtils.createFromString("<XPEDXMyItemsList MyItemsListKey='" + strMILKey + "'/>"),
       YRCXmlUtils.createFromString("<Customer CustomerID='" + strMILCustomerID + "' />")
     };
     apiCtx.setApiNames(apinames);
     apiCtx.setInputXmls(docInput);
     apiCtx.setUserData("isCustomerListQueried", true);
   } else {
     String[] apinames = {"getXPEDXMyItemsListDetail"};
     Document[] docInput = {
       YRCXmlUtils.createFromString("<XPEDXMyItemsList MyItemsListKey='" + strMILKey + "'/>")
     };
     apiCtx.setApiNames(apinames);
     apiCtx.setInputXmls(docInput);
     apiCtx.setUserData("isCustomerListQueried", false);
   }
   apiCtx.setFormId(getFormId());
   callApi(apiCtx);
 }
コード例 #3
0
  public void updateMyitemsList() {
    if (updateAssignFlag && !YRCPlatformUI.isVoid(strMILKey)) {
      Element eleUpdateMyItemsListData = getModel("XPEDXMyItemsList");
      eleUpdateMyItemsListData.setAttribute("MyItemsListKey", strMILKey);
      NodeList nlItems = eleUpdateMyItemsListData.getElementsByTagName("XPEDXMyItemsItems");
      for (int i = 0; i < nlItems.getLength(); i++) {
        Element eleItemData = (Element) nlItems.item(i);
        if (!(eleItemData.hasAttribute(IS_MODIFIED))) {
          eleItemData.getParentNode().removeChild(eleItemData);
          i--;
        }
      }
      YRCApiContext ctx = new YRCApiContext();
      ctx.setApiNames(new String[] {"updateXPEDXMyItemsList"});
      Document[] docInput = {createUpdateXPEDXMyItemsListInput(eleUpdateMyItemsListData)};
      ctx.setInputXmls(docInput);
      ctx.setFormId(getFormId());

      callApi(ctx, page);
      ((XPXManageMyItemsListEditor) YRCDesktopUI.getCurrentPart()).showBusy(true);
    }
  }