private void IndexBtn_Click(object sender, EventArgs e) { string fullPath = docPath; string cabinet = XLVirtualCabinet.FileStore(client.manager.office, client.department); string clientStr = client.clientcode + " - " + client.name; XLMain.Staff toBe = (XLMain.Staff)ToBeActionDDL.SelectedItem; string desc = DescTB.Text; string section = ""; if (client.department != "INS") { section = "Correspondence"; } else { section = FileSectionDDL.SelectedItem.ToString(); } //Launch the index process and collect the result XLVirtualCabinet.BondResult outcome = XLVirtualCabinet.IndexDocument(fullPath, cabinet, clientStr, status, toBe.name, section, desc); if (outcome.ExitCode == 0) { XLDocument.EndDocument(); } else { MessageBox.Show("Unable to index document, please index manually. Error code: " + outcome.ExitCode.ToString() + "-" + outcome.StandardOutput.ToString()); } //close the dialog in any event. this.Close(); }
public static void IndexPDFCopy(string filestring, string origFileID) { try { //get the info of the original file XLVirtualCabinet.FileInfo fileInfo = XLVirtualCabinet.FileIndex(origFileID); XLVirtualCabinet.BondResult result = XLVirtualCabinet.IndexDocument(filestring, fileInfo); if (result.ExitCode != 0) { MessageBox.Show("Unable to index pdf, please index manually. Error code: " + result.ExitCode.ToString() + "-" + result.StandardOutput.ToString()); } } catch (Exception e) { MessageBox.Show("Unable to index pdf document" + filestring); XLtools.LogException("IndexPDFCopy", e.ToString()); } }