Add a Class from the Business Class Library 从业务类库添加类 (XPO)
In this lesson, you will learn how to use business classes from the Business Class Library as is. For this purpose, you will add the Event business class to the application.
在本课中,您将学习如何使用来自 Business 类库中的业务类。为此,您将事件业务类添加到应用程序。
Note
Before proceeding, take a moment to review the Inherit from the Business Class Library Class (XPO) lesson.
-
In the Solution Explorer, find the Module.cs (Module.vb) file within the MySolution.Module project. Double-click it to invoke the Module Designer.
注意
在继续之前,请花点时间复习从业务类 (XPO) 课程继承。
- 在解决方案资源管理器中,在 MySolution.模块项目中查找Module.cs(模块.vb)文件。双击以调用模块设计器。
-
In the Exported Types section, locate the Referenced Assemblies | DevExpress.Persistent.BaseImpl.v19.2 | Event node. Select it and press the SPACEBAR, or right-click it and choose Use Type in Application in the invoked context menu. The node will be marked in bold. This means that the Event business class will be added to the Application Model, and this class will take part in the UI construction process. The use of extra modules is detailed in the Extra Modules section of this tutorial.
-
在"导出的类型"部分中,找到引用的程序集 |开发快车.持久.BaseImpl.v19.2 |事件节点。选择它并按空格键,或右键单击它,并在调用的上下文菜单中选择"在应用程序中使用类型"。节点将以粗体标记。这意味着事件业务类将添加到应用程序模型中,此类将参与 UI 构造过程。本教程的"额外模块"部分详细介绍了额外模块的使用。
-
Run the WinForms or ASP.NET application and note that the Scheduler Event navigation item is created, as the Event class has the NavigationItemAttribute applied. Note that it may be necessary to add other classes from the Business Class Library to the navigation manually (see the Add an Item to the Navigation Control topic).
-
运行 WinForms 或ASP.NET应用程序,并注意创建计划程序事件导航项,因为事件类已应用了导航项属性。请注意,可能需要手动将业务类库中的其他类添加到导航中(请参阅向导航控制主题添加项目)。
Tip
XAF has a special Scheduler module contains List Editor that uses the Scheduler Control (Win/Web) to display and manage Event business objects in XAF applications. Refer to the Add the Scheduler Module lesson to learn how to use it in your application.
You can see the changes made in the Main Demo installed with XAF. The MainDemo application is installed in %PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/
.提示
XAF 具有一个特殊的计划程序模块,其中包含列表编辑器,该编辑器使用计划程序控件 (Win/Web) 在 XAF 应用程序中显示和管理事件业务对象。请参阅添加计划程序模块课程,了解如何在应用程序中使用它。
您可以在使用 XAF 安装的主演示中看到所做的更改。默认情况下,主演示应用程序安装在 %PUBLIC%_文档_DevExpress 演示 19.2_组件_eXpressApp 框架_MainDemo 中。ASP.NET版本可在 http://demos.devexpress.com/XAF/MainDemo/ 在线获取
.
XAF开发成品案例参考
如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮,您的“推荐”将是我最大的写作动力!欢迎各位转载,但是未经作者本人同意,转载文章之后必须在文章页面明显位置给出作者和原文连接,否则保留追究法律责任的权利。
作者博客: http://www.cnblogs.com/foreachlife
欢迎加入CIIP框架\XAF技术应用交流群: 336090194 群文件中有更多相关工具及文档资料
转载请注明出处。多谢!
欢迎加我微信: admiralcn 或扫码:

【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· 周边上新:园子的第一款马克杯温暖上架
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
· 使用C#创建一个MCP客户端