Пример #1
0
        public ActionResult DeletePhotoPoint()
        {
            if (!AppData.IsManagerLogin)
            {
                return(Json(new { success = false, msg = "您未登录后台或会话已过期" }));
            }
            if (PrivilegeBLL.HasNotPrivilege(AppData.SessionUserID, 1003))
            {
                return(Json(new { success = false, msg = "您没有执行该操作的权限" }));
            }

            Validation vld     = new Validation();
            int        pointID = vld.GetInt("id", false, "请传入照片编号");

            PhotoBLL      photoBLL      = new PhotoBLL();
            PhotoPointObj photoPointObj = photoBLL.GetPhotoPointByID(pointID);

            System.IO.File.Delete(Config.MediaPath + photoPointObj.Pic.Replace("/", "\\"));

            photoBLL.DeletePhotoPoint(pointID);

            return(Json(new { success = true }));
        }