将所有数据库表数据绑定到gridview中,并在gridview中实现插入,删除和更新功能 [英] Binding all the database tables data into gridview and implement insert,delete and update functionality in gridview

查看:88
本文介绍了将所有数据库表数据绑定到gridview中,并在gridview中实现插入,删除和更新功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个要求,我需要检索数据库中存在的所有表名并将表名填充到树视图控件中.在此之后,单击每个节点(因为每个节点都是数据库表名)后,我需要填充将相应的表数据放入网格视图控件中,并实现网格视图的插入/删除/更新功能,以便我可以从UI页面本身插入/删除/更新后端表数据.在我的数据库中,大约需要80个表从前端(UI)进行控制(即插入/删除/更新).但是将来数据库表的结构可能会更改,并且应该相应地反映在我的业务逻辑中.我认为可以使用动态表适配器来解决此要求,也可以是实体框架,但对此我不确定.任何人都可以提出一些建议来进行此工作.这对我来说非常紧急.

感谢您的期待,
Prashanth

Hi All,

I have a requirement in which I need to retrieve all the table names which exists in a database and populate the table names into tree view control.After that on click of each node(since each node is database table name) i need to populate the corresponding table data into grid view control and implement insert/delete/update functionalists of grid view so that i can insert/delete/update the back end tables data from my UI page itself.In my database there are approximately 80 tables which needs to be controlled(i.e insert/delete/update) from the front end(UI).However in future the database table structures may change and it should be reflected in my business logic accordingly.I think this requirement can be solved using dynamic table adapters or may be entity framework but i am not sure on this.Can anyone please suggest some way to proceed on this taks.This is very urgent for me.

Thanks in Anticipation,
Prashanth

推荐答案

如果您看到此链接,则可能会帮助您
If you see this link this may help you http://www.dotnetfunda.com/articles/article1619-how-to-perform-edit-update-and-delete-operation-in-gridview-.aspx


这篇关于将所有数据库表数据绑定到gridview中,并在gridview中实现插入,删除和更新功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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