protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { string ID = Request["ID"];//获取到公文的ID docFomModel = docFromBll.GetModel(ID); docFomModel.ISREAD = 1; docFomModel.READTIME = DateTime.Now; if (docFomModel.FILEPATH.Length > 0) { Label_fileup.Text = "<a href='" + docFomModel.FILEPATH + "' target='_blank'>点击下载附件</a>"; } else { Label_fileup.Text = "此公文无附件"; } Label_title.Text = docFomModel.TITLES.ToString(); docFromBll.Update(docFomModel); } catch { } } }
/// <summary> /// 删除用户操作 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Button_del_Click(object sender, EventArgs e) { try { string UID = Request["ID"]; docFomModel = docFromBll.GetModel(UID); docFomModel.DELFLAG = 1; docFromBll.Update(docFomModel); tag.Text = "操作成功!"; Button_del.Visible = false; } catch { tag.Text = "操作失败!"; } }