Esempio n. 1
0
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
     String[] v_uids = this.txtuids.Value.Split(',');
     for(var i=0;i<v_uids.Length;i++)
     {
         if (v_uids[i] != "")
         {
             Hyoa_flowmain.UpdateReadFlag(v_uids[i], Session["hyuid"].ToString());
         }
     }
     this.txtuids.Value = "";
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
Esempio n. 2
0
 //置为文档已读状态
 private void UpdateReadFlag()
 {
     HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
     Hyoa_flowmain.UpdateReadFlag(this.txtdocid.Value, Session["hyuid"].ToString());
 }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() =="")
            this.Response.Redirect("/login.aspx?url="+this.Request.RawUrl);

        if (!IsPostBack)
        {
            string lssql = "";
            string lsdocid = "";
            string lsmid = "";

            if (this.Request.QueryString["docid"] != null)
            {
                if (this.Request.QueryString["docid"].ToString() != "")
                {
                    lsdocid = this.Request.QueryString["docid"].ToString();
                }
            }
            if (this.Request.QueryString["mid"] != null)
            {
                if (this.Request.QueryString["mid"].ToString() != "")
                {
                    lsmid = this.Request.QueryString["mid"].ToString();
                }
            }
            lssql = "select * from hyp_flowmain where DOCID='" + lsdocid + "'";
            HyoaClass.DAO db = new HyoaClass.DAO();
            DataTable dt = db.GetDataTable(lssql);

            //得到正文内容
            string lsbody = "";
            string lssqlbody = "select * from files where fother='"+lsdocid+"'";
            HyoaClass.DAO db2 = new HyoaClass.DAO();

            DataTable dtbody = db2.GetDataTable(lssqlbody);
            //this.Response.Write("<script>alert('" + dtbody.Rows.Count  + "');</script>");
            if (dtbody.Rows.Count > 0)
            {
                lsbody = "<a href='/NTKO/uploadOfficeFile/" + dtbody.Rows[0]["fname"].ToString() + "' target='_blank'>请点击查看正文</a>";
            }

            //得到通知公告附件内容
            string lstzbody = "";
            string lstzsqlbody = "select * from hyp_fileatt where hy_fatherid='" + lsdocid + "'";
            HyoaClass.DAO dbtz2 = new HyoaClass.DAO();

            DataTable dttzbody = dbtz2.GetDataTable(lstzsqlbody);
            //this.Response.Write("<script>alert('" + dtbody.Rows.Count  + "');</script>");
            if (dttzbody.Rows.Count > 0)
            {
                for (int kk = 0; kk < dttzbody.Rows.Count; kk++)
                {
                    if (kk == 0)
                    {
                        lstzbody = "附件:";
                    }
                    lstzbody += "<a href='" + dttzbody.Rows[kk]["hy_filepath"].ToString() + "' target='_blank'>" + dttzbody.Rows[kk]["hy_filename"].ToString() + "</a><br>";
                }
            }

            if (lsmid == "tzgg")
            {   //判断是哪个模块,因为每个模块的标题、内容字段名称是不一样的
                //通知公告
                this.lblcurpositon.Text = "通知公告";
                this.lbfbr.Text = dt.Rows[0]["hy_djrname"].ToString();
                this.lbfbsj.Text = System.Convert.ToDateTime(dt.Rows[0]["hy_djsj"].ToString()).ToString("yyyy-MM-dd");
                this.lbtitle.Text = dt.Rows[0]["hy_bt"].ToString();
                this.lbbody.Text = dt.Rows[0]["hy_content1"].ToString();
                this.lbbody.Text += "<br>" + lstzbody;
            }
            if (lsmid == "xxgl")
            {   //判断是哪个模块,因为每个模块的标题、内容字段名称是不一样的
                //信息管理
                this.lblcurpositon.Text = "信息管理";
                this.lbfbr.Text = dt.Rows[0]["hy_djrname"].ToString();
                this.lbfbsj.Text = System.Convert.ToDateTime(dt.Rows[0]["hy_djsj"].ToString()).ToString("yyyy-MM-dd");
                this.lbtitle.Text = dt.Rows[0]["hy_bt"].ToString();
                //this.lbbody.Text = dt.Rows[0]["hy_content1"].ToString();
                this.lbbody.Text = lsbody;
                this.lbbody.Text += "<br>" + lstzbody;
            }
            //置为已阅
            HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
            Hyoa_flowmain.UpdateReadFlag(lsdocid, Session["hyuid"].ToString());

            hy_GetCopyrightinfo();

        }
    }