public void addWordProcessing(String vistaFile, String vistaField, String iens, String wpText) { DdrWpFiler request = buildAddWpRequest(vistaFile, vistaField, iens, wpText); String response = request.execute(); toCreateUpdateDeleteRecordResponse(response); }
internal DdrWpFiler buildAddWpRequest(String vistaFile, String field, String iens, String wpText) { String[] lines = StringUtils.split(wpText, StringUtils.CRLF); DdrWpFiler ddr = new DdrWpFiler(_cxn); ddr.Operation = "EDIT"; // both "ADD" and "EDIT" seem to work just fine ddr.Params = new DictionaryHashList(); if (field.Contains("WP")) // if this was called from create or update, it probably contains "WP" to denote this as a special field so we should remove that { field = field.Replace("WP", ""); } ddr.Params.Add("1", vistaFile + "^" + field + "^" + iens + "^DDRROOT(1)"); // taken from FileMan Delphi Components pascal code for (int i = 0; i < lines.Length; i++) { ddr.Params.Add("1," + (i + 1).ToString(), lines[i]); // taken from FileMan Delphi Components pascal code - 1,3=my first line } return(ddr); }