コード例 #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(',');
        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));
    }
コード例 #2
0
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
     if (txtmid.Text == "dbsy" || txtmid.Text == "dysy" || txtmid.Text == "ybsy" || txtmid.Text == "yysy")
     {
         HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
         Hyoa_dbsy.ID = this.txtuids.Value;
         Hyoa_dbsy.Delete();
     }
     if (this.Request.QueryString["mid"] == "mail")
     {
         HyoaClass.Hyoa_mail Hyoa_mail = new HyoaClass.Hyoa_mail();
         Hyoa_mail.ID = this.txtuids.Value;
         Hyoa_mail.Delete();
     }
     if (this.Request.QueryString["mid"] == "Mudelrcap")
     {
         string sql = "delete from hyc_Tablercap where DOCID='" + this.txtuids.Value + "'";
         Hyoa_global.ExcuteSQL(sql);
         //删除文档时将待办事宜删除start
         HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
         Hyoa_dbsy.DOCID = this.txtuids.Value;
         Hyoa_dbsy.Deletebydocid(this.txtuids.Value);
         //删除文档时将待办事宜删除end
     }
     if (this.Request.QueryString["mid"] == "Mudelgrtxl" || this.Request.QueryString["mid"] == "Mudelgrtxllb" || this.Request.QueryString["mid"] == "Mudeltzgg" || this.Request.QueryString["mid"] == "Mudelgzrz" || this.Request.QueryString["mid"] == "Mudelqjsq")
     {
         string sql = "delete from hyc_" + this.Request.QueryString["tableid"] + " where DOCID='" + this.txtuids.Value + "'";
         Hyoa_global.ExcuteSQL(sql);
     }
     if (this.Request.QueryString["mid"] == "gwk")
     {
         string sql = "delete from hyp_gwk where ID='" + this.txtuids.Value + "'";
         Hyoa_global.ExcuteSQL(sql);
     }
     this.txtuids.Value = "";
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
コード例 #3
0
ファイル: list_bh.aspx.cs プロジェクト: wjszxli/hyoav10_gdcrm
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     //HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
     HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
     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();
             string lssqldel = "delete hyc_" + this.txttableid.Value + " where DOCID='" + v_uids[i] + "'";
             Hyoa_global.ExcuteSQL(lssqldel);
             //删除文档时将待办事宜删除start
             HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
             Hyoa_dbsy.DOCID = v_uids[i];
             Hyoa_dbsy.Deletebydocid(v_uids[i]);
             //删除文档时将待办事宜删除end
         }
     }
     this.txtuids.Value = "";
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
コード例 #4
0
ファイル: list_zb.aspx.cs プロジェクト: wjszxli/hyoav10_gdcrm
    protected void btndelinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        String[] v_uids = this.txtuids.Value.Split(',');
        string ls_filepath = "";
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                string sql = "delete from hyc_" + txttableid.Value + " where DOCID='" + v_uids[i] + "'";
                Hyoa_global.ExcuteSQL(sql);

                //删除文档时将待办事宜删除start
                HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
                Hyoa_dbsy.DOCID = v_uids[i];
                Hyoa_dbsy.Deletebydocid(v_uids[i]);
                //删除文档时将待办事宜删除end

                //删除文档对应的hyp_flowhistoryinfo_cl hyp_flowhistoryinfo_cy start   add by xf 20121016
                HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
                Hyoa_flowhistoryinfo_cl.DOCID = v_uids[i];
                Hyoa_flowhistoryinfo_cl.DeleteByDOCID();
                HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
                Hyoa_flowhistoryinfo_cy.DOCID = v_uids[i];
                Hyoa_flowhistoryinfo_cy.DeleteByDOCID();
                //删除文档对应的hyp_flowhistoryinfo_cl hyp_flowhistoryinfo_cy 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

                //生成删除日志 start
                string ls_oppcontent = "表名:hyc_" + txttableid.Value + ";文档ID:" + v_uids[i] + "被删除。";
                HyoaClass.Hyoa_log Hyoa_log = new HyoaClass.Hyoa_log();
                Hyoa_log.ID = System.Guid.NewGuid().ToString();
                Hyoa_log.hy_createtime = System.DateTime.Now.ToString();
                string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
                if (userip == null || userip == "")
                {
                    userip = Request.ServerVariables["REMOTE_ADDR"];
                }
                Hyoa_log.hy_oppip = userip;
                Hyoa_log.hy_opptype = "删除";
                Hyoa_log.hy_oppcontent = ls_oppcontent;
                Hyoa_log.hy_oppuserid = this.Session["hyuid"].ToString();
                Hyoa_log.hy_oppusername = this.Session["hyuname"].ToString();
                Hyoa_log.Insert();
                //生成删除日志end

            }
        }
        this.txtuids.Value = "";
        //DataPlay(1);
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
コード例 #5
0
    protected void btndelinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_wjcd Hyoa_wjcd = new HyoaClass.Hyoa_wjcd();
        String[] v_uids = this.txtuids.Value.Split(',');
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {

                HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                string ls_fssql = "select * from hyp_wjcd where hy_type='发件' and ID='" + v_uids[i] + "' ";
                DataTable dt_fs = Hyoa_global.GetDataTable(ls_fssql);
                if (dt_fs.Rows.Count > 0)
                {
                    //得到属于此发件的所有收件
                    string ls_sjsql = "select * from hyp_wjcd where hy_type='收件' and DOCID='" + dt_fs.Rows[0]["DOCID"].ToString() + "' ";
                    DataTable dt_sj = Hyoa_global.GetDataTable(ls_sjsql);
                    if (dt_sj.Rows.Count > 0)
                    {
                        for (var j = 0; j < dt_sj.Rows.Count; j++)
                        {
                            //删除文档时将收件人的待办事宜删除start
                            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
                            Hyoa_dbsy.DOCID = dt_sj.Rows[j]["ID"].ToString();
                            Hyoa_dbsy.Deletebydocid(dt_sj.Rows[j]["ID"].ToString());
                            //删除文档时将收件人的待办事宜删除end
                            //删除文档时将收件删除start
                            string ls_sjdel = "delete from hyp_wjcd where ID='" + dt_sj.Rows[j]["ID"].ToString() + "' ";
                            Hyoa_global.ExcuteSQL(ls_sjdel);
                            //删除文档时将收件删除end
                        }
                    }

                }

                Hyoa_wjcd.ID = v_uids[i];
                Hyoa_wjcd.Delete();

                //生成删除日志 start
                string ls_oppcontent = "工作联系单(已发送的);文档ID:" + v_uids[i] + "被删除。同时该工作联系单的所有收件已删除。";
                HyoaClass.Hyoa_log Hyoa_log = new HyoaClass.Hyoa_log();
                Hyoa_log.ID = System.Guid.NewGuid().ToString();
                Hyoa_log.hy_createtime = System.DateTime.Now.ToString();
                string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
                if (userip == null || userip == "")
                {
                    userip = Request.ServerVariables["REMOTE_ADDR"];
                }
                Hyoa_log.hy_oppip = userip;
                Hyoa_log.hy_opptype = "删除";
                Hyoa_log.hy_oppcontent = ls_oppcontent;
                Hyoa_log.hy_oppuserid = this.Session["hyuid"].ToString();
                Hyoa_log.hy_oppusername = this.Session["hyuname"].ToString();
                Hyoa_log.Insert();
                //生成删除日志end
            }

        }
        this.txtuids.Value = "";
        //DataPlay(1);
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
コード例 #6
0
ファイル: list_yk.aspx.cs プロジェクト: wjszxli/hyoav10_gdcrm
    protected void btndelinfo_my_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        String[] v_uids = this.txtuids.Value.Split(',');
        string ls_filepath = "";
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                //判断是否是当前用户的文档
                string sql = "select * from hyc_" + txttableid.Value + " where DOCID='" + v_uids[i] + "'";
                DataTable dt_judge = Hyoa_global.GetDataTable(sql);
                if (dt_judge.Rows.Count > 0)
                {
                    if (dt_judge.Rows[0]["hy_djrid"].ToString() == Session["hyuid"].ToString())
                    {
                        sql = "delete from hyc_" + txttableid.Value + " where DOCID='" + v_uids[i] + "'";
                        Hyoa_global.ExcuteSQL(sql);

                        //删除文档时将待办事宜删除start
                        HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
                        Hyoa_dbsy.DOCID = v_uids[i];
                        Hyoa_dbsy.Deletebydocid(v_uids[i]);
                        //删除文档时将待办事宜删除end

                        //删除文档对应的hyp_flowhistoryinfo_cl hyp_flowhistoryinfo_cy start   add by xf 20121016
                        HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
                        Hyoa_flowhistoryinfo_cl.DOCID = v_uids[i];
                        Hyoa_flowhistoryinfo_cl.DeleteByDOCID();
                        HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
                        Hyoa_flowhistoryinfo_cy.DOCID = v_uids[i];
                        Hyoa_flowhistoryinfo_cy.DeleteByDOCID();
                        //删除文档对应的hyp_flowhistoryinfo_cl hyp_flowhistoryinfo_cy 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));
    }
コード例 #7
0
    private void DataPlay()
    {
        //hy_json = "{\"success\":true,\"total\":\"60\",\"rows\":[{\"hy_mudelid\":\"111\",\"hy_mudelname\":\"1111\",\"hy_roleid\":\"111111\",\"hy_qqroleid\":\"111111\",\"hy_isenabled\":\"111111\"}]}";
        string hy_json = "";
        string ls_success = "true";    //调用方法成功
        string ls_flag = "0";   //删除失败
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        string txtuids = "";
        if (this.Request.Form["txtuids"] != null)
            txtuids = this.Request.Form["txtuids"].ToString();

        string txttableid = "";
        if (this.Request.Form["txttableid"] != null)
            txttableid = this.Request.Form["txttableid"].ToString();

        String[] v_uids = txtuids.Split(',');
        string ls_filepath = "";
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                string sql = "delete from hyc_" + txttableid + " where DOCID='" + v_uids[i] + "'";
                Hyoa_global.ExcuteSQL(sql);

                //删除文档时将待办事宜删除start
                HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
                Hyoa_dbsy.DOCID = v_uids[i];
                Hyoa_dbsy.Deletebydocid(v_uids[i]);
                //删除文档时将待办事宜删除end

                //删除文档对应的hyp_flowhistoryinfo_cl hyp_flowhistoryinfo_cy start   add by xf 20121016
                HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
                Hyoa_flowhistoryinfo_cl.DOCID = v_uids[i];
                Hyoa_flowhistoryinfo_cl.DeleteByDOCID();
                HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
                Hyoa_flowhistoryinfo_cy.DOCID = v_uids[i];
                Hyoa_flowhistoryinfo_cy.DeleteByDOCID();
                //删除文档对应的hyp_flowhistoryinfo_cl hyp_flowhistoryinfo_cy 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

                //生成删除日志 start
                string ls_oppcontent = "表名:hyc_" + txttableid + ";文档ID:" + v_uids[i] + "被删除。";
                HyoaClass.Hyoa_log Hyoa_log = new HyoaClass.Hyoa_log();
                Hyoa_log.ID = System.Guid.NewGuid().ToString();
                Hyoa_log.hy_createtime = System.DateTime.Now.ToString();
                string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
                if (userip == null || userip == "")
                {
                    userip = Request.ServerVariables["REMOTE_ADDR"];
                }
                Hyoa_log.hy_oppip = userip;
                Hyoa_log.hy_opptype = "删除";
                Hyoa_log.hy_oppcontent = ls_oppcontent;
                Hyoa_log.hy_oppuserid = this.Session["hyuid"].ToString();
                Hyoa_log.hy_oppusername = this.Session["hyuname"].ToString();
                Hyoa_log.Insert();
                //生成删除日志end
                ls_flag = "1";
            }
        }
        hy_json = "{\"success\":" + ls_success + ",\"flag\":\"" + ls_flag + "\"}";
        Response.Write(hy_json);
    }