C# 类库和报告
我正在构建一个大系统,我将其分为三层:UI、类库和数据库。 数据库仅存储所有数据,类库提供所有功能和业务逻辑。 UI是用户界面。
我面临的问题是:如何在这种情况下整合报告。 我使用 C# 作为类库,使用 windows-forms-in-C# 作为 UI。 我打算使用 rdlc Microsoft 报告。
我此时的策略是: 让每个对象在数据集中添加自己的数据, 然后将返回到 UI 以在报告中显示。
I am building a big system, which i have divided in three tiers, UI, Class-Library, and Database.
Database stores all data only, and Class-Library provides all functionalities and business logic.
And UI is the User-Interface.
The issue which i face is: how to integrate the reporting in this situation.
I am using C# for class-library, and windows-forms-in-C# for UI.
I intend to use rdlc Microsoft reports.
My strategy at this point is:
Let every object add its own data in a dataset,
which will be then returned to the UI for display in report.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,这些报告只是另一个用户界面。为给定报表返回哪些数据的业务逻辑应该存在于类库中。报告业务对象可能位于它们自己的命名空间中(Appname.Reporting)。我想我会有一个抽象报告类,它为报告所需的大多数属性和方法提供框架,并为每个单独的报告对该框架进行子类化。因此,每个报告一个类,但全部派生自通用类。
It seems to me that the reports are just another UI. Your business logic for what data to return for a given report should live in the class library. The reporting business objects would probably live in a namespace of their own (Appname.Reporting). I think I would have an abstract report class that provides a skeleton for most properties and methods that a report would need, and subclass that skeleton for each individual report. Thus, one class per report, but all derived from a generic class.