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.DOCID = v_uids[i]; Hyoa_flowmain.Delete(); } } this.txtuids.Value = ""; DataPlay(System.Int32.Parse(this.curpage.Text)); }
protected void btndelinfo_Click(object sender, EventArgs e) { HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain(); String[] v_uids = this.txtuids.Value.Split(','); string ls_filepath = ""; for (var i = 0; i < v_uids.Length; i++) { if (v_uids[i] != "") { Hyoa_flowmain.DOCID = v_uids[i]; Hyoa_flowmain.Delete(); //删除文档时将待办事宜删除start HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy(); Hyoa_dbsy.DOCID = v_uids[i]; Hyoa_dbsy.Deletebydocid(v_uids[i]); //删除文档时将待办事宜删除end //删的时候将附件也删除start HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt(); DataTable dtfileatt = Hyoa_fileatt.GetfileattByFatherid(v_uids[i]); if (dtfileatt.Rows.Count > 0) { for (int k = 0; k < dtfileatt.Rows.Count; k++) { ls_filepath = Server.MapPath("~/") + dtfileatt.Rows[k]["hy_filepath"].ToString(); if (File.Exists(ls_filepath)) { System.IO.File.Delete(ls_filepath); } Hyoa_fileatt.ID = dtfileatt.Rows[k]["ID"].ToString(); Hyoa_fileatt.Delete(); } } //删的时候将附件也删除end } } this.txtuids.Value = ""; //DataPlay(1); DataPlay(System.Int32.Parse(this.curpage.Text)); }