本文整理汇总了C#中CMSAdminControl.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# CMSAdminControl.GetValue方法的具体用法?C# CMSAdminControl.GetValue怎么用?C# CMSAdminControl.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMSAdminControl
的用法示例。
在下文中一共展示了CMSAdminControl.GetValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ucProjectList_OnCheckPermissions
/// <summary>
/// Check whether user can delete project.
/// </summary>
private void ucProjectList_OnCheckPermissions(string permissionType, CMSAdminControl sender)
{
// Indicates whether current user is owner
bool isOwner = false;
// Get project id
int projectId = ValidationHelper.GetInteger(sender.GetValue("DeletedItemID"), 0);
// Check whether project id is valid
if (projectId > 0)
{
// Try get project info
ProjectInfo proj = ProjectInfoProvider.GetProjectInfo(projectId);
// Check whethr peoject object exists and if current user is owner
if ((proj != null) && (proj.ProjectOwner == CMSContext.CurrentUser.UserID))
{
isOwner = true;
}
}
// If user is owner or can create project, allow delete project
if (!isOwner && !IsAuthorizedPerCreateProject())
{
// Show error
lblError.Visible = true;
// Set error message
lblError.Text = GetString("pm.project.permission");
// Stop edit control processing
sender.StopProcessing = true;
}
}