private void OnCustomCommandsPanelRequested2(object sender, PowerDOCFormReferenceEventArgs e) { var currentRow = _PowerDoc.GetRecordById(e.IdData); var percorso = currentRow.Field <string>("percorso"); var machine = currentRow.Field <string>("macut"); ToolList(percorso, machine); }
private void OnCustomCommandsPanelRequested(object sender, PowerDOCFormReferenceEventArgs e) { var currentRow = this._PowerDoc.GetRecordById(e.IdData); //Verifico che la condizione sia soddisfatta var macchina = currentRow.Field <string>("Macut"); var percorso = currentRow.Field <string>("Percorso"); var codice = currentRow.Field <string>("Codice"); const string target = @"C:\Cnc\Backup"; var fileName = Path.GetFileName(percorso); if (fileName != null) { File.Copy(percorso, Path.Combine(target, macchina, fileName)); } }