protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_ntkotemplateFile Hyoa_ntkotemplateFile = new HyoaClass.Hyoa_ntkotemplateFile();
     String[] v_uids = this.txtuids.Value.Split(',');
     for (var i = 0; i < v_uids.Length; i++)
     {
         if (v_uids[i] != "")
         {
             //删除附件
             DataTable dt;
             dt = Hyoa_ntkotemplateFile.GettemplateFile(v_uids[i]);
             if (dt.Rows.Count > 0)
             {
                 string ls_filepath = Server.MapPath("~/") + "NTKO/" + dt.Rows[0]["templateFileurl"].ToString();
                 if (File.Exists(ls_filepath))
                 {
                     System.IO.File.Delete(ls_filepath);
                 }
             }
             Hyoa_ntkotemplateFile.templateFileid = v_uids[i];
             Hyoa_ntkotemplateFile.Delete();
         }
     }
     this.txtuids.Value = "";
     //DataPlay(1);
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
    private void DataPlay()
    {
        if (this.Request.QueryString["op"] != null)
        {
            //判断当前用户是否有新建删除权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            string ls_mudelid = "Mudelfwgl";
            string ls_role = "";
            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            DataTable dt_mudel = Hyoa_mudel.Getmudel(ls_mudelid);
            if (dt_mudel.Rows.Count > 0)
            {
                ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();
            }
            if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
            {
                btn_submit.Visible = true;
            }

            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改
            this.lbupfile.Text = "无附件!";

            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                this.txtdocid.Value = this.Request.QueryString["templateFileid"].ToString();

                HyoaClass.Hyoa_ntkotemplateFile Hyoa_ntkotemplateFile = new HyoaClass.Hyoa_ntkotemplateFile();
                DataTable dt = Hyoa_ntkotemplateFile.GettemplateFile(this.txtdocid.Value);
                string ls_att = "";
                if (dt.Rows.Count > 0)
                {
                    this.SignName.Value = dt.Rows[0]["templateFilename"].ToString();
                    this.Sort.Value = dt.Rows[0]["templateFilesort"].ToString();
                    this.txttemplateFileurl.Value = dt.Rows[0]["templateFileurl"].ToString();
                    if (dt.Rows[0]["templateFileurl"].ToString() != "")
                    {
                        ls_att += "<a href=\"" + dt.Rows[0]["templateFileurl"].ToString() + "\" target=_blank>" + dt.Rows[0]["templateFilename"].ToString() + "</a>";
                    }
                    this.lbupfile.Text = ls_att;
                }
            }
        }
    }