需要帮助创建业务对象列表 [英] Need help creating list of business objects

查看:57
本文介绍了需要帮助创建业务对象列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是c#和.net 2.0的新手。在旧的vb.net 1.1天里,我通常为每个业务类创建一个

列表类,并将此列表类用于所有

数据绑定而不是使用数据集。这是因为我经常想在列表中编辑
数据,因此需要与业务对象进行通信

而不是数据集。由于这是必须的,我在大多数情况下标准化创建列表

对象,所以一切都是标准化的。我已经搜索了很多,并且已经找到了很多关于最新和最好的方式的文档来创建可绑定的自定义列表类。今天在

创建可绑定列表类的最佳实践是什么?哪有'关于此的好文件?


谢谢。


-
mo ******* @ nospam.nosp am

I''m new to c# and .net 2.0. In the old vb.net 1.1 days I normally created a
list class for every business class and used this list class for all
databinding rather than using datasets. This is because often I wanted to
edit data in the list and therefore needed to talk to the business object
and not the dataset. Since this was a must, I standardized on creating list
objects in most cases so everything was standardized. I''ve searched far and
wide and have found little documentation on the latest and greatest way to
create bindable custom list classes. What is the best practice these day in
creating bindable list classes? Where''s good documentation about this?

Thanks.

--
mo*******@nospam.nospam

推荐答案

您好moondaddy

在这里您可以找到创建业务列表的有用摘要

对象使用.Net Framework 2.0的BindlingList类进行绑定(

很酷的功能!):

http://blogs.msdn.com/dchandnani/arc...12/394438.aspx


您可以在网上搜索BindingList类,我希望这有帮助


A.Hadi

Hi moondaddy
Here you can find a usefull summary of creating list of business
objects for binding using BindlingList class of .Net Framework 2.0 ( a
cool feature !) :

http://blogs.msdn.com/dchandnani/arc...12/394438.aspx

you can search the web for BindingList class, too.
I hope this helps

A.Hadi


谢谢。这是一个有用的链接。然而,当我尝试它时,我在gridview的每个单元格中都得到了一个

错误,并且还没有找到原因。另外,我的
通常在我的列表类中添加了功能。是否有代码

继承BindingList类并使用它创建新的列表类

的示例?我尝试了但是控件和/或设计师无法在列表中的对象中看到

字段。


再次感谢。


-
mo ******* @ nospam.nosp am

" Aboulfazl Hadi" < AH **** @ gmail.com>在消息中写道

news:11 ********************* @ u72g2000cwu.googlegro ups.com ...
Thanks. That was a useful link. However, when I try it, I''m getting an
error in every cell of the gridview and haven''t identified why yet. Also, I
usually have added functionality in my list classes. Is there a code
example of inheriting the BindingList class and creating a new list class
with it? I tried it but the controls and/or the designer could not see the
fields in the objects in the list.

Thanks again.

--
mo*******@nospam.nospam
"Aboulfazl Hadi" <AH****@gmail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
您好moondaddy
在这里您可以找到使用.Net Framework 2.0的BindlingList类创建绑定业务列表的有用摘要(一个很酷的功能!):

http:// blogs .msdn.com / dchandnani / arc ... 12 / 394438.aspx

你也可以在网上搜索BindingList类。
我希望这有助于

A.Hadi
Hi moondaddy
Here you can find a usefull summary of creating list of business
objects for binding using BindlingList class of .Net Framework 2.0 ( a
cool feature !) :

http://blogs.msdn.com/dchandnani/arc...12/394438.aspx

you can search the web for BindingList class, too.
I hope this helps

A.Hadi



您好

发布您的示例代码,请


A.Hadi

Hi
post your sample code, please

A.Hadi


这篇关于需要帮助创建业务对象列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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