リスト項目が C# を使用して sharepoint リストに存在するかどうかを確認する必要があります。存在する場合は、「試行列」を 1 更新 (インクリメント) する必要があります。私はいくつかのコードを書きました.しかし、それらは機能していません.私はこれが緊急に必要です.
1 に答える
I'm not going to give you the code simply because you should attempt to solve it yourself first or at least explain that you have some knowledge of how you would go about it however i will help in give you a little insight.
You can do this a couple of ways
1
Get the SPWeb object
where the item is supposed to be. Normally context of the site.
Get the list where the item is supposed to live SPWeb object.lists[listname or guidhere]
Loop through the list checking if anything matches in each item or even checking if the object matches the object
The other way is to use an SPQuery object
set the SPquery.query = "YOUR CAML STATEMENT HERE"
SPList<yourlist>.GetItems(SPQuery object)
if the above returns >0 items you have a match
Increment by one
This should give you a good starting block
cheers Truez