public virtual IEnumerable SynGanttSmartsheetProject(PXAdapter adapter) { this.Base.Actions.PressSave(); PMProject pmProjectRow = this.Base.Project.Current; ProjectEntry projectEntryGraph = PXGraph.CreateInstance <ProjectEntry>(); SmartsheetClient smartsheetClient = CheckTokenSheetSS(projectEntryGraph, pmProjectRow); if (smartsheetClient != null) { PXLongOperation.StartOperation(this.Base, () => { using (PXTransactionScope ts = new PXTransactionScope()) { projectEntryGraph = this.Base; ProjectEntryExt graphExtended = projectEntryGraph.GetExtension <ProjectEntryExt>(); CreateEmployeesAcuUserSS(projectEntryGraph, smartsheetClient); graphExtended.CreateUpdateGanttProject(projectEntryGraph, pmProjectRow, smartsheetClient); ts.Complete(); } }); } return(adapter.Get()); }
public SmartsheetSyncProcess() { Projects.SetProcessCaption("Sync"); Projects.SetProcessAllCaption("Sync All"); Projects.SetProcessDelegate <ProjectEntry>( delegate(ProjectEntry graph, PMProject projectRow) { graph.Clear(); ProjectEntryExt projectEntryExtGraph = graph.GetExtension <ProjectEntryExt>(); SmartsheetClient smartsheetClient = projectEntryExtGraph.CheckTokenSheetSS(graph, projectRow, "", true); projectEntryExtGraph.CreateEmployeesAcuUserSS(graph, smartsheetClient); projectEntryExtGraph.CreateUpdateGanttProject(graph, projectRow, smartsheetClient, true); }); }