C#Web-App:使用DataSet从GridView更新数据库 [英] C# Web-App: Update Database from GridView using DataSets

查看:46
本文介绍了C#Web-App:使用DataSet从GridView更新数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在为以下场景寻找一些示例示例(代码)


我有一个网格视图,它填充数据库中的数据说来自产品表

使用数据集和dataadapter


此网格有三列productid,ProductName,Unit Price(这是可编辑的文本框字段)。有复选框列。 (分页启用有2页)


有三个按钮说更新和删除

现在假设我选择5个复选框和

1)点击更新然后我做的Watever更改应该反映在数据库中

2)点击删除那么这五行应该在数据库中删除。

和我的页面应该刷新。


(所有这些都应该在没有使用SQLDATASOURCE或任何其他INBUILT .NET的情况下完成)


任何帮助都会很大赞赏

Hi
I m looking for some sample example (Code) for my following scenario

I have a Grid View which populates data from database say from Product Tables
using dataset and dataadapter

This Grid has three columns of productid ,ProductName ,Unit Price (THis is editable text box field). There is checkbox column. (Paging is enabled there are 2 pages )

There are three buttons say update and delete
Now suppose I select 5 checkboxes and
1) click update then watever changes I have done should be reflected in database
2)click delete then those five rows should be deleted in database.
and my page should be refreshed.

(ALL THESE SHOULD BE DONE WITHOUT USING SQLDATASOURCE OR ANY OTHER INBUILT .NET stuff)

Any help will be greatly appreciated

推荐答案

到目前为止你做了什么?请阅读您不遵守网站规则的常见问题解答。谢谢。
What have you done so far? Please read the faqs you are not following the site rules. Thanks.


我没有得到你。


我想你是说我要把我已经完成的代码watever直到现在?


I didn''t get u.

I guess you are saying me to put code watever I have done till now??




到目前为止你做了什么?请阅读您不遵守网站规则的常见问题解答。谢谢。
What have you done so far? Please read the faqs you are not following the site rules. Thanks.


没必要它应该是代码。


但是你要我们为你做这个?或者你是在寻求帮助吗?


如果您在当前工作中遇到问题或者某些事情不起作用,我们可以帮助您。请提及您已经开始使用的内容我们可以指导您正确的方向。


PS:不要在大写锁定中输入文字,这违反了网站规定!
Not necessary that it should be the code.

But are you asking us to make that for you? or are you asking for help in that?

We can help you if you are facing issues with your current work or if something isint working, Please do mention what you have started with that so that we can guide you in the right direction.

PS: Do not enter text in Caps lock, this is against the site regulations!


这篇关于C#Web-App:使用DataSet从GridView更新数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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