且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

删除GridView中的行

更新时间:2023-12-04 13:36:28



您需要做的是使用LINQ查询字典

Hi,

What you will need to do is to query your dictionary using LINQ

List<dict> mylist = new List<dict>
mylist = dict.where(x=>x.value.deptID=yourdepID).tolist();
if(mylist.count>0)
{
// value exists
// to update you will need to create a new entry
// delete the old one
// insert the new value
}
else
{
//insert new
}</dict></dict>



语法可能不是100%正确,因为我目前无法测试.

希望对您有帮助.



The syntax may not be 100% correct as I cannot test at the moment.

Hope this helps you.