private JSONObject GetQueryBomJSON(string materialNumber, string FF100003, string FUseOrgNumber)
{
JSONObject json = new JSONObject();
json.Add("FormId", "ENG_BOM");
json.Add("FieldKeys", "FID,FNUMBER");
JSONArray FilterString = new JSONArray();
JSONObject bomParameter_material = new JSONObject();
bomParameter_material.Add("Left", "(");
bomParameter_material.Add("FieldName", "FMATERIALID.FNUMBER");
bomParameter_material.Add("Compare", "=");
bomParameter_material.Add("Value", materialNumber);
bomParameter_material.Add("Right", ")");
bomParameter_material.Add("Logic", "AND");
FilterString.Add(bomParameter_material);
JSONObject bomParameter_FF100003 = new JSONObject();
bomParameter_FF100003.Add("Left", "(");
bomParameter_FF100003.Add("FieldName", "FParentAuxPropId.FF100003.FNumber");
bomParameter_FF100003.Add("Compare", "=");
bomParameter_FF100003.Add("Value", FF100003);
bomParameter_FF100003.Add("Right", ")");
bomParameter_FF100003.Add("Logic", "AND");
FilterString.Add(bomParameter_FF100003);
JSONObject bomParameter_FUseOrgNumber = new JSONObject();
bomParameter_FUseOrgNumber.Add("Left", "(");
bomParameter_FUseOrgNumber.Add("FieldName", "FUseOrgId.FNUMBER");
bomParameter_FUseOrgNumber.Add("Compare", "=");
bomParameter_FUseOrgNumber.Add("Value", FUseOrgNumber);
bomParameter_FUseOrgNumber.Add("Right", ")");
bomParameter_FUseOrgNumber.Add("Logic", "AND");
FilterString.Add(bomParameter_FUseOrgNumber);
JSONObject bomParameter_FDocumentStatus = new JSONObject();
bomParameter_FDocumentStatus.Add("Left", "(");
bomParameter_FDocumentStatus.Add("FieldName", "FDocumentStatus");
bomParameter_FDocumentStatus.Add("Compare", "=");
bomParameter_FDocumentStatus.Add("Value", "C");
bomParameter_FDocumentStatus.Add("Right", ")");
bomParameter_FDocumentStatus.Add("Logic", "AND");
FilterString.Add(bomParameter_FDocumentStatus);
JSONObject bomParameter_FForbidStatus = new JSONObject();
bomParameter_FForbidStatus.Add("Left", "(");
bomParameter_FForbidStatus.Add("FieldName", "FForbidStatus");
bomParameter_FForbidStatus.Add("Compare", "=");
bomParameter_FForbidStatus.Add("Value", "A");
bomParameter_FForbidStatus.Add("Right", ")");
bomParameter_FForbidStatus.Add("Logic", "");
FilterString.Add(bomParameter_FForbidStatus);
json.Add("FilterString", FilterString);
return json;
}
JSONObject queryBomParameter = this.GetQueryBomJSON(Convert.ToString(MATERIALID["Number"]), F100003_FNumber, Convert.ToString(StockOrgId["Number"]));
WebApiServiceCall.BillQuery(this.Context, JsonConvert.SerializeObject(queryBomParameter));