Exemple #1
0
        protected void btnPublish_Click(object sender, EventArgs e)
        {
            if (txtAccounts.Text.Trim() != "")
            {
                Message umsg = accountsFacade.IsAccountsExist(CtrlHelper.GetText(txtAccounts));
                if (umsg.Success)
                {
                    Show("您输入的用户名不存在,请重新输入!");
                    this.txtAccounts.Text = "";
                    return;
                }
            }

            GameFeedbackInfo info = new GameFeedbackInfo();

            info.Accounts        = txtAccounts.Text.Trim();
            info.FeedbackContent = TextFilter.FilterScript(txtContent.Text.Trim()).Replace("'", "\\'");
            info.FeedbackTitle   = TextFilter.FilterScript(txtTitle.Text.Trim());
            info.ClientIP        = GameRequest.GetUserIP();

            Message msg = webFacade.PublishFeedback(info);

            if (msg.Success)
            {
                ShowAndRedirect("感谢您的问题反馈,我们将尽快给予回复,敬请留意!", "/Service/FeedbackList.aspx");
            }
            else
            {
                Show(msg.Content);
            }
        }
Exemple #2
0
        /// <summary>
        /// 注册按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnRegister_Click(object sender, EventArgs e)
        {
            if (TextUtility.EmptyTrimOrNull(txtAccounts.Text.Trim()) || TextUtility.EmptyTrimOrNull(txtLogonPass.Text.Trim()))
            {
                Show("抱歉!您输入的用户名或密码错误了。");
                this.txtAccounts.Focus();
                return;
            }

            //验证码错误
            if (!txtCode.Text.Trim().Equals(Fetch.GetVerifyCode(), StringComparison.InvariantCultureIgnoreCase))
            {
                Show("抱歉!您输入的验证码错误了。");
                this.txtAccounts.Focus();
                return;
            }

            Message umsg = accountsFacade.IsAccountsExist(CtrlHelper.GetText(txtAccounts));

            if (!umsg.Success)
            {
                Show(umsg.Content);
                this.txtAccounts.Focus();
                return;
            }

            UserInfo user = new UserInfo();

            user.Accounts      = CtrlHelper.GetText(txtAccounts);
            user.Compellation  = CtrlHelper.GetText(txtCompellation);
            user.FaceID        = Convert.ToInt16(hfFaceID.Value.Trim());
            user.Gender        = Convert.ToByte(ddlGender.SelectedValue);
            user.InsurePass    = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtInsurePass1));
            user.LastLogonDate = DateTime.Now;
            user.LastLogonIP   = GameRequest.GetUserIP();
            user.LogonPass     = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtLogonPass));
            user.NickName      = CtrlHelper.GetText(txtNickname);
            user.PassPortID    = CtrlHelper.GetText(txtPassPortID);
            user.RegisterDate  = DateTime.Now;
            user.RegisterIP    = GameRequest.GetUserIP();

            Message msg = accountsFacade.Register(user, CtrlHelper.GetText(txtSpreader));

            if (msg.Success)
            {
                UserInfo ui = msg.EntityList[0] as UserInfo;
                ui.LogonPass = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtLogonPass));
                Fetch.SetUserCookie(ui.ToUserTicketInfo( ));

                ShowAndRedirect("注册成功!", "/Member/MIndex.aspx");
            }
            else
            {
                Show(msg.Content);
                this.txtAccounts.Focus();
            }
        }
Exemple #3
0
        public string CheckName(string userName)
        {
            Message umsg = accountFacade.IsAccountsExist(userName);

            if (umsg.Success)
            {
                return("{success:'success'}");
            }
            return("{success:'error',msg:'" + umsg.Content + "'}");
        }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //检查
            if (accounts == "")
            {
                Response.Write(1);
                return;
            }
            else
            {
                Message umsg = accountsFacade.IsAccountsExist(accounts);
                if (umsg.Success)
                {
                    Response.Write(1);
                    return;
                }
            }

            //逻辑处理
            GameFeedbackInfo info = new GameFeedbackInfo();

            info.Accounts        = accounts;
            info.FeedbackTitle   = TextFilter.FilterScript(content);
            info.FeedbackContent = TextFilter.FilterScript(content);
            info.ClientIP        = GameRequest.GetUserIP();
            Message msg = webFacade.PublishFeedback(info);

            if (msg.Success)
            {
                Response.Write(0);
            }
            else
            {
                Response.Write(1);
            }
        }