【 tulaoshi.com - ASP.NET 】
///
/// 主题管理类
/// public class TitlesManage:ITitles
{
///
/// 删除主题
/// ///
主题编号
///
操作员
public void DelTitle(int titleID,string operName)
{
//...
}
}
public interface ITitles
{
void DelTitle(int TitleID,string operName);
}
///
///主题管理代理类
/// public class ProxyTitlesManage:ITitles
{
public struct ValidateInfo
{
public int userID;
public int forumID;
public int groupID;
public int ownerID;
}
private ValidateInfo m_Validate;
private ITitles m_Title;
public ProxyTitlesManage(ValidateInfo v,ITitles it)
{
m_Validate = v;
m_Title = it;
}
//删除主题
public void DelTitle(int titleID,string operName)
{
if(CheckIdentity())
{
m_Title.DelTitle(titleID,operName);
}
else
{
throw new Exception("系统检测到你没有权限!");
}
}
private bool CheckIdentity( ) { //... }}