protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); try { //��ȡURL���ݲ��� string strMode = this.Request.QueryString["mode"] == null ? "" : this.Request.QueryString["mode"].ToString(); string strID = this.Request.QueryString["id"] == null ? "" : this.Request.QueryString["id"].ToString(); //���ÿؼ�״̬ setControlStatus(strMode); // ��ȡҳ��������Ϣ if (!strMode.Equals("") && !strMode.Equals("add") && !strID.Equals("")) { MasterDataBLL bll = new MasterDataBLL(); ERS.BulletinDataTable dt = bll.GetBulletinById(Convert.ToInt32(strID)); if (dt != null && dt.Count > 0) { ERS.BulletinRow dr = dt[0]; txtTitle.Text = dr.BulletinTitle.ToString(); lblCreator.Text = dr.Creator.ToString(); lblCreateTime.Text = dr.CreateTime.ToString(); txtContent.Text = dr.BulletinContent.ToString(); } } } catch (Exception ex) { PageUtility.DealWithException(this, ex); } }
protected void Page_Load(object sender, EventArgs e) { this.Page.Title = "ϵͳ����"; MasterDataBLL bll = new MasterDataBLL(); ERS.BulletinRow bulletin = bll.GetBulletinById(int.Parse(Request["ObjectId"]))[0]; this.BulletinTitleLabel.Text = bulletin.BulletinTitle; this.BulletinContentCtl.Text = bulletin.BulletinContent; this.CreateTimeLabel.Text = bulletin.CreateTime.ToString("yyyy-MM-dd"); if (!bulletin.IsAttachFileNameNull()) this.ViewUCFileUpload.AttachmentFileName = bulletin.AttachFileName; if (!bulletin.IsRealAttachFileNameNull()) this.ViewUCFileUpload.RealAttachmentFileName = bulletin.RealAttachFileName; }