Beispiel #1
0
        /// <summary>
        /// 文档查看
        /// </summary>
        /// <returns></returns>
        public ActionResult DocShow()
        {
            string ID = Request.Params["ID"];

            if (string.IsNullOrEmpty(ID))
            {
                ID = "0";
            }
            ART_DOCUMENT_Model m = ART_DOCUMENTCls.getModel(new ART_DOCUMENT_SW {
                ARTID = ID
            });

            pubViewBag(m.ARTTYPEID, m.ARTTYPEID, "");
            ViewBag.isPageRight = true;
            StringBuilder sb = new StringBuilder();
            var           v  = ART_DOCUMENTCls.getModel(new ART_DOCUMENT_SW {
                ARTID = ID
            });

            sb.AppendFormat("<div class='showArtTitle'>{0}</div>", v.ARTTITLE);
            sb.AppendFormat("<div class='showArtSmallTitle'>{0}</div>", v.ARTTIME);
            sb.AppendFormat("<div class='showArtContent'>{0}</div>", v.ARTCONTENT);
            if (string.IsNullOrEmpty(v.PLANFILENAME) == false)
            {
                sb.AppendFormat("<div class=' showArtFile'>文件下载:<br><a href='/UploadFile/Doc/{0}'>{1}</a></div>", v.PLANFILENAME, v.ARTTITLE);
            }
            ViewBag.Content = sb.ToString();
            return(View());
        }
Beispiel #2
0
        /// <summary>
        /// 根据序号获取内容
        /// </summary>
        /// <returns>参见模型</returns>
        public ActionResult getDocJson()
        {
            string id = Request.Params["id"];

            if (string.IsNullOrEmpty(id))
            {
                id = "0";
            }
            return(Content(JsonConvert.SerializeObject(ART_DOCUMENTCls.getModel(new ART_DOCUMENT_SW {
                ARTID = id
            })), "text/html;charset=UTF-8"));
        }