plz建议我编码 [英] plz suggest me coding

查看:92
本文介绍了plz建议我编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在同一时间单击一个按钮时显示datagridview中两个表的数据,并且plz建议我编码以更新和删除datagridview中显示的两个表的数据。

how to show data of two tables in datagridview on a click on one button at the same time and plz suggest me coding to update and delete data of two tables which is being shown in datagridview.

推荐答案

这应该很容易。



你应该创建一个包含两个表中所有字段的类型,然后使用LINQ快速将两个表中的数据合并到一个新创建类型的列表中并绑定新的列表到您的datagridview。所有你可以放入按钮OnClick事件,瞧。你已经完成。



很简单。



快乐编码。
This should be easy.

You should create one type that encompasses all the fields from both tables, then using LINQ quickly merge data from both tables into one list of newly created type and bind that new list to your datagridview. All that you can put into buttons OnClick event, and voila. You are done.

Easy as that.

Happy coding.

这篇关于plz建议我编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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