Esempio n. 1
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            switch (e.CommandName)
            {
            case "Del":
                int  agentId   = Convert.ToInt32(e.CommandArgument);
                bool extits    = new BLL.AgentInfo().Exists(" HigherLevel='" + agentId + "'");
                bool extitsvip = new BLL.GameUserInfo().extitsvip(" GUParentUserID='" + agentId + "'");
                if (extits || extitsvip)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('该代理存在下级代理或会员,请亲转移或者删除下级代理或者会员在做操作')</script>");
                }
                else
                {
                    new BLL.AgentInfo().Delete(agentId);

                    AgentBind("");
                }
                break;

            case "AgShift":
                int agId = Convert.ToInt32(e.CommandArgument);
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>showTipsWindown('代理转移','AgShift.aspx?id=" + agId + "',380,200)</script>");
                break;

            case "Update":
                int uageId = Convert.ToInt32(e.CommandArgument);
                Response.Redirect("UpdateAgent.aspx?id=" + uageId + "");
                break;
            }
        }
Esempio n. 2
0
 protected void btnSava_Click(object sender, EventArgs e)
 {
     try
     {
         if (!string.IsNullOrEmpty(Request.QueryString["id"]))
         {
             int             vipId = Convert.ToInt32(Request.QueryString["id"]);
             Model.AgentInfo ag    = new BLL.AgentInfo().GetModel(txtAgentAccount.Text.Trim());
             if (ag == null)
             {
                 Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('亲,转移的代理不存在,请重新输入帐号')</script>");
             }
             else
             {
                 Model.GameUserInfo gu = new Model.GameUserInfo();
                 gu.GUUserID       = vipId;
                 gu.GUParentUserID = ag.AgentID;
                 bool result = new BLL.GameUserInfo().VIPShift(gu);
                 if (result)
                 {
                     Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('会员转移成功')</script>");
                 }
                 else
                 {
                     Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('会员转移失败')</script>");
                 }
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 3
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            switch (e.CommandName)
            {
            case "Del":
                int dvipId = Convert.ToInt32(e.CommandArgument);
                new BLL.GameUserInfo().Delete(dvipId);
                VIPBind();
                break;

            case "VIPShift":
                int svipId = Convert.ToInt32(e.CommandArgument);
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>showTipsWindown('会员转移','VIPShift.aspx?id=" + svipId + "',380,200)</script>");
                break;

            case "Update":
                int uvipId = Convert.ToInt32(e.CommandArgument);
                Response.Redirect("UpdateVIP.aspx?id=" + uvipId + "");
                break;

            case "VIPPB":
                int  pvipId = Convert.ToInt32(e.CommandArgument);
                bool iscz   = new BLL.BlackList().Exists(pvipId);
                if (iscz)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('黑名单已存在,不能重复拉黑')</script>");
                }
                else
                {
                    Model.GameUserInfo guser = new BLL.GameUserInfo().GetModel(pvipId);
                    Model.BlackList    bl    = new Model.BlackList();
                    bl.ViPId           = pvipId;
                    bl.Account         = guser.GUAccount;
                    bl.Email           = guser.GUEmail;
                    bl.LoginIP         = "";
                    bl.QQ              = "";
                    bl.RealName        = guser.GUExtend_RealName;
                    bl.MobilePhone     = guser.GUTel;
                    bl.BankInformation = " 银行游戏豆:'" + guser.GUExtend_Score2 + "', 银行金币:'" + guser.GUExtend_Money2 + "' , 银行奖券: '" + guser.GUExtend_Lottery2 + "' , 银行密码:'" + guser.GUExtend_BandPasswd + "'";
                    int result = new BLL.BlackList().Add(bl);
                    if (result > 0)
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('拉黑成功')</script>");
                    }
                    else
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('拉黑失败')</script>");
                    }
                }

                break;
            }
        }
Esempio n. 4
0
        protected void btnSava_Click(object sender, EventArgs e)
        {
            try
            {
                Model.GameUserInfo guser = new Model.GameUserInfo();
                guser.GUAccount          = txtGUAccount.Text.Trim();
                guser.GUPasswd           = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(txtGUPasswd.Text.Trim(), "MD5");;
                guser.GUEmail            = txtGUEmail.Text.Trim();
                guser.GUName             = txtGUName.Text.Trim();
                guser.GUTel              = txtGUTel.Text.Trim();
                guser.GUExtend_Sex       = Convert.ToInt32(dropsex.SelectedValue);
                guser.GUExtend_Signature = txtGUExtend_Signature.Text.Trim();
                guser.GUExtend_Birthday  = GetConversion(txtGUExtend_Birthday.Text.Trim());
                guser.GUExtend_RealName  = txtGUExtend_RealName.Text;
                guser.GUExtend_Address   = txtGUExtend_Address.Text;
                guser.GUExtend_IDCardNo  = txtGUExtend_IDCardNo.Text;
                guser.GURegisterTime     = GetConversion(DateTime.Now.ToString());
                if (Session["manager"] != null)
                {
                    Model.AgentInfo agent = new BLL.AgentInfo().GetModel(txtAgentAccount.Text.Trim());
                    if (agent == null)
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('代理不存在,请重新输入')</script>");
                        return;
                    }
                    else
                    {
                        guser.GUParentUserID = agent.AgentID;
                    }
                }
                else if (Session["Agent"] != null)
                {
                    guser.GUParentUserID = ((Model.AgentInfo)Session["Agent"]).AgentID;
                }


                int result = new BLL.GameUserInfo().Add(guser);
                if (result > 0)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('保存成功')</script>");
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('保存失败')</script>");
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Esempio n. 5
0
        protected void btnSava_Click(object sender, EventArgs e)
        {
            try
            {
                int vipId             = Convert.ToInt32(Request.QueryString["id"]);
                Model.GameUserInfo gu = new Model.GameUserInfo();
                gu.GUUserID           = vipId;
                gu.GUAccount          = txtGUAccount.Text.Trim();
                gu.GUName             = txtGUName.Text.Trim();
                gu.GUEmail            = txtGUEmail.Text.Trim();
                gu.GUTel              = txtGUTel.Text.Trim();
                gu.GUExtend_RealName  = txtGUExtend_RealName.Text.Trim();
                gu.GUExtend_IDCardNo  = txtGUExtend_IDCardNo.Text.Trim();
                gu.GUExtend_Address   = txtGUExtend_Address.Text.Trim();
                gu.GUExtend_Signature = txtGUExtend_Signature.Text;
                gu.GUExtend_Sex       = Convert.ToInt32(dropsex.SelectedValue);
                gu.GUExtend_Address   = txtGUExtend_Address.Text.Trim();
                gu.GUExtend_Birthday  = GetConversion(txtGUExtend_Birthday.Text);
                gu.GUParentUserID     = (new BLL.AgentInfo().GetModel(txtAgentAccount.Text.Trim()).AgentID);
                if (txtGUPasswd.Text.Trim() != "")
                {
                    gu.GUPasswd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(txtGUPasswd.Text.Trim(), "MD5");
                }
                else
                {
                    Model.GameUserInfo guser = new BLL.GameUserInfo().GetModel(vipId);
                    gu.GUPasswd = guser.GUPasswd;
                }

                bool result = new BLL.GameUserInfo().UpdateVIP(gu);
                if (result)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('保存成功')</script>");
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('保存失败')</script>");
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Esempio n. 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack)
     {
         return;
     }
     if (!string.IsNullOrEmpty(Request.QueryString["id"]))
     {
         int vipId = Convert.ToInt32(Request.QueryString["id"]);
         Model.GameUserInfo guser = new BLL.GameUserInfo().GetModel(vipId);
         txtGUAccount.Text          = guser.GUAccount;
         txtGUEmail.Text            = guser.GUEmail;
         txtGUExtend_Address.Text   = guser.GUExtend_Address;
         txtGUExtend_IDCardNo.Text  = guser.GUExtend_IDCardNo;
         txtGUExtend_RealName.Text  = guser.GUExtend_RealName;
         txtGUExtend_Signature.Text = guser.GUExtend_Signature;
         txtGUExtend_Birthday.Text  = Convert.ToString(zhtime(guser.GUExtend_Birthday));
         dropsex.SelectedValue      = Convert.ToString(guser.GUExtend_Sex);
         txtGUName.Text             = guser.GUName;
         txtGUTel.Text        = guser.GUTel;
         txtAgentAccount.Text = (new BLL.AgentInfo().GetModel(guser.GUParentUserID).AgentAccount);
     }
 }