本文整理汇总了C#中OCL.CanEditVideoStorageServerPermissions方法的典型用法代码示例。如果您正苦于以下问题:C# OCL.CanEditVideoStorageServerPermissions方法的具体用法?C# OCL.CanEditVideoStorageServerPermissions怎么用?C# OCL.CanEditVideoStorageServerPermissions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OCL
的用法示例。
在下文中一共展示了OCL.CanEditVideoStorageServerPermissions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateObjectInGroup
//.........这里部分代码省略.........
{
if(!CurrentGroup.CanEditSourcePermissions(AccessingUser))
return false;
sType = "Source";
OCL.Source S = (OCL.Source)Obj;
ObjectTypeId = (int)S.ObjectType;
ObjectId = S.ID;
OBT = OCL.OysterObjectType.Source;
}
else if(Obj is OCL.Control)
{
if(!CurrentGroup.CanEditControlPermissions(AccessingUser))
return false;
sType = "Control";
OCL.Control C = (OCL.Control)Obj;
ObjectTypeId = (int)C.ObjectType;
ObjectId = C.ID;
OBT = OCL.OysterObjectType.Control;
}
else if(Obj is OCL.Scene)
{
if(!CurrentGroup.CanEditScenePermissions(AccessingUser))
return false;
sType = "Scene";
OCL.Scene S = (OCL.Scene)Obj;
ObjectTypeId = (int)S.ObjectType;
ObjectId = S.ID;
OBT = OCL.OysterObjectType.Scene;
}
else if(Obj is OCL.Note)
{
if(!CurrentGroup.CanEditNotePermissions(AccessingUser))
return false;
sType = "Note";
OCL.Note N = (OCL.Note)Obj;
ObjectTypeId = (int)N.ObjectType;
ObjectId = N.ID;
OBT = OCL.OysterObjectType.Note;
}
else if(Obj is OCL.RecordingSession)
{
if(!CurrentGroup.CanEditRecordingSessionPermissions(AccessingUser))
return false;
sType = "RecordingSession";
OCL.RecordingSession RS = (OCL.RecordingSession)Obj;
ObjectTypeId = (int)RS.ObjectType;
OBT = RS.ObjectType;
ObjectId = RS.ID;
}
else if(Obj is OCL.Attachment)
{
if(!CurrentGroup.CanEditAttachmentPermissions(AccessingUser))
return false;
sType = "Attachment";
OCL.Attachment A = (OCL.Attachment)Obj;
ObjectTypeId = (int)A.ObjectType;
ObjectId = A.ID;
OBT = A.ObjectType;
}
else if(Obj is OCL.Group)
{
if(!CurrentGroup.CanEditGroupPermissions(AccessingUser))
return false;
sType = "Group";
OCL.Group G = (OCL.Group)Obj;
ObjectTypeId = (int)G.ObjectType;
ObjectId = G.ID;
OBT = G.ObjectType;
}
else if(Obj is OCL.VideoStorageServer)
{
if(!CurrentGroup.CanEditVideoStorageServerPermissions(AccessingUser))
return false;
sType = "VideoStorageServer";
OCL.VideoStorageServer V = (OCL.VideoStorageServer)Obj;
ObjectTypeId = (int)V.ObjectType;
ObjectId = V.ID;
OBT = V.ObjectType;
}
//Check to make sure Object is member of Group
string sSQL = "SELECT GroupId FROM tblGroupTokens WHERE GroupId = " + CurrentGroup.ID +
" AND UserId = " + AccessingUser.ID +
" AND ObjectTypeId = " + ObjectTypeId +
" AND ObjectId = " + ObjectId;
int numrecs = RF.ExecuteCommandNonQuery(sSQL);
if(numrecs < 1)
throw new Exception( sType + " does not exist in Group");
return UpdatePermission(CurrentGroup,DefaultUser,OBT,ObjectId,UpdatedValues.mvarIsVisible,
UpdatedValues.mvarCanAdd, UpdatedValues.mvarCanEdit, UpdatedValues.mvarCanDelete, UpdatedValues.mvarIsUsable,
UpdatedValues.CanEditPermission,UpdatedValues.CanSeePermission,
UpdatedValues.CanAddObjectA,UpdatedValues.CanEditObjectA,UpdatedValues.CanDeleteObjectA,
UpdatedValues.CanAddObjectB,UpdatedValues.CanEditObjectB,UpdatedValues.CanDeleteObjectB,
Convert.ToInt32(UpdatedValues.mvarAddedByUserId));
}