Esempio n. 1
0
    protected void btndelinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_gwksc Hyoa_gwksc = new HyoaClass.Hyoa_gwksc();
        String[] v_uids = this.txtuids.Value.Split(',');

        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                Hyoa_gwksc.ID = v_uids[i];
                Hyoa_gwksc.Delete();
            }
        }
        this.txtuids.Value = "";
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
Esempio n. 2
0
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_gwk Hyoa_gwk = new HyoaClass.Hyoa_gwk();
     HyoaClass.Hyoa_gwksc Hyoa_gwksc = new HyoaClass.Hyoa_gwksc();
     String[] v_uids = this.txtuids.Value.Split(',');
     for (var i = 0; i < v_uids.Length; i++)
     {
         if (v_uids[i] != "")
         {
             Hyoa_gwk.ID = v_uids[i];
             Hyoa_gwk.Delete();
             //删除公文的同时删除我的收藏中对应的公文记录
             Hyoa_gwksc.gwk_id = v_uids[i];
             Hyoa_gwksc.DeleteBygwkid();
             //删除当前记录对应的附件(公文库中新增的附件)
             HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
             DataTable dtfileatt = Hyoa_fileatt.GetfileattByFatherid(v_uids[i]);
             if (dtfileatt.Rows.Count > 0)
             {
                 string ls_filepath = "";
                 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();
                 }
             }
         }
     }
     this.txtuids.Value = "";
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
Esempio n. 3
0
    //收藏
    protected void btnscinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_gwksc Hyoa_gwksc = new HyoaClass.Hyoa_gwksc();
        String[] v_uids = this.txtuids.Value.Split(',');

        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                Hyoa_gwksc.ID = Hyoa_global.GetRandom();
                Hyoa_gwksc.gwk_id = v_uids[i];
                Hyoa_gwksc.myclass_id = this.txtsctypeid.Value;
                Hyoa_gwksc.myuserid = Session["hyuid"].ToString();
                Hyoa_gwksc.Insert();
            }
        }
        this.txtuids.Value = "";
        this.Response.Write("<script>alert('收藏成功!');</script>");
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }