在三层架构的基础上在gridview中显示数据. [英] displaying data in gridview on the bases of three tier archetecture.

查看:216
本文介绍了在三层架构的基础上在gridview中显示数据.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在网格视图中基于三层Archetecher显示数据.我已经用简单的编码完成了..但不知道如何在三层中完成.我想简单地在基于三层的gridview中显示数据..

一种是databaselayre,一种是业务层.还有一个礼物..

谁能在这里介绍示例代码.

解决方案

引入等级的目标之一是关注点分离 .您正试图做相反的事情:担心UI(表示层)对层数的依赖性.

重点是:每个层仅与一个层交互.因此,层数并不重要. DataGridView中的数据显示仅是数据显示:数据绑定,或手动"编码的控件填充,或二者混合(例如,您可以将网格视图的某些列绑定到数据,一些不是).这就是它,没别的.

—SA


有两种类型的层. 1)物理和2)逻辑

假设基于逻辑模式进行分隔,则可以编写两个.NET解决方案.一个是客户端,另一个是服务器.

在客户端解决方案中,您可以编写您的UI代码.在服务器解决方案中,编写两个类.一个用于业务,另一个用于数据源.


i want to display data in gridview on the bases of three tier archetecher. i have done it in simple coding.. but don''t know how to do it in three tier. i want to simply display data in gridview on the bases of three tier..

one is databaselayre, one businesslayer. and one presendtaion layre..

can anyone can introduce a sample code here.. how to do it?

解决方案

One of the goals for introducing tiers is separation of concerns. You''re trying to do the opposite: concern about dependency of UI (presentation layer) on number of tiers.

The whole point is: each tiers interacts only with one tier. So, the number of tiers does not matter. Display of data in the DataGridView is just the display of data: either data binding, or "manually" coded population of the control, or mixture of both (for example, you can have some columns of the grid view data-bound, some not). This is what it is, nothing else.

—SA


There are 2 types of layers. 1)Physical and 2)Logical

Assuming separations based on logical mode, you can write two .NET solutions. One is client and another is server.

In client solution, you can write your UI code. In server solution, write two classes. One for business and another for data sourcing.


这篇关于在三层架构的基础上在gridview中显示数据.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆