ZhiYeJianKang_PeiXun/Song.Site/Manage/Sys/DataClear.aspx.cs
2025-02-20 15:41:53 +08:00

67 lines
1.6 KiB
C#

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using WeiSha.Common;
using Song.ServiceInterfaces;
using Song.Entities;
namespace Song.Site.Manage.Sys
{
public partial class DataClear : Extend.CustomPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
#region
/// <summary>
/// 删除资讯文章
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtnNewsArticle_Click(object sender, EventArgs e)
{
try
{
Business.Do<IContents>().ArticleDeleteAll(-1, -1);
new Extend.Scripts(this).Alert("成功清空资讯文章");
}
catch (Exception ex)
{
new Extend.Scripts(this).Alert(ex.Message);
}
}
#endregion
/// <summary>
/// 清除通讯录
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtnAddressBook_Click(object sender, EventArgs e)
{
try
{
Business.Do<IAddressList>().Clear();
Alert("成功清空通讯录信息!");
}
catch (Exception ex)
{
Message.ExceptionShow(ex);
}
}
}
}