コード例 #1
0
        public virtual IEnumerable sendCallNotification(PXAdapter adapter)
        {
            ARInvoice invoice = PXCache <ARInvoice> .CreateCopy(Base.Document.Current);

            PXLongOperation.StartOperation(Base, delegate
            {
                ARInvoiceEntry invGraph         = PXGraph.CreateInstance <ARInvoiceEntry>();
                invGraph.Document.Current       = invoice;
                ARInvoiceEntryPXExt invGraphExt = invGraph.GetExtension <ARInvoiceEntryPXExt>();
                invGraphExt.SendTwilioNotification(invGraph, TwilioNotificationType.OutBoundCall);
            });
            return(adapter.Get());
        }
コード例 #2
0
        protected virtual void ARTwilioNotificationProcessFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            ARTwilioNotificationProcessFilter filter = (ARTwilioNotificationProcessFilter)e.Row;

            if (filter != null && !String.IsNullOrEmpty(filter.Action) && (filter.Action != "<SELECT>"))
            {
                ARDocumentList.SetProcessDelegate <ARInvoiceEntry>(
                    delegate(ARInvoiceEntry graph, ARInvoice invoice)
                {
                    graph.Clear();
                    graph.Document.Current          = invoice;
                    ARInvoiceEntryPXExt invGraphExt = graph.GetExtension <ARInvoiceEntryPXExt>();
                    invGraphExt.SendTwilioNotification(graph, filter.Action);
                });
            }
        }