Exemple #1
0
    protected void AddLog(string ids)
    {
        News condition = new News();
        News value     = new News();

        condition.AddConditon(" and id in(" + ids + ")");
        List <News> list = TableOperate <News> .Select(value, condition);

        if (list.Count > 0)
        {
            string deltitle = "";
            for (int i = 0; i < list.Count; i++)
            {
                CloudSQL.DeleteOldFile(list[i]);
                Update(list[i].OldID);
                deltitle += list[i].Title + ",";
            }
            deltitle = deltitle.TrimEnd(',');
            if (deltitle != "")
            {
                string logbrief = "管理员:【" + AdminMethod.AdminFullName + "】在" + DateTime.Now.GetDateTimeFormats('f')[0].ToString() + "删除了【" + deltitle + "】的云资源";
                Lognet.AddLogin(logbrief);
                Lognet.AddMailBox(logbrief);
            }
        }
    }
Exemple #2
0
 protected void DeleteFile(List <News> list)
 {
     for (int i = 0; i < list.Count; i++)
     {
         CloudSQL.DeleteOldFile(list[i]);
     }
 }