/// <summary>
 /// 将附件下载为 字节流
 /// </summary>
 /// <param name="UCProcessType"></param>
 /// <param name="URL"></param>
 /// <returns></returns>
 public static Byte[] DownLoad(string UCProcessType, string URL)
 {
     Byte[] fileByte = null;
     if (OAConfig.GetConfig("MOSS认证", "是否启用DLL") == "1")
     {
         fileByte = DocumentManager.Download(MossObject.GetDownLoadFileInfo(UCProcessType, URL));
     }
     else
     {
         fileByte = MossObject.GetMOSSAPI().Download(MossObject.GetDownLoadFileInfo(UCProcessType, URL));
     }
     return(fileByte);
 }
        /// <summary>
        /// MOSS附件大小
        /// </summary>
        /// <param name="UCProcessType"></param>
        /// <param name="URL"></param>
        /// <returns></returns>
        public static long FileLength(string UCProcessType, string URL)
        {
            long fileLength;

            if (OAConfig.GetConfig("MOSS认证", "是否启用DLL") == "1")
            {
                fileLength = DocumentManager.FileLength(MossObject.GetDownLoadFileInfo(UCProcessType, URL));
            }
            else
            {
                fileLength = MossObject.GetMOSSAPI().FileLength(MossObject.GetDownLoadFileInfo(UCProcessType, URL));
            }
            return(fileLength);
        }
        /// <summary>
        /// 将附件下载 写入文件
        /// </summary>
        /// <param name="UCProcessType"></param>
        /// <param name="URL"></param>
        /// <returns></returns>
        public static string DownLoad_New(string UCProcessType, string URL)
        {
            string filePath = null;

            string strTempFileName = "Download_OA_" + Current.UserName + "_";

            if (OAConfig.GetConfig("MOSS认证", "是否启用DLL") == "1")
            {
                filePath = DocumentManager.Download_New(MossObject.GetDownLoadFileInfo(UCProcessType, URL), strTempFileName);
            }
            else
            {
                filePath = MossObject.GetMOSSAPI().Download_New(MossObject.GetDownLoadFileInfo(UCProcessType, URL), strTempFileName);
            }
            return(filePath);
        }