예제 #1
0
        /// <summary>
        /// 删除附件
        /// </summary>
        /// <param name="fileId">附件编码</param>
        /// <returns></returns>
        public ActionResult FileDelete(int fileId)
        {
            Flow flow = new Flow();
            bool delete;

            try
            {
                string path = AppConfig.GetUpload();

                delete = flow.DeleteAttacment(fileId, path);
            }
            catch (Exception)
            {
                delete = false;
            }

            if (delete)
            {
                return(Json(new { IsSuccess = true, Message = "删除成功" }, "text/html", JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(new { IsSuccess = false, Message = "删除失败" }, "text/html", JsonRequestBehavior.AllowGet));
            }
        }