📄 approvegallerypostcommand.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System;
using CommunityServer.Components;
using CommunityServer.Galleries.Components;
namespace CommunityServer.ControlPanel.Photos
{
/// <summary>
/// Summary description for ApproveGalleryPostCommand.
/// </summary>
public class ApproveGalleryPostCommand : GalleryCommand
{
public ApproveGalleryPostCommand()
{
//
// TODO: Add constructor logic here
//
}
public override string Message(GalleryCommandPage page)
{
return "Are you sure you want to approve the post?";
}
public override void Action(GalleryCommandPage page)
{
CSContext context = CSContext.Current;
int postID = context.GetIntFromQueryString("PostID", 0);
if(postID > 0)
{
GalleryDataProvider.Instance().ApprovePost(postID, context.UserID);
return;
}
throw new Exception("The Gallery Post could not be found");
}
public override string Title
{
get
{
return "Approve Post";
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -