Exemplo n.º 1
0
 /// <summary>
 /// 页面初始化
 /// </summary>
 /// <param name="id">操作ID</param>
 protected void PageInit(string id)
 {
     EyouSoft.BLL.GovStructure.BRegulation      BLL   = new EyouSoft.BLL.GovStructure.BRegulation();
     EyouSoft.Model.GovStructure.MGovRegulation Model = BLL.GetGovRegulationModel(id);
     if (null != Model)
     {
         this.lbNum.Text        = Model.Code;
         this.lbTitle.Text      = Model.Title;
         this.lbContent.Text    = Model.Content;
         this.lbApplydept.Text  = GetSectionID(Model.ApplyDeptList);
         this.lbIssuedName.Text = Model.IssuedName;
         this.lbIssurdTime.Text = Model.IssueTime.ToString("yyyy-MM-dd");
         this.lbDept.Text       = Model.IssuedDepartName;
         IList <EyouSoft.Model.ComStructure.MComAttach> lstFiles = Model.ComAttachList;
         if (null != lstFiles && lstFiles.Count > 0)
         {
             for (int i = 0; i < lstFiles.Count; i++)
             {
                 this.lbFile.Text = string.Format("<span><a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}' target='_blank'>{1}</a></span>", lstFiles[i].FilePath, lstFiles[i].Name);
             }
         }
         else
         {
             this.lbFile.Text = "无";
         }
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 获取附件标签
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        protected string GetUrl(string id)
        {
            StringBuilder sb = new StringBuilder();

            if (!string.IsNullOrEmpty(id))
            {
                EyouSoft.BLL.GovStructure.BRegulation      bll         = new EyouSoft.BLL.GovStructure.BRegulation();
                EyouSoft.Model.ComStructure.MComAttach     attachModel = new EyouSoft.Model.ComStructure.MComAttach();
                EyouSoft.Model.GovStructure.MGovRegulation ruleModel   = new EyouSoft.Model.GovStructure.MGovRegulation();
                ruleModel = bll.GetGovRegulationModel(id);
                if (ruleModel != null)
                {
                    if (ruleModel.ComAttachList != null && ruleModel.ComAttachList.Count > 0)
                    {
                        attachModel = ruleModel.ComAttachList.First();
                        sb.AppendFormat("<a title=\"附件\" target=\"_blank\" href=\"/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}\" ><img src=\"/Images/fujian.gif\" /></a>", attachModel.FilePath, attachModel.Name);
                        return(sb.ToString());
                    }
                }
            }
            return(string.Empty);
        }