【问题标题】:Calling delegate for Acumatica Event with the _ event notation使用 _ 事件表示法调用 Acumatica 事件的委托
【发布时间】:2021-06-22 21:53:38
【问题描述】:

以前,为了在事件处理程序中间注入代码,您可以使用以下代码:

protected virtual void Customer_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected del)
{
    // run before the base event 
    del?.Invoke(cache, e);
    // run after the base event 
}

采用新的活动风格:

protected virtual void _(Events.RowSelected<Customer> e)

调用代理的正确方法是什么?

【问题讨论】:

    标签: acumatica


    【解决方案1】:

    我在 APInvoiceEntryExt.cs 的扩展库中提供的代码中找到了一个示例。下面的代码是你将如何做到这一点的:

    protected virtual void _(Events.RowSelected<Customer> e, PXRowSelected del)
    {
        // run before the base event 
        del?.Invoke(e.Cache, e.Args);
        // run after the base event     
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-04-18
      • 2014-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多