public override void ItemUpdating(SPItemEventProperties properties)
{
base.ItemUpdating(properties);
DisableEventFiring();
double apScv = 0;
double apVlvl = 0;
string apScvConvert = properties.AfterProperties["vti_sourcecontrolversion"].ToString().Replace("V", "");
apScv = Convert.ToDouble(apScvConvert);
apVlvl = Convert.ToDouble(properties.ListItem.File.UIVersionLabel);
if (apVlvl > apScv)
{
//롤백일 경우 에러를 반환
properties.ErrorMessage = "버젼을 되돌릴수 없도록 제한되어 있습니다.";
properties.Cancel = true;
}
else
{
//일반적인 업데이트
}
EnableEventFiring();
}
'SharePoint' 카테고리의 다른 글
| 아이템의 롤백을 제한하는 방법 (0) | 2011/12/14 |
|---|---|
| WSS SP2가 나왔네요.. (3) | 2009/05/11 |
| プログラムによるListの作成例。프로그램을 사용한 SPList작성샘플 (0) | 2008/07/26 |
| Aspxファイルでコードを実行するには. Aspx파일에서 프로그램코드 실행하기 (0) | 2008/07/01 |
| LookUpField의 쿼리문. LookUpFieldのクエリ文 (0) | 2008/05/30 |
| 페이지당검색결과수를 조절하기. 1ページあたりの検索結果数を変える [SharePoint] (0) | 2008/05/30 |
![]() |
![]() |
|
![]() |
![]() |
![]() |


Prev





