public UsersProcess() { OurUsers.SetProcessAllCaption("Process users"); OurUsers.SetProcessCaption("Process user"); OurUsers.SetProcessDelegate <UsersProcess>(ProcessItem, FinallyProcess); OurUsers.SetProcessDelegate( delegate(UsersProcess graph, Users user) { graph.BlobSettings.Select(); }, delegate(UsersProcess graph) { graph.BlobSettings.Select(); } ); OurUsers.SetProcessDelegate( (UsersProcess graph, Users user) => { graph.Cancel.Press(); }, (UsersProcess graph) => { graph.Cancel.Press(); }); OurUsers.SetProcessDelegate( (UsersProcess graph, Users user) => graph.OurUsers.Select().Clear(), (UsersProcess graph) => graph.OurUsers.Select().Clear()); }
public UsersProcess() { OurUsers.SetProcessAllCaption("Process users"); OurUsers.SetProcessCaption("Process user"); OurUsers.SetProcessDelegate(ProcessItem, FinallyProcess); OurUsers.SetProcessDelegate( delegate(UsersProcess graph, Users user) { graph.AllUsers.Update(user); graph.Persist(); }, delegate(UsersProcess graph) { graph.AllUsers.Select().Clear(); } ); OurUsers.SetProcessDelegate( (UsersProcess graph, Users user) => { graph.AllUsers.Update(user); graph.Persist(); }, (UsersProcess graph) => { graph.AllUsers.Select().Clear(); }); OurUsers.SetProcessDelegate( (UsersProcess graph, Users user) => graph.AllUsers.Select().Clear(), (UsersProcess graph) => graph.AllUsers.Select().Clear()); }
public UsersProcess() { OurUsers.SetProcessAllCaption("Process users"); OurUsers.SetProcessCaption("Process user"); OurUsers.SetProcessDelegate <UsersProcess>(ProcessItem, FinallyProcess); OurUsers.SetProcessDelegate( delegate(UsersProcess graph, Users user) { throw new PXSetupNotEnteredException <Users>(null); }, delegate(UsersProcess graph) { throw new PXSetupNotEnteredException <Users>(null); } ); OurUsers.SetProcessDelegate( (UsersProcess graph, Users user) => { throw new PXSetupNotEnteredException <Users>(null); }, (UsersProcess graph) => { throw new PXSetupNotEnteredException <Users>(null); }); OurUsers.SetProcessDelegate( (UsersProcess graph, Users user) => throw new PXSetupNotEnteredException <Users>(null), (UsersProcess graph) => throw new PXSetupNotEnteredException <Users>(null)); }
public UsersProcess() { OurUsers.SetProcessAllCaption("Process users"); OurUsers.SetProcessCaption("Process user"); OurUsers.SetProcessDelegate <UsersProcess>(ProcessItem, FinallyProcess); OurUsers.SetProcessDelegate( delegate(UsersProcess processingGraph, Users user) { processingGraph.AllUsers.Update(user); processingGraph.Persist(); var entryGraph = PXGraph.CreateInstance <UserEntry>(); var badCurrent = processingGraph.AllUsers.Current; var goodCurrent = entryGraph.AllUsers.Current; }, delegate(UsersProcess graph) { graph.AllUsers.Select().Clear(); } ); OurUsers.SetProcessDelegate( (UsersProcess graph, Users user) => { graph.AllUsers.Update(user); graph.Persist(); }, (UsersProcess graph) => { graph.AllUsers.Select().Clear(); }); OurUsers.SetProcessDelegate( (UsersProcess graph, Users user) => graph.AllUsers.Select().Clear(), (UsersProcess graph) => graph.AllUsers.Select().Clear()); }
public UsersProcess() { OurUsers.SetProcessAllCaption("Process users"); OurUsers.SetProcessCaption("Process user"); OurUsers.SetProcessDelegate(ProcessItem); OurUsers.SetProcessDelegate(delegate(Users user) { var processingGraph = PXGraph.CreateInstance <UsersProcess>(); processingGraph.BlobSettings.Select(); }); OurUsers.SetProcessDelegate(user => { var processingGraph = PXGraph.CreateInstance <UsersProcess>(); processingGraph.Cancel.Press(); }); OurUsers.SetProcessDelegate((Users user) => PXGraph.CreateInstance <UsersProcess>().OurUsers.Select().Clear()); OurUsers.SetProcessDelegate(ProcessItemList); OurUsers.SetProcessDelegate(delegate(List <Users> userList) { var processingGraph = PXGraph.CreateInstance <UsersProcess>(); processingGraph.BlobSettings.Select(); }); OurUsers.SetProcessDelegate(userList => { var processingGraph = PXGraph.CreateInstance <UsersProcess>(); processingGraph.Cancel.Press(); }); OurUsers.SetProcessDelegate((List <Users> userList) => PXGraph.CreateInstance <UsersProcess>().OurUsers.Select().Clear()); }
public SOOrderMaint() { PXButtonDelegate actionHandlerSimple = adapter => { MethodWhichInitializeAnotherGraph(adapter); return(adapter.Get()); }; Actions.Add("ActionSimple", new PXNamedAction <SOOrder>(this, "ActionSimple", actionHandlerSimple)); PXButtonDelegate actionHandlerParenthesized = (adapter) => { MethodWhichInitializeAnotherGraph(adapter); return(adapter.Get()); }; Actions.Add("ActionParenthesized", new PXNamedAction <SOOrder>(this, "ActionParenthesized", actionHandlerSimple)); PXButtonDelegate actionHandlerDelegate = delegate(PXAdapter adapter) { MethodWhichInitializeAnotherGraph(adapter); return(adapter.Get()); }; Actions.Add("ActionDelegate", new PXNamedAction <SOOrder>(this, "ActionDelegate", actionHandlerDelegate)); // Simple case with no recursive code analysis involved Orders.SetProcessDelegate(list => { var graph = PXGraph.CreateInstance <SOOrderMaint>(); }); }
public DeleteDocsProcess() { Docs.SetProcessCaption(Messages.DeleteProc); Docs.SetProcessAllCaption(Messages.DeleteAllProc); Docs.SetProcessDelegate(delegate(List <FARegister> list) { bool failed = false; TransactionEntry entryGraph = CreateInstance <TransactionEntry>(); foreach (FARegister register in list) { PXProcessing.SetCurrentItem(register); try { entryGraph.Clear(); entryGraph.Document.Current = entryGraph.Document.Search <FARegister.refNbr>(register.RefNbr); entryGraph.Delete.Press(); PXProcessing.SetProcessed(); } catch (Exception e) { failed = true; PXProcessing.SetError(e); } } if (failed) { throw new PXOperationCompletedWithErrorException(ErrorMessages.SeveralItemsFailed); } }); }
public SOOrderProcessing() { Orders.SetProcessDelegate(item => { PerformRelease(item); }); }
public GLConsolReadMaint() { GLSetup setup = GLSetup.Current; PXCache cache = ConsolSetupRecords.Cache; SubaccountSegmentsView = new PXSelect <Segment, Where <Segment.dimensionID, Equal <SubAccountAttribute.dimensionName> > >(this); PXUIFieldAttribute.SetEnabled <GLConsolSetup.description>(cache, null, false); PXUIFieldAttribute.SetEnabled <GLConsolSetup.lastConsDate>(cache, null, false); PXUIFieldAttribute.SetEnabled <GLConsolSetup.lastPostPeriod>(cache, null, false); PXUIFieldAttribute.SetEnabled <GLConsolSetup.ledgerId>(cache, null, false); PXUIFieldAttribute.SetEnabled <GLConsolSetup.login>(cache, null, false); PXUIFieldAttribute.SetEnabled <GLConsolSetup.password>(cache, null, false); PXUIFieldAttribute.SetEnabled <GLConsolSetup.pasteFlag>(cache, null, false); PXUIFieldAttribute.SetEnabled <GLConsolSetup.segmentValue>(cache, null, false); PXUIFieldAttribute.SetEnabled <GLConsolSetup.url>(cache, null, false); cache.AllowInsert = false; cache.AllowDelete = false; ConsolSetupRecords.SetProcessDelegate <GLConsolReadMaint>(ProcessConsolidationRead); ConsolSetupRecords.SetProcessAllVisible(false); }
public ProjectBalanceValidation() { Items.SetSelected <PMProject.selected>(); Items.SetProcessDelegate <ProjectBalanceValidationProcess>(Validate); Items.SetProcessCaption(GL.Messages.ProcValidate); Items.SetProcessAllCaption(GL.Messages.ProcValidateAll); }
public EPDocumentRelease() { EPDocumentList.SetProcessDelegate(EPDocumentRelease.ReleaseDoc); EPDocumentList.SetProcessCaption(Messages.Release); EPDocumentList.SetProcessAllCaption(Messages.ReleaseAll); EPDocumentList.SetSelected <EPExpenseClaim.selected>(); }
public SOOrderProcessing() { // Acuminator disable once PX1008 LongOperationDelegateSynchronousExecution [Justification] Orders.SetProcessDelegate(item => { PerformRelease(item); }); }
public KCPriceAndInventoryMaint() { LoggerProperties.EntityType = KCLogEntities.PN; LoggerProperties.ActionName = KCLoggerConstants.Export; logger = new KCLoggerProvider(LoggerProperties); Messages.SetProcessDelegate(Process); }
public EPDocumentRelease() { APSetup accountsPayableSetup = APSetup.Current; EPDocumentList.SetProcessDelegate(ReleaseDoc); EPDocumentList.SetProcessCaption(Messages.Release); EPDocumentList.SetProcessAllCaption(Messages.ReleaseAll); EPDocumentList.SetSelected <EPExpenseClaim.selected>(); }
public BatchRelease() { GLSetup setup = GLSetup.Current; BatchList.SetProcessDelegate <PostGraph>(ReleaseBatch); BatchList.SetProcessCaption(Messages.ProcRelease); BatchList.SetProcessAllCaption(Messages.ProcReleaseAll); PXNoteAttribute.ForcePassThrow <Batch.noteID>(BatchList.Cache); }
public POReleaseReceipt() { Orders.SetSelected <POReceipt.selected>(); Orders.SetProcessCaption(Messages.Process); Orders.SetProcessAllCaption(Messages.ProcessAll); Orders.SetProcessDelegate(delegate(List <POReceipt> list) { ReleaseDoc(list, true); }); }
//protected virtual IEnumerable tranScriptDetail() //{ // int i = 0; // foreach (var row in transcriptdetail.Cache.Cached) // { // i++; // yield return row; // } // if (i == 0) // { // FirefliesConfig firefliesConfig = config.Select(); // string userid = string.Empty; // if (firefliesConfig != null && (!string.IsNullOrEmpty(firefliesConfig.APIEndPoint) && !string.IsNullOrEmpty(firefliesConfig.Apikey))) // { // var flAuthRequest = new GraphQLRequest // { // Query = @" // { // user { // user_id // email // recent_transcript // } // } // " // }; // var graphQLClient = new GraphQLClient(firefliesConfig.APIEndPoint); // graphQLClient.DefaultRequestHeaders.Add("Authorization", String.Format("Bearer {0}", firefliesConfig.Apikey)); // var graphQLResponse = graphQLClient.PostAsync(flAuthRequest).Result; // if (graphQLResponse.Errors == null) // { // var oUser = graphQLResponse.GetDataFieldAs<User>("user"); // if (!string.IsNullOrEmpty(oUser.user_id)) // { // var variables = new { login = oUser.user_id }; // var flAuthTranRqu = new GraphQLRequest // { // Query = @"query ($login: String!) // { // transcripts (user_id: $login){ // id // title // sentences // { // index // text // raw_text // start_time // end_time // speaker_id // } // fireflies_users // date // duration // transcript_url // participants // } // } // ", // Variables = variables // }; // var graphQLTranResponse = graphQLClient.PostAsync(flAuthTranRqu).Result; // var transcripts = graphQLTranResponse.GetDataFieldAs<Transcript[]>("transcripts"); // foreach (Transcript transcript in transcripts) // { // var sentences = transcript.sentences; // string ffusers = String.Join(",", transcript.fireflies_users); // string participants = String.Join(",", transcript.participants); // foreach (Sentence sentence in sentences) // { // TransScriptDetail row = new TransScriptDetail(); // row.Id = transcript.id; // row.Title = transcript.title; // row.Firefliesusers = ffusers; // //row.Date = Convert.ToDateTime(transcript.date); // row.Duration = Convert.ToString(transcript.duration ?? ""); // row.Transcripturl = transcript.transcript_url; // row.Participants = participants; // row.Index = sentence.index; // row.Text = sentence.text; // row.Rawtext = sentence.raw_text; // row.Starttime = sentence.start_time.ToString(); // row.Endtime = sentence.end_time.ToString(); // row.Speakerid = sentence.speaker_id.ToString(); // transcriptdetail.Cache.Insert(row); // yield return row; // } // } // } // } // } // } //} #region Ctor public ProcessTranscript() { //LoadData(); transcriptdetail.SetProcessDelegate( (list) => { var graph = PXGraph.CreateInstance <ProcessTranscript>(); ProcessData(list, graph); }); }
public SalesOrderProcess() { Orders.SetProcessCaption("Approve"); Orders.SetProcessAllCaption("Approve All"); Orders.SetProcessDelegate <SalesOrderEntry>(delegate(SalesOrderEntry graph, SalesOrder order) { graph.Clear(); graph.ApproveOrder(order, true); }); }
public ProcessPendingVAT() { CustomerSVAT.SetProcessDelegate(ProcessPendingVATProc); CustomerSVAT.SetProcessAllVisible(false); VendorSVAT.SetProcessDelegate(ProcessPendingVATProc); VendorSVAT.SetProcessAllVisible(false); PXUIFieldAttribute.SetEnabled <TaxTran.taxInvoiceDate>(CustomerSVAT.Cache, null, true); PXUIFieldAttribute.SetEnabled <TaxTran.taxInvoiceNbr>(CustomerSVAT.Cache, null, true); }
public SmartsheetSyncProcess() { Projects.SetProcessCaption("Sync"); Projects.SetProcessAllCaption("Sync All"); Projects.SetProcessDelegate <ProjectEntry>( delegate(ProjectEntry graph, PMProject projectRow) { graph.Clear(); ProjectEntryExt projectEntryExtGraph = graph.GetExtension <ProjectEntryExt>(); projectEntryExtGraph.CreateUpdateGanttProject(graph, projectRow, "", true); }); }
public ReviewInvoiceBatches() { Batches.SetProcessDelegate <PostBatchEntry>( delegate(PostBatchEntry processor, FSPostBatch fsPostBatchRow) { processor.Clear(); processor.DeletePostingBatch(fsPostBatchRow); }); Batches.SetProcessCaption(TX.ButtonDisplays.DeleteProc); Batches.SetProcessAllCaption(TX.ButtonDisplays.DeleteAllProc); }
public POLandedCostProcess() { POSetup setup = POSetup.Current; receiptsList.SetSelected <POReceiptLCInfo.selected>(); receiptsList.SetProcessCaption(Messages.Process); receiptsList.SetProcessAllCaption(Messages.ProcessAll); receiptsList.SetProcessDelegate(delegate(List <POReceiptLCInfo> list) { ReleaseDoc(list); }); }
public POReleaseReceipt() { APSetupNoMigrationMode.EnsureMigrationModeDisabled(this); Orders.SetSelected <POReceipt.selected>(); Orders.SetProcessCaption(Messages.Process); Orders.SetProcessAllCaption(Messages.ProcessAll); Orders.SetProcessDelegate(delegate(List <POReceipt> list) { ReleaseDoc(list, true); }); }
public UsersProcess() { OurUsers.SetProcessAllCaption("Process users"); OurUsers.SetProcessCaption("Process user"); OurUsers.SetProcessDelegate(ProcessItem); OurUsers.SetProcessDelegate(delegate(Users user) { throw new PXSetupNotEnteredException <Users>(null); }); OurUsers.SetProcessDelegate(user => { throw new PXSetupNotEnteredException <Users>(null); }); OurUsers.SetProcessDelegate((Users user) => throw new PXSetupNotEnteredException <Users>(null)); OurUsers.SetProcessDelegate(ProcessItemList); OurUsers.SetProcessDelegate(delegate(List <Users> userList) { throw new PXSetupNotEnteredException <Users>(null); }); OurUsers.SetProcessDelegate(userList => { throw new PXSetupNotEnteredException <Users>(null); }); OurUsers.SetProcessDelegate((List <Users> userList) => throw new PXSetupNotEnteredException <Users>(null)); }
public static void SetProcessDelegate <ProcessGraph>(PXGraph graph, ScheduleRun.Parameters filter, PXProcessing <Schedule> view) where ProcessGraph : PXGraph <ProcessGraph>, IScheduleProcessing, new() { if (filter == null) { return; } short times = filter.LimitTypeSel == ScheduleRunLimitType.StopAfterNumberOfExecutions ? filter.RunLimit ?? 1 : short.MaxValue; DateTime executionDate = filter.LimitTypeSel == ScheduleRunLimitType.StopOnExecutionDate ? filter.ExecutionDate ?? graph.Accessinfo.BusinessDate.Value : DateTime.MaxValue; Dictionary <string, string> parametersErrors = PXUIFieldAttribute.GetErrors( graph.Caches[typeof(ScheduleRun.Parameters)], filter); view.SetProcessDelegate(schedules => { if (parametersErrors.Any()) { throw new PXException(parametersErrors.First().Value); } ProcessGraph processGraph = PXGraph.CreateInstance <ProcessGraph>(); bool failed = false; foreach (Schedule schedule in schedules) { try { PXProcessing <Schedule> .SetCurrentItem(schedule); processGraph.Clear(); processGraph.GenerateProc(schedule, times, executionDate); PXProcessing <Schedule> .SetInfo(ActionsMessages.RecordProcessed); } catch (Exception e) { failed = true; PXProcessing <Schedule> .SetError(e); } } if (failed) { //Clean current to prevent set exception to the last item PXProcessing <Schedule> .SetCurrentItem(null); throw new PXException(AR.Messages.OneOrMoreItemsAreNotProcessed); } }); }
public POLandedCostProcess() { APSetupNoMigrationMode.EnsureMigrationModeDisabled(this); POSetup setup = POSetup.Current; receiptsList.SetSelected <POReceiptLCInfo.selected>(); receiptsList.SetProcessCaption(Messages.Process); receiptsList.SetProcessAllCaption(Messages.ProcessAll); receiptsList.SetProcessDelegate(delegate(List <POReceiptLCInfo> list) { ReleaseDoc(list); }); }
public CRGrammProcess() { Processor processor = new Processor(); Items.SetProcessDelegate(processor.CreateGrams); Items.Cache.AllowInsert = true; PXUIFieldAttribute.SetDisplayName <Contact.displayName>(Items.Cache, Messages.Contact); if (!processor.IsRulesDefined) { throw new PXSetupNotEnteredException(ErrorMessages.SetupNotEntered, typeof(CRSetup), typeof(CRSetup).Name); } }
public APLandedCostProcess() { APSetup apSetup = APSetup.Current; POSetup poSetup = POSetup.Current; documents.SetSelected <APInvoiceLCInfo.selected>(); documents.SetProcessCaption(ActionsMessages.Process); documents.SetProcessAllCaption(ActionsMessages.ProcessAll); documents.SetProcessDelegate(delegate(List <APInvoiceLCInfo> list) { ReleaseDoc(list); }); }
public TranslationRelease() { CMSetup setup = CMSetup.Current; TranslationReleaseList.SetProcessDelegate( delegate(TranslationHistory transl) { TranslationHistoryMaint.CreateBatch(transl, false); }); TranslationReleaseList.SetProcessCaption(Messages.Release); TranslationReleaseList.SetProcessAllVisible(false); }
protected virtual void FARegister_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { Docs.SetProcessCaption(Messages.DeleteProc); Docs.SetProcessAllCaption(Messages.DeleteAllProc); Docs.SetProcessDelegate(delegate(List <FARegister> list) { foreach (FARegister register in list) { FARegister copy = (FARegister)Docs.Cache.CreateCopy(register); Docs.Delete(copy); } Actions.PressSave(); }); }