Esempio n. 1
0
    protected void btndelinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        HyoaClass.Hyoa_user_detail Hyoa_user_detail = new HyoaClass.Hyoa_user_detail();
        String[] v_uids = this.txtuids.Value.Split(',');
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                //写删除人员系统日志start
                DataTable dtuser = Hyoa_user.Getuser(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 = dtuser.Rows[0]["hy_username"].ToString() + "被删除";
                Hyoa_log.hy_oppuserid = this.Session["hyuid"].ToString();
                Hyoa_log.hy_oppusername = this.Session["hyuname"].ToString();
                Hyoa_log.Insert();
                //写删除人员系统日志end
                Hyoa_user.hy_userid = v_uids[i];
                Hyoa_user.Delete();
                Hyoa_user_detail.hy_userid = v_uids[i];
                Hyoa_user_detail.Delete();

            }
        }
        this.txtuids.Value = "";
        //DataPlay(1);
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }