コード例 #1
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        public ActionResult Delete(string idList)
        {
            var json = new JsonHelp()
            {
                Status = "n", Msg = "删除失败"
            };

            try
            {
                var list = idList.Split(',');
                foreach (var item in list)
                {
                    var path = Server.MapPath("/backup/" + item);
                    FileOperate.DelFile(path);
                }
                json.Status = "y";
                json.Msg    = "删除成功";
                DB.SysLogs.setAdminLog(Enums.EventType.Backup, "数据库删除成功[" + idList + "]");
            }
            catch (Exception e)
            {
                LogHelper.Error("删除数据库出错:" + e.Message);
            }
            return(Json(json));
        }