Пример #1
0
        /// <summary>
        /// 获取文档资源
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETWDZY(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            FT_File    ff = new FT_FileB().GetEntities(p => p.zyid == P1).FirstOrDefault();
            JH_Auth_QY QY = new JH_Auth_QYB().GetALLEntities().FirstOrDefault();

            if (ff != null)
            {
                HttpWebResponse ResponseData = CommonHelp.CreateHttpResponse(QY.FileServerUrl + "/document/officecov/" + ff.zyid, null, 0, "", null, "GET");
                string          Returndata   = CommonHelp.GetResponseString(ResponseData);
                msg.Result  = Returndata.ToString().Split(',')[1];
                msg.Result1 = ff.Name;
                msg.Result2 = QY.FileServerUrl;
            }
            else
            {
                msg.ErrorMsg = "此文件不存在或您没有权限!";
            }
        }