コード例 #1
0
        protected bool remove_file(DocFileInfo file, ref string responseText)
        {
            try
            {
                if (file != null && file.FolderName.HasValue && file.FolderName.Value == FolderNames.TemporaryFiles)
                {
                    file.delete(paramsContainer.Tenant.Id);
                }
            }
            catch { }

            bool result = file != null && file.FileID.HasValue &&
                          DocumentsController.remove_file(paramsContainer.Tenant.Id, file.FileID.Value);

            responseText = result ? "{\"Succeed\":\"" + Messages.OperationCompletedSuccessfully + "\"}" :
                           "{\"ErrorText\":\"" + Messages.OperationFailed + "\"}";

            return(result);
        }