Ejemplo n.º 1
0
 protected void PageInit(string id)
 {
     EyouSoft.BLL.GovStructure.BDocuments      BLL   = new EyouSoft.BLL.GovStructure.BDocuments();
     EyouSoft.Model.GovStructure.MGovDocuments model = BLL.GetGovFilePersonnelModel(id);
     if (model != null)
     {
         this.lbTitle.Text    = model.Title;
         this.lbCompany.Text  = model.Company;
         this.lbFontSize.Text = model.FontSize;
         IList <EyouSoft.Model.ComStructure.MComAttach> lstFile = model.ComAttachList;
         StringBuilder strFile = new StringBuilder();
         if (null != lstFile && lstFile.Count > 0)
         {
             for (int i = 0; i < lstFile.Count; i++)
             {
                 strFile.AppendFormat("<span  class='upload_filename'><a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}' target='_blank'>{1}</a></span>", lstFile[i].FilePath, lstFile[i].Name);
             }
         }
         this.lbFiles.Text = strFile.ToString();
         if (model.GovDocumentsApproveList != null && model.GovDocumentsApproveList.Count > 0)
         {
             this.rpt_approve.DataSource = model.GovDocumentsApproveList;
             this.rpt_approve.DataBind();
             if (model.GovDocumentsApproveList.Where(item => (item.ApproveID) == this.SiteUserInfo.UserId).ToList().Count > 0)
             {
                 this.ph_Flies.Visible = true;
             }
             else
             {
                 this.ph_Flies.Visible = false;
             }
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 页面初始化
 /// </summary>
 /// <param name="id">操作ID</param>
 protected void PageInit(string id)
 {
     #region 用户控件初始化
     this.SingleFileUpload1.CompanyID = this.SiteUserInfo.CompanyId;
     #endregion
     if (!string.IsNullOrEmpty(id))
     {
         EyouSoft.Model.GovStructure.MGovDocuments model = new EyouSoft.Model.GovStructure.MGovDocuments();
         EyouSoft.BLL.GovStructure.BDocuments      BLL   = new EyouSoft.BLL.GovStructure.BDocuments();
         model = BLL.GetGovFilePersonnelModel(id);
         if (model != null)
         {
             this.hidKeyId.Value   = model.DocumentsId;
             this.txtfileSize.Text = model.FontSize;
             this.txtcompany.Text  = model.Company;
             this.txttitle.Text    = model.Title;
             //审批或传阅
             this.shenpi.Checked   = model.FileType == FileType.审批;
             this.chuanyue.Checked = model.FileType == FileType.阅;
             //经办人
             this.HrSelect1.HrSelectID   = model.AttnId;
             this.HrSelect1.HrSelectName = model.AttnName;
             //审批人
             this.SellsSelect1.SellsID   = GetSells(model.GovDocumentsApproveList, 1);
             this.SellsSelect1.SellsName = GetSells(model.GovDocumentsApproveList, 2);
             StringBuilder strFile = new StringBuilder();
             IList <EyouSoft.Model.ComStructure.MComAttach> lstFile = model.ComAttachList;
             if (null != lstFile && lstFile.Count > 0)
             {
                 for (int i = 0; i < lstFile.Count; i++)
                 {
                     strFile.AppendFormat("<span  class='upload_filename'><a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"PageJsData.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{1}|{0}'/></span>", lstFile[i].FilePath, lstFile[i].Name);
                 }
             }
             this.lbFiles.Text = strFile.ToString();//附件
             if (!this.SiteUserInfo.IsHandleElse && this.SiteUserInfo.UserId != model.OperatorID)
             {
                 this.ph_Save.Visible = false;
             }
         }
     }
 }