码迷,mamicode.com
首页 > 其他好文 > 详细

Sharepoint在Event中修改字段数据

时间:2019-09-13 13:18:01      阅读:94      评论:0      收藏:0      [点我收藏+]

标签:href   error   tostring   other   tin   iat   ||   poi   修改字段   

摘要:Sharepoint在Event中修改字段数据



public override void ItemUpdating(SPItemEventProperties properties) { 
	try { 
		string newFieldValue = GetNewFieldValue(); 
		object oldFieldValue = properties.AfterProperties[COLUMN_NAME]; 
		if (oldFieldValue == null || oldFieldValue.ToString() != newFieldValue) { 
			properties.AfterProperties[COLUMN_NAME] = newFieldValue; 
		} 
	} catch { 
		//Log the error, or take another appropriate action. 
	} finally { 
		base.ItemUpdating(properties); 
	} 
}

原文:大专栏  Sharepoint在Event中修改字段数据


Sharepoint在Event中修改字段数据

标签:href   error   tostring   other   tin   iat   ||   poi   修改字段   

原文地址:https://www.cnblogs.com/petewell/p/11516605.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!