后台调前台事件
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4
5 namespace Entities
6 {
7 public class DataOperateEventArgs : System.EventArgs
8 {
9 /// <param name="DataOperateIndex">当前操作项的索引值</param>
10 /// <param name="TableMapping">当前操作的表映表关系实例</param>
11 public DataOperateEventArgs(int DataOperateIndex, TableEntity tableEntity)
12 {
13 this._dataOperateIndex = DataOperateIndex;
14 this._TbEntity = tableEntity;
15 }
16
17 private int _dataOperateIndex;
18
19 /// <summary>
20 /// 获取当前操作项的索引值.
21 /// </summary>
22 public int DataOperateIndex
23 {
24 get { return _dataOperateIndex; }
25 }
26 private TableEntity _TbEntity;
27
28 /// <summary>
29 /// 获取当前操作的表映表关系实例.
30 /// </summary>
31 public TableEntity TbEntity
32 {
33 get { return _TbEntity; }
34 }
35 }
36 public delegate void EventDataOperateHandler(object sender, DataOperateEventArgs e);
37 }
38
后台调用方法
public void call (EventDataOperateHandler callbackLocal)
{
DataOperateEventArgs e = new DataOperateEventArgs(1, TableEntity TbEntity);
callbackLocal(1,e);
}
前台调用方法
private void ProcessCallback(object sender, DataOperateEventArgs e)
{
}
2 using System.Collections.Generic;
3 using System.Text;
4
5 namespace Entities
6 {
7 public class DataOperateEventArgs : System.EventArgs
8 {
9 /// <param name="DataOperateIndex">当前操作项的索引值</param>
10 /// <param name="TableMapping">当前操作的表映表关系实例</param>
11 public DataOperateEventArgs(int DataOperateIndex, TableEntity tableEntity)
12 {
13 this._dataOperateIndex = DataOperateIndex;
14 this._TbEntity = tableEntity;
15 }
16
17 private int _dataOperateIndex;
18
19 /// <summary>
20 /// 获取当前操作项的索引值.
21 /// </summary>
22 public int DataOperateIndex
23 {
24 get { return _dataOperateIndex; }
25 }
26 private TableEntity _TbEntity;
27
28 /// <summary>
29 /// 获取当前操作的表映表关系实例.
30 /// </summary>
31 public TableEntity TbEntity
32 {
33 get { return _TbEntity; }
34 }
35 }
36 public delegate void EventDataOperateHandler(object sender, DataOperateEventArgs e);
37 }
38
后台调用方法
public void call (EventDataOperateHandler callbackLocal)
{
DataOperateEventArgs e = new DataOperateEventArgs(1, TableEntity TbEntity);
callbackLocal(1,e);
}
前台调用方法
private void ProcessCallback(object sender, DataOperateEventArgs e)
{
}
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步