示例#1
0
        /// <summary>
        /// 数据保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            AppPayConfig config = new AppPayConfig();

            if (IntParam > 0)
            {
                AuthUserOperationPermission(Permission.Edit);
                config = FacadeManage.aideTreasureFacade.GetAppPayConfig(IntParam);
            }
            else
            {
                AuthUserOperationPermission(Permission.Add);
            }

            config.AppleID        = CtrlHelper.GetText(txtAppleID);
            config.Diamond        = CtrlHelper.GetInt(txtCurrency, 0);
            config.PayIdentity    = Convert.ToByte(rbIdentity.SelectedValue);
            config.PayName        = CtrlHelper.GetText(txtProductName);
            config.PayPrice       = Convert.ToDecimal(txtPrice.Text);
            config.PayType        = Convert.ToByte(ddlProductType.SelectedValue);
            config.PresentDiamond = CtrlHelper.GetInt(txtOtherPresent, 0);
            config.SortID         = CtrlHelper.GetInt(txtSortID, 0);
            config.ImageType      = Convert.ToByte(rbImage.SelectedValue);

            string where;
            //验证苹果产品标识
            if (config.PayType == 1)
            {
                if (string.IsNullOrEmpty(config.AppleID))
                {
                    ShowError("操作失败,苹果产品标识不能为空");
                    return;
                }
                where = IntParam > 0 ? $"WHERE ConfigID!={IntParam} AND PayType = 1 AND AppleID = '{config.AppleID}'" : $"WHERE PayType = 1 AND AppleID = '{config.AppleID}'";
                if (FacadeManage.aideTreasureFacade.IsExistAppPayConfig(where))
                {
                    ShowError("操作失败,苹果产品标识已存在");
                    return;
                }
            }
            //验证首充是否重复
            if (config.PayIdentity == 2 && IntParam == 0)
            {
                where = $"WHERE PayType = {config.PayType} AND PayIdentity = 2";
                if (FacadeManage.aideTreasureFacade.IsExistAppPayConfig(where))
                {
                    ShowError("操作失败,首充产品仅限配置一个");
                    return;
                }
            }
            int result = IntParam > 0 ? FacadeManage.aideTreasureFacade.UpdateAppPayConfig(config) : FacadeManage.aideTreasureFacade.InsertAppPayConfig(config);

            if (result > 0)
            {
                ShowInfo("配置信息操作成功", "AppPayConfigList.aspx", 1200);
            }
            else
            {
                ShowError("配置信息操作失败");
            }
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (ddlControlStatus.SelectedValue == "0")
            {
                ShowError("请选择控制状态");
                return;
            }
            if (ddlControlType.SelectedValue == "0")
            {
                ShowError("请选择控制类型");
                return;
            }

            AccountsControl model = new AccountsControl();

            model.ActiveDateTime     = Convert.ToDateTime(CtrlHelper.GetText(txtActiveDateTime));
            model.ChangeScore        = Convert.ToInt64(txtChangeScore.Text);
            model.SustainedTimeCount = Convert.ToInt32(txtSustainedTimeCount.Text);
            model.WinRate            = Convert.ToByte(txtWinRate.Text);
            model.ControlStatus      = Convert.ToInt16(ddlControlStatus.SelectedValue);
            model.ControlType        = Convert.ToInt16(ddlControlType.SelectedValue);

            try
            {
                if (IntParam == 0)
                {
                    Game.Entity.Accounts.AccountsInfo accountsInfo;
                    if (ddlAddType.SelectedValue == "0")
                    {
                        model.Accounts = CtrlHelper.GetText(txtUser);
                        accountsInfo   = FacadeManage.aideAccountsFacade.GetAccountInfoByAccount(model.Accounts);
                        if (accountsInfo.UserID == 0)
                        {
                            ShowError("你输入的用户帐号不存在");
                            return;
                        }
                        else
                        {
                            model.UserID   = accountsInfo.UserID;
                            model.Accounts = accountsInfo.Accounts;
                        }
                    }
                    else
                    {
                        int userId = CtrlHelper.GetInt(txtUser, 0);
                        if (userId == 0)
                        {
                            ShowError("输入的用户ID错误");
                            return;
                        }
                        model.Accounts = FacadeManage.aideAccountsFacade.GetAccountByUserID(userId);
                        if (string.IsNullOrEmpty(model.Accounts))
                        {
                            ShowError("你输入的用户ID不存在");
                            return;
                        }
                        model.UserID = userId;
                    }
                    if (FacadeManage.aideAccountsFacade.GetAccountsControl(model.UserID) != null)
                    {
                        ShowError("选择的用户已存在黑白名单之中");
                        return;
                    }
                    FacadeManage.aideAccountsFacade.AddAccountsControl(model);
                }
                else
                {
                    model.UserID = IntParam;
                    FacadeManage.aideAccountsFacade.UpdateAccountsControl(model);
                }
                ShowInfo("操作成功", "AccountsControlList.aspx", 1000);
            }
            catch (Exception ex)
            {
                ShowError("添加失败");
                Response.Write(ex.ToString());
                return;
            }
        }
示例#3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            GlobalPlayPresent present;

            if (IntParam == 0)
            {
                present = new GlobalPlayPresent();
            }
            else
            {
                present = FacadeManage.aidePlatformFacade.GetGlobalPlayPresentInfo(IntParam);
                if (present == null)
                {
                    return;
                }
            }

            StringBuilder sb = new StringBuilder();

            foreach (ListItem item in ckbMemberOrder.Items)
            {
                if (item.Selected)
                {
                    sb.AppendFormat("{0},", item.Value);
                }
            }

            if (IntParam == -3)
            {
                present.ServerID      = IntParam;
                present.PresentMember = "";
            }
            else
            {
                present.ServerID = int.Parse(ddlGameRoom.SelectedValue.ToString());
                if (string.IsNullOrEmpty(sb.ToString()))
                {
                    ShowError("请选择会员类型");
                    return;
                }
                present.PresentMember = sb.ToString().TrimEnd(new char[] { ',' });
            }

            present.MaxPresent        = CtrlHelper.GetInt(txtMaxPresent, 0);
            present.MaxDatePresent    = CtrlHelper.GetInt(txtMaxDatePresent, 0);
            present.CellPlayPresnet   = CtrlHelper.GetInt(txtCellPlayPresnet, 0);
            present.CellPlayTime      = CtrlHelper.GetInt(txtCellPlayTime, 0);
            present.StartPlayTime     = CtrlHelper.GetInt(txtStartPlayTime, 0);
            present.CellOnlinePresent = CtrlHelper.GetInt(txtCellOnlinePresent, 0);
            present.CellOnlineTime    = CtrlHelper.GetInt(txtCellOnlineTime, 0);
            present.StartOnlineTime   = CtrlHelper.GetInt(txtStartOnlineTime, 0);
            present.IsPlayPresent     = (byte)(ckbIsPlayPresent.Checked ? 1 : 0);
            present.IsOnlinePresent   = (byte)(ckbIsOnlinePresent.Checked ? 1 : 0);
            present.CollectDate       = DateTime.Now;
            if (IntParam == 0)
            {
                //判断权限
                AuthUserOperationPermission(Permission.Add);
                if (FacadeManage.aidePlatformFacade.GetGlobalPlayPresentInfo(present.ServerID) != null)
                {
                    ShowError("该房间的泡点设置已存在");
                    return;
                }
                FacadeManage.aidePlatformFacade.InsertGlobalPlayPresent(present);
                ShowInfo("新增成功");
            }
            else
            {
                //判断权限
                AuthUserOperationPermission(Permission.Edit);
                if (FacadeManage.aidePlatformFacade.GetGlobalPlayPresentInfo(present.ServerID) != null && IntParam != present.ServerID)
                {
                    ShowError("该房间的泡点设置已存在");
                    return;
                }
                FacadeManage.aidePlatformFacade.UpdateGlobalPlayPresent(present);
                ShowInfo("更新成功", "GlobalPlayPresentList.aspx", 1000);
            }
        }
        private void ProcessData()
        {
            if (!Utils.Validate.IsPositiveInt(txtDBPort.Text))
            {
                ShowError("端口不规范,端口只能为正整数");
                return;
            }
            DataBaseInfo dataBaseInfo = new DataBaseInfo();

            dataBaseInfo.DBAddr = CtrlHelper.GetText(txtDBAddr);
            dataBaseInfo.DBPort = CtrlHelper.GetInt(txtDBPort, 0);
            dataBaseInfo.DBUser = CWHEncryptNet.XorEncrypt(CtrlHelper.GetText(txtDBUser));
            if (CtrlHelper.GetText(hdfDBPassword) == "********")
            {
                dataBaseInfo.DBPassword = CWHEncryptNet.XorEncrypt(CtrlHelper.GetText(txtDBPassword));
            }
            else
            {
                dataBaseInfo.DBPassword = CtrlHelper.GetText(hdfDBPassword);
            }

            dataBaseInfo.MachineID   = CtrlHelper.GetText(txtMachineID);
            dataBaseInfo.Information = CtrlHelper.GetText(txtInformation);

            Message msg = new Message();

            if (StrCmd == "add")
            {
                //判断权限
                AuthUserOperationPermission(Permission.Add);
                if (FacadeManage.aidePlatformFacade.IsExistsDBAddr(dataBaseInfo.DBAddr))
                {
                    ShowError("地址已经存在");
                    return;
                }
                msg = FacadeManage.aidePlatformFacade.InsertDataBase(dataBaseInfo);
            }
            else
            {
                //判断权限
                AuthUserOperationPermission(Permission.Edit);
                dataBaseInfo.DBInfoID = IntParam;
                msg = FacadeManage.aidePlatformFacade.UpdateDataBase(dataBaseInfo);
            }

            if (msg.Success)
            {
                if (StrCmd == "add")
                {
                    ShowInfo("机器信息增加成功", "DataBaseInfoList.aspx", 1200);
                }
                else
                {
                    ShowInfo("机器信息修改成功", "DataBaseInfoList.aspx", 1200);
                }
            }
            else
            {
                ShowError(msg.Content);
            }
        }
        private void ProcessData()
        {
            if (!IsValid)
            {
                return;
            }
            string kindID = CtrlHelper.GetText(txtKindID);
            string sortID = CtrlHelper.GetText(txtSortID);

            if (!Utils.Validate.IsPositiveInt(kindID))
            {
                ShowError("游戏标识不规范,游戏标识只能为正整数");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(sortID))
            {
                ShowError("排序输入不规范,排序只能为0或正整数");
                return;
            }
            GameKindItem gameKindItem = new GameKindItem();

            gameKindItem.KindID   = Convert.ToInt32(kindID);
            gameKindItem.KindName = CtrlHelper.GetText(txtKindName);
            gameKindItem.TypeID   = Convert.ToInt32(ddlTypeID.SelectedValue.Trim());
            gameKindItem.JoinID   = Convert.ToInt32(ddlJoin.SelectedValue.Trim());

            //计算属性
            int gameFlag = 0;

            if (cblGameFlag.Items.Count > 0)
            {
                foreach (ListItem item in cblGameFlag.Items)
                {
                    if (item.Selected)
                    {
                        gameFlag |= int.Parse(item.Value);
                    }
                }
            }
            gameKindItem.GameFlag    = gameFlag;
            gameKindItem.SortID      = CtrlHelper.GetInt(txtSortID, 0);
            gameKindItem.GameID      = Convert.ToInt32(ddlGameID.SelectedValue.Trim());
            gameKindItem.ProcessName = CtrlHelper.GetText(txtProcessName);
            gameKindItem.GameRuleUrl = CtrlHelper.GetText(txtGameRuleUrl);
            gameKindItem.DownLoadUrl = CtrlHelper.GetText(txtDownLoadUrl);
            gameKindItem.Nullity     = Convert.ToByte(rbtnNullity.SelectedValue.Trim());
            gameKindItem.Recommend   = ckbRecommend.Checked ? 1 : 0;

            Message msg = new Message();

            if (StrCmd == "add")
            {
                //判断权限
                AuthUserOperationPermission(Permission.Add);
                if (FacadeManage.aidePlatformFacade.IsExistsKindID(gameKindItem.KindID))
                {
                    ShowError("游戏标识已经存在");
                    return;
                }
                msg = FacadeManage.aidePlatformFacade.InsertGameKindItem(gameKindItem);
            }
            else
            {
                //判断权限
                AuthUserOperationPermission(Permission.Edit);
                msg = FacadeManage.aidePlatformFacade.UpdateGameKindItem(gameKindItem);
            }

            if (msg.Success)
            {
                //更新游戏配置
                GameConfig gameConfig = new GameConfig();
                gameConfig.KindID            = gameKindItem.KindID;
                gameConfig.NoticeChangeGolds = Convert.ToInt64(txtNoticeChangeGolds.Text);
                gameConfig.WinExperience     = Convert.ToInt32(txtWinExperience.Text.Trim());
                FacadeManage.aidePlatformFacade.UpdateGameConfig(gameConfig);
                if (StrCmd == "add")
                {
                    ShowInfo("游戏信息增加成功", "GameKindItemList.aspx", 1200);
                }
                else
                {
                    ShowInfo("游戏信息修改成功", "GameKindItemList.aspx", 1200);
                }
            }
            else
            {
                ShowError(msg.Content);
            }
        }
示例#6
0
        private void ProcessData()
        {
            string serverName           = CtrlHelper.GetText(txtServerName);           //房间名称
            string sortID               = CtrlHelper.GetText(txtSortID);               //排序
            string tableCount           = CtrlHelper.GetText(txtTableCount);           //桌子数量
            string serverPort           = CtrlHelper.GetText(txtServerPort);           //服务端口
            string cellScore            = CtrlHelper.GetText(txtServerPort);           //单位积分 bigint
            string revenueRatio         = CtrlHelper.GetText(txtRevenueRatio);         //税收比例 tinyint
            string restrictScore        = CtrlHelper.GetText(txtRestrictScore);        //限制积分 bigint
            string minTableScore        = CtrlHelper.GetText(txtMinTableScore);        //最低积分 bigint
            string minEnterScore        = CtrlHelper.GetText(txtMinEnterScore);        //最小进入积分 bigint
            string maxEnterScore        = CtrlHelper.GetText(txtMaxEnterScore);        //最大进入积分 bigint
            string minEnterMember       = CtrlHelper.GetText(txtMinEnterMember);       //最小进入等级
            string maxEnterMember       = CtrlHelper.GetText(txtMaxEnterMember);       //最大进入等级
            string maxPlayer            = CtrlHelper.GetText(txtMaxPlayer);            //最大玩家数目
            string serverRule           = CtrlHelper.GetText(txtServerRule);           //房间规则
            string distributeRule       = CtrlHelper.GetText(txtDistributeRule);       //分组规则
            string minDistributeUser    = CtrlHelper.GetText(txtMinDistributeUser);    //最小人数
            string maxDistributeUser    = CtrlHelper.GetText(txtMaxDistributeUser);    //最大人数
            string distributeTimeSpace  = CtrlHelper.GetText(txtDistributeTimeSpace);  //分组间隔
            string distributeDrawCount  = CtrlHelper.GetText(txtDistributeDrawCount);  //分组局数
            string distributeStartDelay = CtrlHelper.GetText(txtDistributeStartDelay); //开始延时
            string attachUserRight      = CtrlHelper.GetText(txtAttachUserRight);      //附加属性

            #region 数据验证

            if (string.IsNullOrEmpty(serverName))
            {
                ShowError("房间名称必须填写");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(sortID))
            {
                ShowError("排序不规范,排序只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(tableCount))
            {
                ShowError("桌子数量不规范,桌子只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(serverPort))
            {
                ShowError("服务端口不规范,服务端口只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt64(cellScore))
            {
                ShowError("单位积分不规范,单位积分只能为0或正整数");
                return;
            }
            if (!Utils.Validate.IsPositiveInt64(revenueRatio) || Convert.ToInt32(revenueRatio) > 255)
            {
                ShowError("税收比例不规范,单位积分只能为0或正整数,且最大值不能超过255");
                return;
            }
            if (!Utils.Validate.IsPositiveInt64(minTableScore))
            {
                ShowError("最低积分不规范,最低积分只能为0或正整数");
                return;
            }
            if (!Utils.Validate.IsPositiveInt64(minEnterScore))
            {
                ShowError("最小进入积分不规范,最小进入积分只能为0或正整数");
                return;
            }
            if (!Utils.Validate.IsPositiveInt64(maxEnterScore))
            {
                ShowError("最大进入积分不规范,最大进入积分只能为0或正整数");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(minEnterMember))
            {
                ShowError("最小进入等级不规范,最小进入等级只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(maxEnterMember))
            {
                ShowError("最大进入等级不规范,最大进入等级只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(maxPlayer))
            {
                ShowError("最大玩家数目不规范,最大玩家数目只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(serverRule))
            {
                ShowError("房间规则不规范,房间规则只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(distributeRule))
            {
                ShowError("分组规则不规范,分组规则只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(minDistributeUser))
            {
                ShowError("最小人数不规范,最小人数只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(maxDistributeUser))
            {
                ShowError("最大人数不规范,最大人数只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(distributeTimeSpace))
            {
                ShowError("分组间隔不规范,分组间隔只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(distributeDrawCount))
            {
                ShowError("分组局数不规范,分组局数只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(distributeStartDelay))
            {
                ShowError("开始延时不规范,开始延时只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(attachUserRight))
            {
                ShowError("附加属性不规范,附加属性只能为0或正整数,且最大值不能超过2,147,483,647");
                return;
            }
            #endregion

            GameRoomInfo gameRoomInfo = new GameRoomInfo();
            gameRoomInfo.ServerName        = CtrlHelper.GetText(txtServerName);
            gameRoomInfo.KindID            = Convert.ToInt32(ddlKindID.SelectedValue.Trim());
            gameRoomInfo.NodeID            = Convert.ToInt32(ddlNode.SelectedValue.Trim( ));
            gameRoomInfo.SortID            = CtrlHelper.GetInt(txtSortID, 0);
            gameRoomInfo.GameID            = Convert.ToInt32(ddlGameID.SelectedValue.Trim());
            gameRoomInfo.TableCount        = CtrlHelper.GetInt(txtTableCount, 0);
            gameRoomInfo.ServerType        = Convert.ToInt32(ddlServerType.SelectedValue.Trim());
            gameRoomInfo.ServerPort        = CtrlHelper.GetInt(txtServerPort, 0);
            gameRoomInfo.DataBaseName      = CtrlHelper.GetText(txtDataBaseName);
            gameRoomInfo.DataBaseAddr      = ddlDataBaseAddr.SelectedValue.Trim();
            gameRoomInfo.CellScore         = Convert.ToInt64(CtrlHelper.GetInt(txtCellScore, 0));
            gameRoomInfo.RevenueRatio      = Convert.ToByte(CtrlHelper.GetInt(txtRevenueRatio, 0));
            gameRoomInfo.RestrictScore     = Convert.ToInt64(CtrlHelper.GetInt(txtRestrictScore, 0));
            gameRoomInfo.MinTableScore     = Convert.ToInt64(CtrlHelper.GetInt(txtMinTableScore, 0));
            gameRoomInfo.MinEnterScore     = Convert.ToInt64(CtrlHelper.GetInt(txtMinEnterScore, 0));
            gameRoomInfo.MaxEnterScore     = Convert.ToInt64(CtrlHelper.GetInt(txtMaxEnterScore, 0));
            gameRoomInfo.MinEnterMember    = CtrlHelper.GetInt(txtMinEnterMember, 0);
            gameRoomInfo.MaxEnterMember    = CtrlHelper.GetInt(txtMaxEnterMember, 0);
            gameRoomInfo.MaxPlayer         = CtrlHelper.GetInt(txtMaxPlayer, 0);
            gameRoomInfo.ServerRule        = CtrlHelper.GetInt(txtServerRule, 0);
            gameRoomInfo.DistributeRule    = CtrlHelper.GetInt(txtDistributeRule, 0);
            gameRoomInfo.MinDistributeUser = CtrlHelper.GetInt(txtMinDistributeUser, 0);
            //gameRoomInfo.MaxDistributeUser = CtrlHelper.GetInt(txtMaxDistributeUser, 0);
            gameRoomInfo.DistributeTimeSpace = CtrlHelper.GetInt(txtDistributeTimeSpace, 0);
            gameRoomInfo.DistributeDrawCount = CtrlHelper.GetInt(txtDistributeDrawCount, 0);
            //gameRoomInfo.DistributeStartDelay = CtrlHelper.GetInt(txtDistributeStartDelay, 0);
            gameRoomInfo.AttachUserRight = CtrlHelper.GetInt(txtAttachUserRight, 0);
            gameRoomInfo.ServiceMachine  = CtrlHelper.GetText(txtServiceMachine);
            gameRoomInfo.CustomRule      = CtrlHelper.GetText(txtCustomRule);
            gameRoomInfo.Nullity         = Convert.ToByte(rbtnNullity.SelectedValue.Trim());
            gameRoomInfo.ServerNote      = CtrlHelper.GetText(txtServerNote);
            gameRoomInfo.ServiceScore    = 0;
            Message msg = new Message();
            if (StrCmd == "add")
            {
                //判断权限
                AuthUserOperationPermission(Permission.Add);
                msg = FacadeManage.aidePlatformFacade.InsertGameRoomInfo(gameRoomInfo);
            }
            else
            {
                //判断权限
                AuthUserOperationPermission(Permission.Edit);
                gameRoomInfo.ServerID       = IntParam;
                gameRoomInfo.ModifyDateTime = DateTime.Now;
                msg = FacadeManage.aidePlatformFacade.UpdateGameRoomInfo(gameRoomInfo);
            }

            if (msg.Success)
            {
                if (StrCmd == "add")
                {
                    ShowInfo("房间信息增加成功", "GameRoomInfoList.aspx", 1200);
                }
                else
                {
                    ShowInfo("房间信息修改成功", "GameRoomInfoList.aspx", 1200);
                }
            }
            else
            {
                ShowError(msg.Content);
            }
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strReason  = TextFilter.FilterAll(CtrlHelper.GetText(txtReason));
            int    intAddGold = CtrlHelper.GetInt(txtAddGold, 0);

            if (intAddGold == 0)
            {
                MessageBox("赠送金币数不能为零!");
                return;
            }

            if (string.IsNullOrEmpty(strReason))
            {
                MessageBox("赠送原因不能为空");
                return;
            }
            Message msg = aideTreasureFacade.GrantTreasure(StrParamsList, intAddGold, userExt.UserID, strReason, GameRequest.GetUserIP());

            if (msg.Success)
            {
                MessageBox("确认成功");
            }
            else
            {
                string strMessage = "";
                int    intMsgID   = msg.MessageID;
                switch (intMsgID)
                {
                case -3:
                    strMessage = "未选中赠送对象!";
                    break;

                case -2:
                    strMessage = "赠送金额不能为零!";
                    break;

                case -1:
                    strMessage = "抱歉,未知服务器错误!";
                    break;

                default:
                    strMessage = "抱歉,未知服务器错误!";
                    break;
                }

                MessageBox(strMessage);
            }

            /* RecordGrantTreasure grantTreasure = new RecordGrantTreasure( );
             * GameScoreInfo gameScoreInfo = new GameScoreInfo( );
             * grantTreasure.ClientIP = GameRequest.GetUserIP( );
             * grantTreasure.MasterID = userExt.UserID;
             * grantTreasure.AddGold = intAddGold;
             * grantTreasure.Reason = strReason;
             *
             * string[ ] arrUserIDList = StrParamsList.Split( new char[ ] { ',' } );
             * foreach ( string strid in arrUserIDList )
             * {
             *   if ( Utils.Validate.IsPositiveInt( strid ) )
             *   {
             *       gameScoreInfo = aideTreasureFacade.GetGameScoreInfoByUserID( int.Parse( strid ) );
             *       if ( gameScoreInfo == null )
             *           continue;
             *       grantTreasure.UserID = int.Parse( strid );
             *       grantTreasure.CurGold = Convert.ToInt64( aideTreasureFacade.GetGameScoreByUserID( int.Parse( strid ) ) );
             *
             *       gameScoreInfo.InsureScore = grantTreasure.CurGold + intAddGold;
             *
             *       aideTreasureFacade.UpdateInsureScore( gameScoreInfo );          //更新银行金币
             *       aideRecordFacade.InsertRecordGrantTreasure( grantTreasure );    //插入赠送金币日志
             *   }
             * }
             * MessageBox( "确认成功" );*/
        }
示例#8
0
        /// <summary>
        /// 保存修改
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int    gameid         = CtrlHelper.GetInt(txtGameID, 0);
            string Compellation   = CtrlHelper.GetText(txtCompellation);
            string QQAccount      = CtrlHelper.GetText(txtQQAccount);
            string WCNickName     = CtrlHelper.GetText(txtWCNickName);
            string ContactPhone   = CtrlHelper.GetText(txtContactPhone);
            string ContactAddress = CtrlHelper.GetText(txtContactAddress);
            string AgentDomain    = CtrlHelper.GetText(txtAgentDomain);
            string AgentNote      = CtrlHelper.GetText(txtAgentNote);

            if (gameid <= 0)
            {
                ShowInfo("抱歉,添加代理游戏ID不能为空");
                return;
            }
            if (string.IsNullOrEmpty(Compellation))
            {
                ShowInfo("抱歉,真实姓名不能为空");
                return;
            }
            if (string.IsNullOrEmpty(QQAccount))
            {
                ShowInfo("抱歉,QQ账号不能为空");
                return;
            }
            if (string.IsNullOrEmpty(WCNickName))
            {
                ShowInfo("抱歉,微信昵称不能为空");
                return;
            }
            if (string.IsNullOrEmpty(ContactPhone))
            {
                ShowInfo("抱歉,联系电话不能为空");
                return;
            }
            if (!Utils.Validate.IsMobileCode(ContactPhone))
            {
                ShowInfo("抱歉,联系电话格式不正确");
                return;
            }
            if (string.IsNullOrEmpty(ContactAddress))
            {
                ShowInfo("抱歉,联系地址不能为空");
                return;
            }
            if (string.IsNullOrEmpty(AgentDomain))
            {
                ShowInfo("抱歉,代理域名不能为空");
                return;
            }

            AccountsInfo account = FacadeManage.aideAccountsFacade.GetAccountsInfoByGameID(gameid);

            if (account == null)
            {
                ShowInfo("抱歉,添加代理异常,请稍后重试");
                return;
            }
            if (!string.IsNullOrEmpty(account.Compellation) && !account.Compellation.Equals(Compellation))
            {
                ShowInfo("抱歉,真实姓名与实名认证不一致");
                return;
            }
            if (!account.NickName.Equals(WCNickName))
            {
                ShowInfo("抱歉,微信昵称与真实昵称不一致");
                return;
            }

            AccountsAgentInfo info = new AccountsAgentInfo();

            info.AgentDomain    = AgentDomain;
            info.AgentNote      = AgentNote;
            info.Compellation   = Compellation;
            info.ContactAddress = ContactAddress;
            info.ContactPhone   = ContactPhone;
            info.QQAccount      = QQAccount;
            info.WCNickName     = WCNickName;

            Message msg = FacadeManage.aideAccountsFacade.InsertAgentUser(userTicket.UserID, info, gameid);

            if (msg.Success)
            {
                Response.Redirect("/Card/Success.aspx?t=1001");
            }
            else
            {
                ShowInfo(msg.Content);
            }
        }
示例#9
0
        private void ProcessData()
        {
            int    gameID        = CtrlHelper.GetInt(txtGameID, 0);
            string accounts      = "";
            int    userID        = 0;
            string compellation  = CtrlHelper.GetText(txtCompellation);
            string domain        = CtrlHelper.GetText(txtDomain);
            int    agentType     = Convert.ToInt32(rblAgentType.SelectedValue.Trim());
            int    agentScale    = CtrlHelper.GetInt(txtAgentScale, 0);
            int    dayBackAllPay = CtrlHelper.GetInt(txtDayBackAllPay, 0);
            int    dayBackScale  = CtrlHelper.GetInt(txtDayBackScale, 0);
            string mobilePhone   = CtrlHelper.GetText(txtMobilePhone);
            string eMail         = CtrlHelper.GetText(txtEMail);
            string dwellingPlace = CtrlHelper.GetText(txtDwellingPlace);
            string agentNote     = CtrlHelper.GetText(txtAgentNote);

            //判断用户是否存在
            AccountsInfo info = FacadeManage.aideAccountsFacade.GetAccountInfoByGameID(gameID);

            if (info.UserID == 0)
            {
                MessageBox("无效的用户信息");
                return;
            }
            else
            {
                userID   = info.UserID;
                accounts = info.Accounts;
            }
            if (compellation == "")
            {
                MessageBox("真实姓名不能为空");
                return;
            }
            if (domain == "")
            {
                MessageBox("代理域名不能为空");
                return;
            }
            if (agentScale < 0 || agentScale > 1000)
            {
                MessageBox("分成比例输入非法");
                return;
            }
            if (dayBackAllPay < 0)
            {
                MessageBox("日累计充值返现输入非法");
                return;
            }
            if (dayBackScale < 0 || dayBackScale > 1000)
            {
                MessageBox("返现比例输入非法");
                return;
            }
            if (mobilePhone == "")
            {
                MessageBox("联系电话不能为空");
                return;
            }

            AccountsAgent agent = new AccountsAgent();

            agent.UserID        = userID;
            agent.Compellation  = compellation;
            agent.Domain        = domain;
            agent.AgentType     = agentType;
            agent.AgentScale    = Convert.ToDecimal(agentScale) / 1000;
            agent.PayBackScore  = dayBackAllPay;
            agent.PayBackScale  = Convert.ToDecimal(dayBackScale) / 1000;
            agent.MobilePhone   = mobilePhone;
            agent.EMail         = eMail;
            agent.DwellingPlace = dwellingPlace;
            agent.AgentNote     = agentNote;

            Message msg = FacadeManage.aideAccountsFacade.AddAgent(agent);

            if (msg.Success)
            {
                MessageBoxCloseRef(msg.Content);
            }
            else
            {
                MessageBox(msg.Content);
            }
        }
示例#10
0
        public void btnPay_Click(object sender, System.EventArgs e)
        {
            string text  = CtrlHelper.GetText(this.txtPayAccounts);
            string text2 = CtrlHelper.GetText(this.txtPayReAccounts);
            int    @int  = CtrlHelper.GetInt(this.txtPayAmount, 0);

            if (text == "")
            {
                this.RenderAlertInfo(true, "抱歉,请输入充值帐号。", 2);
            }
            else
            {
                if (text2 != text)
                {
                    this.RenderAlertInfo(true, "抱歉,两次输入的帐号不一致。", 2);
                }
                else
                {
                    if (@int <= 0)
                    {
                        this.RenderAlertInfo(true, "请输入正确的充值金额", 2);
                    }
                    else
                    {
                        string      orderIDByPrefix = PayHelper.GetOrderIDByPrefix("WX");
                        OnLineOrder onLineOrder     = new OnLineOrder();
                        onLineOrder.ShareID = 401;
                        onLineOrder.OrderID = orderIDByPrefix;
                        if (Fetch.GetUserCookie() == null)
                        {
                            onLineOrder.OperUserID = 0;
                        }
                        else
                        {
                            onLineOrder.OperUserID = Fetch.GetUserCookie().UserID;
                        }
                        onLineOrder.Accounts    = text;
                        onLineOrder.OrderAmount = @int;
                        onLineOrder.IPAddress   = GameRequest.GetUserIP();
                        Message message = FacadeManage.aideTreasureFacade.RequestOrder(onLineOrder);
                        if (!message.Success)
                        {
                            this.RenderAlertInfo(true, message.Content, 2);
                        }
                        else
                        {
                            string nonce_str = WeiXinHelper.GetNonce_str();
                            string value     = "充值游戏豆";
                            string value2    = orderIDByPrefix;
                            int    num       = System.Convert.ToInt32(@int * 100);
                            string userIP    = Utility.UserIP;
                            string value3    = "http://" + base.Request.Url.Authority + "/Pay/WX/WxpayNotify.aspx";
                            string value4    = orderIDByPrefix.Substring(2, orderIDByPrefix.Length - 2);
                            SortedDictionary <string, object> sortedDictionary = new SortedDictionary <string, object>();
                            sortedDictionary.Add("nonce_str", nonce_str);
                            sortedDictionary.Add("body", value);
                            sortedDictionary.Add("trade_type", "NATIVE");
                            sortedDictionary.Add("out_trade_no", value2);
                            sortedDictionary.Add("total_fee", num);
                            sortedDictionary.Add("spbill_create_ip", userIP);
                            sortedDictionary.Add("notify_url", value3);
                            sortedDictionary.Add("product_id", value4);
                            this.pnlContinue.Visible = false;
                            this.RenderAlertInfo(false, "页面正跳转到支付平台,请稍候。。。", 2);
                            SortedDictionary <string, object> sortedDictionary2 = WeiXinHelper.UnifiedOrder(sortedDictionary, 10);
                            string text3 = sortedDictionary2["return_code"].ToString();
                            System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
                            stringBuilder.AppendLine(this.CreateInputHidden("return_code", text3));
                            stringBuilder.AppendLine(this.CreateInputHidden("return_msg", sortedDictionary2["return_msg"].ToString()));
                            if (text3 == "SUCCESS")
                            {
                                stringBuilder.AppendLine(this.CreateInputHidden("code_url", sortedDictionary2["code_url"].ToString()));
                                stringBuilder.AppendLine(this.CreateInputHidden("orderID", orderIDByPrefix));
                                stringBuilder.AppendLine(this.CreateInputHidden("amount", @int.ToString()));
                            }
                            this.formData = stringBuilder.ToString();
                            this.js       = "<script>window.onload = function() { document.forms[0].submit(); }</script>";
                        }
                    }
                }
            }
        }
示例#11
0
        private void ProcessData()
        {
            string compellation  = CtrlHelper.GetText(txtCompellation);
            string domain        = CtrlHelper.GetText(txtDomain);
            int    agentType     = Convert.ToInt32(rblAgentType.SelectedValue.Trim());
            int    agentScale    = CtrlHelper.GetInt(txtAgentScale, 0);
            int    dayBackAllPay = CtrlHelper.GetInt(txtDayBackAllPay, 0);
            int    dayBackScale  = CtrlHelper.GetInt(txtDayBackScale, 0);
            string mobilePhone   = CtrlHelper.GetText(txtMobilePhone);
            string eMail         = CtrlHelper.GetText(txtEMail);
            string dwellingPlace = CtrlHelper.GetText(txtDwellingPlace);
            string agentNote     = CtrlHelper.GetText(txtAgentNote);

            //判断代理域名唯一
            AccountsAgent model = FacadeManage.aideAccountsFacade.GetAccountAgentByDomain(domain);

            if (model != null && model.UserID != IntParam)
            {
                MessageBox("代理域名已经存在");
                return;
            }

            if (compellation == "")
            {
                MessageBox("真实姓名不能为空");
                return;
            }
            if (domain == "")
            {
                MessageBox("代理域名不能为空");
                return;
            }
            if (agentScale < 0 || agentScale > 1000)
            {
                MessageBox("分成比例输入非法");
                return;
            }
            if (dayBackAllPay < 0)
            {
                MessageBox("日累计充值返现输入非法");
                return;
            }
            if (dayBackScale < 0 || dayBackScale > 1000)
            {
                MessageBox("返现比例输入非法");
                return;
            }
            if (mobilePhone == "")
            {
                MessageBox("联系电话不能为空");
                return;
            }

            AccountsAgent agent = new AccountsAgent();

            agent.UserID        = IntParam;
            agent.Compellation  = compellation;
            agent.Domain        = domain;
            agent.AgentType     = agentType;
            agent.AgentScale    = Convert.ToDecimal(agentScale) / 1000;
            agent.PayBackScore  = dayBackAllPay;
            agent.PayBackScale  = Convert.ToDecimal(dayBackScale) / 1000;
            agent.MobilePhone   = mobilePhone;
            agent.EMail         = eMail;
            agent.DwellingPlace = dwellingPlace;
            agent.AgentNote     = agentNote;

            bool ret = FacadeManage.aideAccountsFacade.UpdateAgent(agent);

            if (ret)
            {
                MessageBoxCloseRef("代理信息更新成功");
            }
            else
            {
                MessageBox("代理信息更新失败");
            }
        }
示例#12
0
        /// <summary>
        /// 数据保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            AuthUserOperationPermission(Permission.Edit);
            try
            {
                int      typeID  = Convert.ToInt32(ddlType.SelectedValue);
                string   content = CtrlHelper.GetText(txtContent);
                DateTime time    = Convert.ToDateTime(txtTime.Text);

                if (string.IsNullOrEmpty(content))
                {
                    MessageBox("消息内容不能为空");
                    return;
                }
                if (DateTime.Now > time)
                {
                    MessageBox("推送时间不能小于或等于当前时间");
                    return;
                }
                DateTime endTime           = time.AddHours(5);
                IList <AccountsUmeng> list = new List <AccountsUmeng>();
                if (typeID == 0)
                {
                    bool flag = false;
                    flag = Umeng.SendMessage(0, content, "broadcast", time.ToString("yyyy-MM-dd HH:mm:ss"), endTime.ToString("yyyy-MM-dd HH:mm:ss"), "");
                    if (!flag)
                    {
                        MessageBox("推送消息失败,请前往友盟后台绑定系统后台ip");
                        return;
                    }
                    flag = Umeng.SendMessage(1, content, "broadcast", time.ToString("yyyy-MM-dd HH:mm:ss"), endTime.ToString("yyyy-MM-dd HH:mm:ss"), "");
                    if (!flag)
                    {
                        MessageBox("推送消息失败,请前往友盟后台绑定系统后台ip");
                        return;
                    }
                    list = FacadeManage.aideAccountsFacade.GetAccountsUmengList("");
                }
                else
                {
                    bool flag = false;
                    string where = string.Empty;
                    switch (typeID)
                    {
                    case 1:
                        int gameid = CtrlHelper.GetInt(txtGameID, 0);
                        if (gameid != 0)
                        {
                            AccountsInfo info = FacadeManage.aideAccountsFacade.GetAccountInfoByGameId(gameid);
                            if (info == null)
                            {
                                MessageBox("推送消息失败,代理商游戏id不存在");
                                return;
                            }
                            if (info.AgentID <= 0)
                            {
                                MessageBox("推送消息失败,游戏id为非代理商");
                                return;
                            }
                            where = "WHERE UserID IN(SELECT UserID FROM AccountsInfo WHERE SpreaderID=" + info.UserID.ToString() + ")";
                        }
                        else
                        {
                            where = "WHERE UserID IN(SELECT UserID FROM AccountsInfo WHERE AgentID>0)";
                        }
                        break;

                    case 2:
                        where = "WHERE UserID IN(SELECT UserID FROM AccountsInfo WHERE AgentID=0)";
                        break;

                    case 3:
                        where = "WHERE DeviceType=0";
                        break;

                    case 4:
                        where = "WHERE DeviceType=1";
                        break;

                    case 5:
                        string start = CtrlHelper.GetText(txtStartDate);
                        string end   = CtrlHelper.GetText(txtEndDate);
                        if (!string.IsNullOrEmpty(start) && !string.IsNullOrEmpty(end))
                        {
                            where = "WHERE UserID IN(SELECT UserID FROM AccountsInfo WHERE RegisterDate BETWEEN '" + start + "' AND '" + end + "')";
                        }
                        else
                        {
                            where = "WHERE 1=1";
                        }
                        break;

                    case 6:
                        int nologin = CtrlHelper.GetInt(txtNoLoginDay, 0);
                        if (nologin > 0)
                        {
                            where = "WHERE DATEDIFF(DAY,UpdateTime,GETDATE())>=" + nologin.ToString();
                        }
                        else
                        {
                            where = "WHERE 1=1";
                        }
                        break;

                    default:
                        break;
                    }
                    list = FacadeManage.aideAccountsFacade.GetAccountsUmengList(where);
                    if (list == null || list.Count <= 0)
                    {
                        MessageBox("推送用户未绑定设备,无法推送");
                        return;
                    }

                    //获取安卓用户
                    IList <AccountsUmeng> android = list.Where(a => a.DeviceType == 0).ToList <AccountsUmeng>();
                    if (android != null && android.Count > 0)
                    {
                        StringBuilder android_sb = new StringBuilder();
                        int           i = 1, j = 1;
                        string        android_tokens = string.Empty;
                        foreach (AccountsUmeng item in android)
                        {
                            if (!string.IsNullOrEmpty(item.DeviceToken))
                            {
                                android_sb.AppendFormat("{0},", item.DeviceToken);
                            }

                            if (i == 400 || j == android.Count)
                            {
                                android_tokens = android_sb.ToString();
                                android_tokens = android_tokens.Substring(0, (android_tokens.Length - 1));
                                flag           = Umeng.SendMessage(0, content, "listcast", time.ToString("yyyy-MM-dd HH:mm:ss"), endTime.ToString("yyyy-MM-dd HH:mm:ss"), android_tokens);
                                if (!flag)
                                {
                                    MessageBox("推送消息失败,请前往友盟后台绑定系统后台ip");
                                    return;
                                }
                                i              = 0;
                                android_sb     = new StringBuilder();
                                android_tokens = string.Empty;
                            }
                            i++;
                            j++;
                        }
                    }

                    //获取苹果用户
                    IList <AccountsUmeng> iphone = list.Where(a => a.DeviceType == 1).ToList <AccountsUmeng>();
                    if (iphone != null & iphone.Count > 0)
                    {
                        StringBuilder iphone_sb = new StringBuilder();
                        int           i = 1, j = 1;
                        string        iphone_tokens = string.Empty;
                        foreach (AccountsUmeng item in iphone)
                        {
                            if (!string.IsNullOrEmpty(item.DeviceToken))
                            {
                                iphone_sb.AppendFormat("{0},", item.DeviceToken);
                            }

                            if (i == 500 || j == iphone.Count)
                            {
                                iphone_tokens = iphone_sb.ToString();
                                iphone_tokens = iphone_tokens.Substring(0, (iphone_tokens.Length - 1));
                                flag          = Umeng.SendMessage(1, content, "listcast", time.ToString("yyyy-MM-dd HH:mm:ss"), endTime.ToString("yyyy-MM-dd HH:mm:ss"), iphone_tokens);
                                if (!flag)
                                {
                                    MessageBox("推送消息失败,请前往友盟后台绑定系统后台ip");
                                    return;
                                }
                                i             = 0;
                                iphone_sb     = new StringBuilder();
                                iphone_tokens = string.Empty;
                            }
                            i++;
                            j++;
                        }
                    }
                }

                //批量写入记录
                DataTable table = new DataTable();
                table.Columns.AddRange(new DataColumn[] {
                    new DataColumn("RecordID", typeof(int)),
                    new DataColumn("MasterID", typeof(int)),
                    new DataColumn("UserID", typeof(int)),
                    new DataColumn("PushType", typeof(byte)),
                    new DataColumn("PushContent", typeof(string)),
                    new DataColumn("PushTime", typeof(DateTime)),
                    new DataColumn("PushIP", typeof(string))
                });
                int      masterid = userExt.UserID;
                DateTime addTime  = DateTime.Now;
                string   ip       = GameRequest.GetUserIP();
                string   connStr  = ApplicationSettings.Get("DBRecord");
                for (int i = 0; i < list.Count; i++)
                {
                    DataRow dr = table.NewRow();
                    dr[0] = 0;
                    dr[1] = masterid;
                    dr[2] = list[i].UserID;
                    dr[3] = list[i].DeviceType;
                    dr[4] = content;
                    dr[5] = addTime;
                    dr[6] = ip;
                    table.Rows.Add(dr);
                }
                int result = FacadeManage.aideRecordFacade.AddRecordAccountsUmeng(table, connStr);
                if (result > 0)
                {
                    MessageBox("推送消息成功");
                }
                else
                {
                    MessageBox("推送消息成功,但推送记录写入失败");
                }
            }
            catch (Exception)
            {
                MessageBox("推送消息异常,请稍后重试");
            }
        }
示例#13
0
        /// <summary>
        /// 数据保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            SystemMessage systemMessage = new SystemMessage();

            if (IntParam > 0)
            {
                if (!AuthUserOperationPermission(Permission.Edit))
                {
                    return;
                }
                systemMessage = FacadeManage.aidePlatformFacade.GetSystemMessageInfo(IntParam);
                systemMessage.UpdateMasterID = userExt.UserID;
                systemMessage.UpdateDate     = DateTime.Now;
            }
            else
            {
                if (!AuthUserOperationPermission(Permission.Add))
                {
                    return;
                }
                systemMessage.CreateMasterID = userExt.UserID;
                systemMessage.CreateDate     = DateTime.Now;
            }

            systemMessage.MessageString = CtrlHelper.GetText(txtMessageString);
            systemMessage.MessageType   = Convert.ToInt32(ddlMessageType.SelectedValue.Trim());
            systemMessage.StartTime     = Convert.ToDateTime(CtrlHelper.GetText(txtStartTime));
            systemMessage.ConcludeTime  = Convert.ToDateTime(CtrlHelper.GetText(txtConcludeTime));
            systemMessage.TimeRate      = CtrlHelper.GetInt(txtTimeRate, 0);
            systemMessage.CollectNote   = CtrlHelper.GetText(txtCollectNote);

            StringBuilder sb = new StringBuilder();

            if (!tvKinds.Nodes[0].Checked)
            {
                foreach (TreeNode node in tvKinds.CheckedNodes)
                {
                    if (node.Value != "")
                    {
                        sb.Append(node.Value.ToString() + ",");
                    }
                }
            }
            else
            {
                sb.Length = 0;
                sb.Append("0");
            }

            if (sb.ToString() == "" || sb.ToString() == null)
            {
                ShowError("请选择要控制的房间!");
                return;
            }
            systemMessage.ServerRange = sb.ToString();
            int result = IntParam > 0 ? FacadeManage.aidePlatformFacade.UpdateSystemMessage(systemMessage) : FacadeManage.aidePlatformFacade.InsertSystemMessage(systemMessage);

            if (result > 0)
            {
                ShowInfo("系统消息操作成功", "SystemMessageList.aspx", 1200);
            }
            else
            {
                ShowError("系统消息操作失败");
            }
        }
示例#14
0
        //生成实卡
        protected void btnCreate_Click(object sender, EventArgs e)
        {
            #region 验证
            //判断权限
            AuthUserOperationPermission(Permission.CreateCard);
            int cardCount  = CtrlHelper.GetInt(txtCount, 0);
            int cardTypeID = string.IsNullOrEmpty(ddlCardType.SelectedValue) ? 0 : int.Parse(ddlCardType.SelectedValue);
            if (cardTypeID <= 0)
            {
                ShowError("请先添加实卡类型");
                return;
            }
            if (cardCount <= 0)
            {
                ShowError("生成实卡的数量必须大于零的整数");
                return;
            }
            if (cardCount > 10000)
            {
                ShowError("生成实卡的数量一次最多10000张");
                return;
            }
            // 卡号规则
            int cardLen = CtrlHelper.GetInt(txtCardNumLen, 0);
            if (cardLen < 15 || cardLen > 32)
            {
                ShowError("卡号长度必须大于等于15小于32 ");
                return;
            }
            //卡密规则
            int passwordLen = CtrlHelper.GetInt(txtPassLen, 0);
            if (passwordLen < 8 || passwordLen > 32)
            {
                ShowError("密码长度必须大于等于8小于33 ");
                return;
            }
            #endregion

            GlobalLivcard cardType = FacadeManage.aideTreasureFacade.GetGlobalLivcardInfo(cardTypeID);
            if (cardType == null)
            {
                ShowError("实卡类型不存在");
                return;
            }
            byte[]             bytes     = Encoding.Default.GetBytes("");
            LivcardBuildStream cardBuild = new LivcardBuildStream();
            cardBuild.AdminName       = userExt.Username;
            cardBuild.BuildAddr       = GameRequest.GetUserIP();
            cardBuild.BuildCardPacket = bytes;
            cardBuild.BuildCount      = cardCount;
            cardBuild.BuildDate       = DateTime.Now;
            cardBuild.Currency        = Convert.ToDecimal(txtCurrency.Text.Trim());
            cardBuild.CardPrice       = cardType.CardPrice;
            cardBuild.CardTypeID      = cardTypeID;
            cardBuild.DownLoadCount   = 0;
            cardBuild.NoteInfo        = CtrlHelper.GetText(txtRemark);
            int buildID = FacadeManage.aideTreasureFacade.InsertLivcardBuildStream(cardBuild);
            if (buildID <= 0)
            {
                ShowError("添加实卡批次失败");
                return;
            }
            //实卡信息
            LivcardAssociator card = new LivcardAssociator();
            card.BuildID     = buildID;
            card.CardTypeID  = cardType.CardTypeID;
            card.CardPrice   = cardType.CardPrice;
            card.Currency    = Convert.ToDecimal(txtCurrency.Text.Trim());
            card.UseRange    = int.Parse(ddlUseRange.SelectedValue);
            card.SalesPerson = CtrlHelper.GetText(txtSalesPerson);
            card.ValidDate   = Convert.ToDateTime(txtValidDate.Text.Trim());

            StringBuilder sb = new StringBuilder();
            string[,] list = new string[cardCount, 2];
            int    i    = 0;
            Random rand = new Random();
            while (cardCount > 0)
            {
                string serialID = GetSerialID(cardLen, cardType.CardTypeID, rand);  //卡号
                bool   isRepeat = false;
                for (int j = i; j > 0; j--)
                {
                    if (list[j, 0] == serialID)
                    {
                        isRepeat = true;
                        break;
                    }
                }
                if (isRepeat)
                {
                    isRepeat = false;
                    continue;
                }
                string password = GetPassword(passwordLen, rand);  //卡密
                sb.AppendFormat("{0},{1}/", serialID, password);
                list[i, 0] = serialID;
                list[i, 1] = Utility.MD5(password);
                cardCount--;
                i++;
            }
            FacadeManage.aideTreasureFacade.InsertLivcardAssociator(card, list);
            bytes                     = Encoding.Default.GetBytes(sb.ToString());
            cardBuild.BuildID         = buildID;
            cardBuild.BuildCardPacket = bytes;
            try
            {
                FacadeManage.aideTreasureFacade.UpdateLivcardBuildStream(cardBuild);
                txtCount.Text = "0";
                ShowInfo("生成会员卡成功");
            }
            catch
            {
                ShowError("生成会员卡失败");
            }
        }
示例#15
0
        /// <summary>
        /// 数据保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strReason = CtrlHelper.GetText(txtReason);
            int    a         = 0;

            if (!int.TryParse(txtDiamond.Text, out a))
            {
                MessageBox("赠送钻石格式不正确");
                return;
            }

            int  diamond = a;
            bool flag    = cbPull.Checked;
            int  userid  = IntParam <= 0 ? CtrlHelper.GetInt(hidUserID, 0) : IntParam;

            //if(diamond <= 0)
            //{
            //    MessageBox("赠送钻石不能小于或等于零");
            //    return;
            //}
            if (string.IsNullOrEmpty(strReason))
            {
                MessageBox("赠送备注不能为空");
                return;
            }
            string             ip  = GameRequest.GetUserIP();
            RecordGrantDiamond rgd = new RecordGrantDiamond
            {
                MasterID    = userExt.UserID,
                UserID      = userid,
                TypeID      = 0,
                AddDiamond  = diamond,
                ClientIP    = ip,
                CollectNote = strReason
            };

            Message msg = FacadeManage.aideTreasureFacade.GrantDiamond(rgd);

            if (msg.Success)
            {
                if (flag)
                {
                    AccountsUmeng umeng = FacadeManage.aideAccountsFacade.GetAccountsUmeng(IntParam);
                    if (!string.IsNullOrEmpty(umeng?.DeviceToken))
                    {
                        string   content = "系统管理员" + userExt.UserName + "已" + (diamond < 0 ? "扣除" : "赠送") + "您" + diamond.ToString() + "钻石";
                        DateTime start   = DateTime.Now.AddMinutes(1);
                        DateTime end     = start.AddHours(5);
                        bool     result  = Umeng.SendMessage(umeng.DeviceType, content, "unicast", start.ToString("yyyy-MM-dd HH:mm:ss"), end.ToString("yyyy-MM-dd HH:mm:ss"), umeng.DeviceToken);
                        if (!result)
                        {
                            MessageBox("赠送成功,但推送消息失败,请前往友盟后台绑定系统后台ip");
                            return;
                        }
                        RecordAccountsUmeng record = new RecordAccountsUmeng
                        {
                            MasterID    = rgd.MasterID,
                            UserID      = rgd.UserID,
                            PushType    = umeng.DeviceType,
                            PushTime    = DateTime.Now,
                            PushIP      = ip,
                            PushContent = content
                        };
                        int rows = FacadeManage.aideRecordFacade.AddRecordAccountsUmeng(record);
                        MessageBox(rows > 0 ? "赠送成功" : "赠送成功,但推送记录写入失败");
                    }
                    else
                    {
                        MessageBox("赠送成功,但推送用户未绑定设备,无法推送");
                    }
                }
                else
                {
                    MessageBox("赠送成功");
                }
            }
            else
            {
                MessageBox("赠送失败");
            }
        }
        private void ProcessData()
        {
            if (!IsValid)
            {
                return;
            }
            string kindID = CtrlHelper.GetText(txtKindID);
            string sortID = CtrlHelper.GetText(txtSortID);

            if (!Utils.Validate.IsPositiveInt(kindID))
            {
                ShowError("游戏标识不规范,游戏标识只能为正整数");
                return;
            }
            if (!Utils.Validate.IsPositiveInt(sortID))
            {
                ShowError("排序输入不规范,排序只能为0或正整数");
                return;
            }
            MobileKindItem model = new MobileKindItem();

            model.KindID        = Convert.ToInt32(kindID);
            model.KindName      = CtrlHelper.GetText(txtKindName);
            model.ModuleName    = CtrlHelper.GetText(txtModuleName);
            model.ClientVersion = CalVersion2(CtrlHelper.GetText(txtClientVersion));
            model.ResVersion    = CtrlHelper.GetInt(txtResVersion, 0);

            //计算属性
            int kindMark = 0;

            if (cblKindMark.Items.Count > 0)
            {
                foreach (ListItem item in cblKindMark.Items)
                {
                    if (item.Selected)
                    {
                        kindMark |= int.Parse(item.Value);
                    }
                }
            }
            model.KindMark = kindMark;
            model.SortID   = CtrlHelper.GetInt(txtSortID, 0);
            model.Nullity  = Convert.ToByte(rbtnNullity.SelectedValue.Trim());

            Message msg = new Message();

            if (StrCmd == "add")
            {
                //判断权限
                AuthUserOperationPermission(Permission.Add);
                msg = FacadeManage.aidePlatformFacade.InsertMobileKindItem(model);
            }
            else
            {
                //判断权限
                AuthUserOperationPermission(Permission.Edit);
                msg = FacadeManage.aidePlatformFacade.UpdateMobileKindItem(model);
            }

            if (msg.Success)
            {
                if (StrCmd == "add")
                {
                    ShowInfo("手游信息增加成功", "MobileKindList.aspx", 1200);
                }
                else
                {
                    ShowInfo("手游信息修改成功", "MobileKindList.aspx", 1200);
                }
            }
            else
            {
                ShowError(msg.Content);
            }
        }
示例#17
0
        /// <summary>
        /// 数据保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string gameid   = CtrlHelper.GetText(txtGameID);
            string nickname = CtrlHelper.GetText(txtNickName);
            int    sortid   = CtrlHelper.GetInt(txtSort, 0);
            //int kindid = Convert.ToInt32(ddlKind.SelectedValue);
            int userid  = Convert.ToInt32(hdfUserID.Value);
            int agentid = Convert.ToInt32(hdfAgentID.Value);

            if (TypeID > 0)
            {
                if (!string.IsNullOrEmpty(gameid))
                {
                    if (!Utils.Validate.IsPositiveInt(gameid))
                    {
                        MessageBox("输入查询格式不正确");
                        return;
                    }
                    if (userid <= 0 && agentid <= 0)
                    {
                        MessageBox("输入ID后请检测账号");
                        return;
                    }
                    if (TypeID == 1 && userid <= 0)
                    {
                        MessageBox("输入的账号信息不存在");
                        return;
                    }
                    if (TypeID == 2 && userid > 0 && agentid <= 0)
                    {
                        MessageBox("输入的账号为非代理账号");
                        return;
                    }
                }
                else
                {
                    MessageBox("请输入要添加的账号信息");
                    return;
                }
            }
            Message msg = new Message();

            for (int i = 0; i < CheckBoxList1.Items.Count; i++)
            {
                if (CheckBoxList1.Items[i].Selected)
                {
                    AccountsGame game = new AccountsGame();
                    game.TypeID  = (byte)TypeID;
                    game.KindID  = Convert.ToInt32(CheckBoxList1.Items[i].Value);
                    game.SortID  = sortid;
                    game.UniteID = TypeID == 1 ? userid : TypeID == 2 ? agentid : 0;

                    msg = FacadeManage.aideAccountsFacade.AddUserLoadGame(game);
                }
            }


            if (msg.Success)
            {
                MessageBox("添加配置成功");
            }
            else
            {
                MessageBox("添加配置信息已存在");
            }
        }
示例#18
0
        /// <summary>
        /// 数据保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Game.Entity.Platform.TaskInfo info = new Game.Entity.Platform.TaskInfo();
            if (IntParam > 0)
            {
                if (!AuthUserOperationPermission(Permission.Edit))
                {
                    return;
                }
                info = FacadeManage.aidePlatformFacade.GetTaskInfo(IntParam);
            }
            else
            {
                if (!AuthUserOperationPermission(Permission.Add))
                {
                    return;
                }
            }

            info.CollectDate = DateTime.Now;
            info.Innings     = CtrlHelper.GetInt(txtInnings, 0);
            info.KindID      = Convert.ToInt32(ddlKindID.SelectedValue);
            //info.MatchID = Convert.ToInt32(ddlMatchID.SelectedValue);
            info.Nullity         = Convert.ToByte(ddlState.SelectedValue);
            info.ServerID        = Convert.ToInt32(ddlServerID.SelectedValue);
            info.TaskDescription = CtrlHelper.GetText(txtDescription);
            info.TaskName        = CtrlHelper.GetText(txtTaskName);
            info.TaskType        = Convert.ToInt32(ddlTaskType.SelectedValue);
            info.TimeType        = Convert.ToByte(ddlTimeType.SelectedValue);
            info.UserType        = Convert.ToByte(ddlUserType.SelectedValue);
            //info.SortID = CtrlHelper.GetInt(txtSortID, 0);

            int    gold    = CtrlHelper.GetInt(txtGold, 0);
            int    diamond = CtrlHelper.GetInt(txtDiamond, 0);
            int    medal   = CtrlHelper.GetInt(txtMedal, 0);
            string award   = "";

            if (gold > 0)
            {
                award = award + "1:" + gold.ToString() + ";";
            }
            if (diamond > 0)
            {
                award = award + "2:" + diamond.ToString() + ";";
            }
            if (medal > 0)
            {
                award = award + "3:" + medal.ToString() + ";";
            }
            info.TaskAward = award != "" ? award.Substring(0, award.Length - 1) : "";

            int result = 0;

            if (IntParam > 0)
            {
                result = FacadeManage.aidePlatformFacade.UpdateTaskInfo(info);
            }
            else
            {
                result = FacadeManage.aidePlatformFacade.InsertTaskInfo(info);
            }
            if (result > 0)
            {
                ShowInfo("操作成功", "TaskList.aspx", 1200);
            }
            else
            {
                ShowError("操作失败");
            }
        }
示例#19
0
        protected void btnPay_Click(object sender, EventArgs e)
        {
            string strAccounts   = CtrlHelper.GetTextAndFilter(txtPayAccounts);
            string strReAccounts = CtrlHelper.GetTextAndFilter(txtPayReAccounts);
            int    amount        = CtrlHelper.GetInt(txtPayAmount, 0);

            if (strAccounts == "")
            {
                RenderAlertInfo(true, "抱歉,请输入充值帐号。", 2);
                return;
            }
            if (strReAccounts != strAccounts)
            {
                RenderAlertInfo(true, "抱歉,两次输入的帐号不一致。", 2);
                return;
            }
            if (amount <= 0)
            {
                RenderAlertInfo(true, "请输入正确的充值金额", 2);
                return;
            }

            OnLineOrder onlineOrder = new OnLineOrder();

            onlineOrder.ShareID = 3;
            onlineOrder.OrderID = PayHelper.GetOrderIDByPrefix("YB");

            #region 订单处理

            if (Fetch.GetUserCookie() == null)
            {
                onlineOrder.OperUserID = 0;
            }
            else
            {
                onlineOrder.OperUserID = Fetch.GetUserCookie().UserID;
            }
            onlineOrder.Accounts    = strAccounts;
            onlineOrder.OrderAmount = amount;
            onlineOrder.IPAddress   = GameRequest.GetUserIP();

            //生成订单
            Message umsg = FacadeManage.aideTreasureFacade.RequestOrder(onlineOrder);
            if (!umsg.Success)
            {
                RenderAlertInfo(true, umsg.Content, 2);
                return;
            }
            #endregion

            #region 提交给易宝处理

            // 商户订单号,选填.
            //若不为"",提交的订单号必须在自身账户交易中唯一;为""时,易宝支付会自动生成随机的商户订单号.
            string p2_Order = onlineOrder.OrderID;

            // 支付金额,必填.
            //单位:元,精确到分.
            string p3_Amt = amount.ToString("f0");

            //交易币种,固定值"CNY".
            string p4_Cur = "CNY";

            //商品名称
            //用于支付时显示在易宝支付网关左侧的订单产品信息.
            string p5_Pid = "游戏豆";

            //商品种类
            string p6_Pcat = "";

            //商品描述
            string p7_Pdesc = "";

            //商户接收支付成功数据的地址,支付成功后易宝支付会向该地址发送两次成功通知.
            string p8_Url = "http://" + HttpContext.Current.Request.Url.Authority + "/Pay/PayYBReceive.aspx";

            //送货地址
            //为“1”: 需要用户将送货地址留在易宝支付系统;为“0”: 不需要,默认为 ”0”.
            string p9_SAF = "0";

            //商户扩展信息
            //商户可以任意填写1K 的字符串,支付成功时将原样返回.
            string pa_MP = onlineOrder.Accounts;

            //银行编码
            //默认为"",到易宝支付网关.若不需显示易宝支付的页面,直接跳转到各银行、神州行支付、骏网一卡通等支付页面,该字段可依照附录:银行列表设置参数值.
            string pd_FrpId = "";

            //应答机制
            //默认为"1": 需要应答机制;
            string pr_NeedResponse = "1";

            string url = Buy.CreateBuyUrl(p2_Order, p3_Amt, p4_Cur, p5_Pid, p6_Pcat, p7_Pdesc, p8_Url, p9_SAF, pa_MP, pd_FrpId, pr_NeedResponse);

            Response.Redirect(url);
            #endregion
        }
示例#20
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            //判断权限
            AuthUserOperationPermission(Permission.Edit);
            string       cash     = CtrlHelper.GetText(txtCash);
            GameProperty property = FacadeManage.aidePlatformFacade.GetGamePropertyInfo(IntParam);

            if (property == null)
            {
                return;
            }
            property.Name       = CtrlHelper.GetText(txtName);
            property.PTypeID    = Convert.ToInt32(ddlPTypeID.SelectedValue);
            property.MTypeID    = Convert.ToInt32(ddlMTypeID.SelectedValue);
            property.Cash       = decimal.Parse(string.IsNullOrEmpty(cash) ? "0" : cash);
            property.Gold       = CtrlHelper.GetInt(txtGold, 0);
            property.UserMedal  = CtrlHelper.GetInt(txtUserMedal, 0);
            property.LoveLiness = CtrlHelper.GetInt(txtLoveLiness, 0);

            //发行范围
            int intIssueArea = 0;

            if (ckbIssueArea.Items.Count > 0)
            {
                foreach (ListItem item in ckbIssueArea.Items)
                {
                    if (item.Selected)
                    {
                        intIssueArea |= int.Parse(item.Value);
                    }
                }
            }
            //使用范围
            int intServiceArea = 0;

            if (ckbServiceArea.Items.Count > 0)
            {
                foreach (ListItem item in ckbServiceArea.Items)
                {
                    if (item.Selected)
                    {
                        intServiceArea |= int.Parse(item.Value);
                    }
                }
            }

            string strRecvLoveLiness = CtrlHelper.GetText(txtRecvLoveLiness);

            if (!Game.Utils.Validate.IsNumeric(strRecvLoveLiness))
            {
                ShowError("接受魅力值只能正或者负的整数");
                return;
            }

            property.UseArea             = ( short )intIssueArea;
            property.ServiceArea         = ( short )intServiceArea;
            property.SendLoveLiness      = CtrlHelper.GetInt(txtSendLoveLiness, 0);
            property.RecvLoveLiness      = CtrlHelper.GetInt(txtRecvLoveLiness, 0);
            property.RegulationsInfo     = CtrlHelper.GetText(txtRegulationsInfo);
            property.UseResultsGold      = CtrlHelper.GetInt(txtUseResultsGold, 0);
            property.UseResultsValidTime = CtrlHelper.GetInt(txtUseResultsValidTime, 0);
            property.UseResultsValidTimeScoreMultiple = CtrlHelper.GetInt(txtUseResultsValidTimeScoreMultiple, 0);
            property.Nullity      = (byte)(chkSuportMobile.Checked ? 0 : 1);
            property.Recommend    = ckbRecommend.Checked ? 1 : 0;
            property.SuportMobile = (byte)(chkSuportMobile.Checked ? 1 : 0);
            try
            {
                FacadeManage.aidePlatformFacade.UpdateGameProperty(property);
                ShowInfo("更新成功");
            }
            catch
            {
                ShowInfo("更新失败");
            }
        }
示例#21
0
        private void ProcessData()
        {
            AndroidManager android = new AndroidManager();
            Message        msg     = new Message();

            if (rbtnType.SelectedValue.Trim() == "0")
            {
                AccountsInfo accounts = aideAccountsFacade.GetAccountInfoByAccount(CtrlHelper.GetText(txtAndroidName));
                if (accounts == null || accounts.IsAndroid == 0)
                {
                    ShowError("该机器人不存在");
                    return;
                }
                else
                {
                    AndroidManager androidExsits = aideTreasureFacade.GetAndroidInfo(accounts.UserID);
                    if (androidExsits != null)
                    {
                        ShowError("该机器人已经被添加");
                        return;
                    }

                    //添加机器人
                    android.UserID        = accounts.UserID;
                    android.ServerID      = Convert.ToInt32(ddlServerID.SelectedValue.Trim());
                    android.MinPlayDraw   = CtrlHelper.GetInt(txtMinPlayDraw, 0);
                    android.MaxPlayDraw   = CtrlHelper.GetInt(txtMaxPlayDraw, 0);
                    android.MinTakeScore  = CtrlHelper.GetInt(txtMinTakeScore, 0);
                    android.MaxTakeScore  = CtrlHelper.GetInt(txtMaxTakeScore, 0);
                    android.MinReposeTime = CtrlHelper.GetInt(txtMinReposeTime, 0);
                    android.MaxReposeTime = CtrlHelper.GetInt(txtMaxReposeTime, 0);
                    //机器人类型
                    int serviceGender = 0;
                    foreach (ListItem item in chkServiceGender.Items)
                    {
                        if (item.Selected)
                        {
                            serviceGender |= int.Parse(item.Value);
                        }
                    }
                    android.ServiceGender = serviceGender;
                    //机器人服务时间
                    int serviceTime = 0;
                    foreach (ListItem item in chkServiceTime.Items)
                    {
                        if (item.Selected)
                        {
                            serviceTime |= int.Parse(item.Value);
                        }
                    }
                    android.ServiceTime = serviceTime;

                    android.AndroidNote = CtrlHelper.GetText(txtAndroidNote);
                    android.Nullity     = Convert.ToByte(rbtnNullity.SelectedValue.Trim());
                    msg = aideTreasureFacade.InsertAndroid(android);
                    if (msg.Success)
                    {
                        ShowInfo("成功添加了机器人 " + accounts.Accounts, "AndroidList.aspx", 1200);
                    }
                    else
                    {
                        ShowError(msg.Content);
                    }
                }
            }
            else
            {
                #region 检查

                try
                {
                    Convert.ToUInt32(txtAndroidName.Text);
                }
                catch
                {
                    ShowError("机器人个人填写非法");
                    return;
                }
                #endregion

                PagerSet pagerSet = aideAccountsFacade.GetAccountsList(1, Convert.ToInt32(txtAndroidName.Text), "WHERE IsAndroid=1 AND UserID NOT IN (SELECT UserID FROM QPTreasureDB.dbo.AndroidManager)", "ORDER BY NEWID()");
                if (pagerSet.PageSet.Tables[0].Rows.Count == 0)
                {
                    ShowError("没有可用的机器人帐号");
                    return;
                }

                foreach (DataRow dr in pagerSet.PageSet.Tables[0].Rows)
                {
                    android.UserID        = Convert.ToInt32(dr["UserID"]);
                    android.ServerID      = Convert.ToInt32(ddlServerID.SelectedValue.Trim());
                    android.MinPlayDraw   = CtrlHelper.GetInt(txtMinPlayDraw, 0);
                    android.MaxPlayDraw   = CtrlHelper.GetInt(txtMaxPlayDraw, 0);
                    android.MinTakeScore  = CtrlHelper.GetInt(txtMinTakeScore, 0);
                    android.MaxTakeScore  = CtrlHelper.GetInt(txtMaxTakeScore, 0);
                    android.MinReposeTime = CtrlHelper.GetInt(txtMinReposeTime, 0);
                    android.MaxReposeTime = CtrlHelper.GetInt(txtMaxReposeTime, 0);
                    //机器人类型
                    int serviceGender = 0;
                    foreach (ListItem item in chkServiceGender.Items)
                    {
                        if (item.Selected)
                        {
                            serviceGender |= int.Parse(item.Value);
                        }
                    }
                    android.ServiceGender = serviceGender;
                    //机器人服务时间
                    int serviceTime = 0;
                    foreach (ListItem item in chkServiceTime.Items)
                    {
                        if (item.Selected)
                        {
                            serviceTime |= int.Parse(item.Value);
                        }
                    }
                    android.ServiceTime = serviceTime;
                    android.AndroidNote = CtrlHelper.GetText(txtAndroidNote);
                    android.Nullity     = Convert.ToByte(rbtnNullity.SelectedValue.Trim());
                    aideTreasureFacade.InsertAndroid(android);
                }
                ShowInfo("成功添加了" + pagerSet.PageSet.Tables[0].Rows.Count + "个机器人", "AndroidList.aspx", 1200);
            }
        }
示例#22
0
        /// <summary>
        /// 添加游戏
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ButtonAddGame_Click(object sender, EventArgs e)
        {
            //if (!UploadGameIcon()) return;
            string gamename             = CtrlHelper.GetText(txtGameName);
            string gamedisplayname      = CtrlHelper.GetText(txtGameDisplayName);
            string gameAndroidVersionID = CtrlHelper.GetSelectValue(ddlAndroidVersionList);
            string gameIOSVersionID     = CtrlHelper.GetSelectValue(ddlIOSVersionList);
            string gameAndroidKeyID     = CtrlHelper.GetSelectValue(ddlAndroidKeyList);
            string gameNameSpell        = CtrlHelper.GetText(txtGameNameSpell);
            string gameUnityVer         = CtrlHelper.GetText(txtUnityVer);
            string gameicon             = this.hfGameIcon.Value;
            string gameProductName      = CtrlHelper.GetText(txtProductName);
            string gameIsEncryption     = this.CheckBoxIsEncryption.Checked ? "1" : "0";
            //追加sdk相关
            string sdkgameid  = CtrlHelper.GetText(txtSDKGameID);
            string sdkgamekey = CtrlHelper.GetText(txtSDKGameKey);

            if (gamename == "" || gamedisplayname == "")
            {
                MessageLabel.Text = "游戏名字不能为空";
                return;
            }

            if (sdkgameid == "" || sdkgamekey == "")
            {
                MessageLabel.Text = "SDK通信ID及KEY不能为空";
                return;
            }


            string sql = "";

            if (hfSubmitType.Value == "add")
            {
                Message umsg = aideNativeWebFacade.AddGame(gamename, gamedisplayname, gameAndroidVersionID, gameIOSVersionID, gameAndroidKeyID, "", gameicon, Context.User.Identity.Name, gameNameSpell, gameUnityVer, gameProductName, gameIsEncryption, sdkgameid, sdkgamekey);
                if (umsg.Success)
                {
                    BindingList();
                    MessageLabel.Text = "游戏新增成功";
                    CreateGameImgList(umsg.Content, gamename, gameicon, false);
                    CreateIOSIcon(umsg.Content, gameNameSpell, gameicon, true);
                }
                else
                {
                    MessageLabel.Text = "游戏新增失败";
                }
            }
            else if (hfSubmitType.Value == "edit")
            {
                sql = string.Format(@"UPDATE [sdk_GameInfo] SET  [GameName]='{0}',[GameDisplayName]='{1}',[AndroidVersionID]={2},[IOSVersionID]={3},[AndroidKeyID]={4},
                                      [GameIcon]='{5}',[CreateUser]='{6}',[GameNameSpell]='{8}',[UnityVer]='{9}',ProductName='{10}',IsEncryption='{11}',SDKGameID='{12}',SDKGameKey='{13}' WHERE GAMEID={7}"
                                    , gamename, gamedisplayname, gameAndroidVersionID, gameIOSVersionID, gameAndroidKeyID, gameicon, Context.User.Identity.Name, CtrlHelper.GetInt(hfgameID, 0), gameNameSpell, gameUnityVer, gameProductName, gameIsEncryption, sdkgameid, sdkgamekey);



                int row = aideNativeWebFacade.ExecuteSql(sql);
                if (row > 0)
                {
                    BindingList();
                    MessageLabel.Text = "游戏更新成功";
                    CreateGameImgList(CtrlHelper.GetText(hfgameID), gamename, gameicon, true);
                    CreateIOSIcon(CtrlHelper.GetText(hfgameID), gameNameSpell, gameicon, true);
                }
                else
                {
                    MessageLabel.Text = "游戏更新失败";
                }
            }
            else
            {
                MessageLabel.Text = "抱歉,未识别操作!";
                return;
            }
        }
示例#23
0
        private void ProcessData()
        {
            Notice notice = new Notice();

            notice.Subject   = CtrlHelper.GetText(txtSubject);
            notice.IsLink    = Convert.ToByte(chkIsLinks.Checked);
            notice.LinkUrl   = CtrlHelper.GetText(txtLinkUrl);
            notice.Body      = CtrlHelper.GetText(txtBody);
            notice.Width     = CtrlHelper.GetInt(txtWidth, 0);
            notice.Height    = CtrlHelper.GetInt(txtHeight, 0);
            notice.StartDate = Convert.ToDateTime(CtrlHelper.GetText(txtStartDate));
            notice.OverDate  = Convert.ToDateTime(CtrlHelper.GetText(txtOverDate));
            notice.Nullity   = Convert.ToByte(rbtnNullity.SelectedValue.Trim());

            //使用范围
            StringBuilder sb = new StringBuilder();

            if (ckbLocation.Items.Count > 0)
            {
                foreach (ListItem item in ckbLocation.Items)
                {
                    if (item.Selected)
                    {
                        sb.AppendFormat("{0},", item.Value);// |= int.Parse( item.Value );
                    }
                }
            }

            notice.Location = sb.ToString().TrimEnd(new char[] { ',' });

            Message msg = new Message();

            if (StrCmd == "add")
            {
                //判断权限
                AuthUserOperationPermission(Permission.Add);
                msg = FacadeManage.aideNativeWebFacade.InsertNotice(notice);
            }
            else
            {
                //判断权限
                AuthUserOperationPermission(Permission.Edit);
                notice.NoticeID = IntParam;
                msg             = FacadeManage.aideNativeWebFacade.UpdateNotice(notice);
            }

            if (msg.Success)
            {
                if (StrCmd == "add")
                {
                    ShowInfo("公告信息增加成功", "NoticeList.aspx", 1200);
                }
                else
                {
                    ShowInfo("公告信息修改成功", "NoticeList.aspx", 1200);
                }
            }
            else
            {
                ShowError(msg.Content);
            }
        }
示例#24
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (!IsValid)
            {
                return;
            }

            //验证任务类型
            int taskType = -1;

            taskType = Convert.ToInt32(ddlTaskType.SelectedValue);
            if (taskType == -1)
            {
                ShowError("请选择任务类型");
                return;
            }

            //验证可领取任务玩家类型
            int userType = 0;

            for (int i = 1; i <= cblUserType.Items.Count; i++)
            {
                if (cblUserType.Items[i - 1].Selected)
                {
                    userType = userType | i;
                }
            }
            if (userType == 0)
            {
                ShowError("请选择可领取任务玩家类型");
                return;
            }

            //验证游戏
            int kindID = -1;

            kindID = Convert.ToInt32(ddlGameKind.SelectedValue);
            if (kindID == -1)
            {
                ShowError("请选择任务所属游戏");
                return;
            }

            //验证局数
            int innings = CtrlHelper.GetInt(txtInnings, 0);

            if (innings == 0)
            {
                ShowError("请输入比赛局数");
                return;
            }

            //验证比赛
            int matchID = 0;

            //if( taskType == (int)EnumerationList.TaskType.比赛任务 )
            //{
            //    matchID = Convert.ToInt32( ddlMatchID.SelectedValue );
            //    if( matchID == 0 )
            //    {
            //        ShowError( "请选择任务所属比赛" );
            //        return;
            //    }
            //}

            Game.Entity.Platform.TaskInfo taskInfo = new Game.Entity.Platform.TaskInfo();
            if (IntParam > 0)
            {
                AuthUserOperationPermission(Permission.Edit);
                taskInfo = FacadeManage.aidePlatformFacade.GetTaskInfoByID(IntParam);
            }
            else
            {
                AuthUserOperationPermission(Permission.Add);
                taskInfo.InputDate = DateTime.Now;
            }

            taskInfo.TaskName           = CtrlHelper.GetText(txtTaskName);
            taskInfo.TaskType           = taskType;
            taskInfo.UserType           = Convert.ToByte(userType);
            taskInfo.KindID             = kindID;
            taskInfo.StandardAwardGold  = CtrlHelper.GetInt(txtStandardAwardGold, 0);
            taskInfo.StandardAwardMedal = CtrlHelper.GetInt(txtStandardAwardMedal, 0);
            taskInfo.MemberAwardGold    = CtrlHelper.GetInt(txtMemberAwardGold, 0);
            taskInfo.MemberAwardMedal   = CtrlHelper.GetInt(txtMemberAwardMedal, 0);
            taskInfo.TimeLimit          = CtrlHelper.GetInt(txtTimeLimit, 0);
            taskInfo.TaskDescription    = TextUtility.CutString(CtrlHelper.GetText(txtTaskDescription), 0, 500);
            taskInfo.Innings            = innings;
            taskInfo.MatchID            = matchID;

            bool isSuccess;

            if (IntParam > 0)
            {
                isSuccess = FacadeManage.aidePlatformFacade.UpdateTaskInfo(taskInfo);
            }
            else
            {
                isSuccess = FacadeManage.aidePlatformFacade.InsertTaskInfo(taskInfo);
            }

            if (isSuccess)
            {
                ShowInfo("保存任务信息成功", "TaskList.aspx", 1000);
            }
            else
            {
                ShowError("保存任务信息失败");
            }
        }
示例#25
0
        private void ProcessData()
        {
            SystemMessage systemMessage = new SystemMessage();

            systemMessage.MessageString = CtrlHelper.GetText(txtMessageString);
            systemMessage.MessageType   = Convert.ToInt32(ddlMessageType.SelectedValue.Trim());
            systemMessage.StartTime     = Convert.ToDateTime(CtrlHelper.GetText(txtStartTime));
            systemMessage.ConcludeTime  = Convert.ToDateTime(CtrlHelper.GetText(txtConcludeTime));
            systemMessage.TimeRate      = CtrlHelper.GetInt(txtTimeRate, 0);
            systemMessage.Nullity       = Convert.ToByte(rbtnNullity.SelectedValue.Trim());
            systemMessage.CollectNote   = CtrlHelper.GetText(txtCollectNote);

            #region 获取房间节点值

            StringBuilder sb = new StringBuilder();
            if (!tvKinds.Nodes[0].Checked)
            {
                foreach (TreeNode node in tvKinds.CheckedNodes)
                {
                    if (node.Value != "")
                    {
                        sb.Append(node.Value.ToString() + ",");
                    }
                }
            }
            else
            {
                sb.Length = 0;
                sb.Append("0");
            }

            if (sb.ToString() == "" || sb.ToString() == null)
            {
                ShowError("请选择要控制的房间!");
                return;
            }
            systemMessage.ServerRange = sb.ToString();
            #endregion

            Message msg = new Message();
            if (cmd == "add")
            {
                systemMessage.CreateMasterID = userExt.UserID;
                systemMessage.CreateDate     = DateTime.Now;
                msg = FacadeManage.aidePlatformFacade.InsertSystemMessage(systemMessage);
            }
            else
            {
                systemMessage.ID             = id;
                systemMessage.UpdateMasterID = userExt.UserID;
                systemMessage.UpdateDate     = DateTime.Now;
                systemMessage.UpdateCount    = CtrlHelper.GetInt(lblUpdateCount, 0) + 1;
                msg = FacadeManage.aidePlatformFacade.UpdateSystemMessage(systemMessage);
            }

            if (msg.Success)
            {
                if (cmd == "add")
                {
                    ShowInfo("系统消息增加成功", "SystemMessageList.aspx", 1200);
                }
                else
                {
                    ShowInfo("系统消息修改成功", "SystemMessageList.aspx", 1200);
                }
            }
            else
            {
                ShowError(msg.Content);
            }
        }
示例#26
0
        /// <summary>
        /// 数据保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strReason = CtrlHelper.GetText(txtReason);
            int    valiBet   = 0;
            int    a         = 0;

            if (!int.TryParse(txtGold.Text, out a))
            {
                MessageBox("赠送金币格式不正确");
                return;
            }
            if (!int.TryParse(VileBet.Text, out valiBet))
            {
                MessageBox("打码量格式不正确");
                return;
            }
            if (valiBet < 0)
            {
                MessageBox("打码量必须不小于0");
                return;
            }
            if (a > 1000000)
            {
                MessageBox("单次赠送不能超过1000000");
                return;
            }
            int  gold   = a;
            bool flag   = cbPull.Checked;
            int  userid = IntParam <= 0 ? CtrlHelper.GetInt(hidUserID, 0) : IntParam;

            if (string.IsNullOrEmpty(strReason))
            {
                MessageBox("赠送备注不能为空");
                return;
            }
            string ip = GameRequest.GetUserIP();
            RecordGrantTreasure rgt = new RecordGrantTreasure
            {
                MasterID = userExt.UserID,
                UserID   = userid,
                AddGold  = gold * 1000,
                ClientIP = ip,
                Reason   = strReason
            };

            btnSave.Enabled = false;
            Message msg = FacadeManage.aideTreasureFacade.GrantTreasure(rgt);

            if (msg.Success)
            {
                if (valiBet > 0)
                {
                    Message msg1 = FacadeManage.aideTreasureFacade.AddValiBet(valiBet * 1000, userid, 3, 1, strReason);
                    if (!msg1.Success)
                    {
                        MessageBox("怎加打码量失败");
                        return;
                    }
                }
                if (flag)
                {
                    AccountsUmeng umeng = FacadeManage.aideAccountsFacade.GetAccountsUmeng(IntParam);
                    if (!string.IsNullOrEmpty(umeng?.DeviceToken))
                    {
                        string   content = "系统管理员" + userExt.UserName + "已" + (gold < 0 ? "扣除" : "赠送") + "您" + gold.ToString() + "金币";
                        DateTime start   = DateTime.Now.AddMinutes(1);
                        DateTime end     = start.AddHours(5);
                        bool     result  = Umeng.SendMessage(umeng.DeviceType, content, "unicast", start.ToString("yyyy-MM-dd HH:mm:ss"), end.ToString("yyyy-MM-dd HH:mm:ss"), umeng.DeviceToken);
                        if (!result)
                        {
                            MessageBox("赠送成功,但推送消息失败,请前往友盟后台绑定系统后台ip");
                            return;
                        }
                        RecordAccountsUmeng record = new RecordAccountsUmeng
                        {
                            MasterID    = rgt.MasterID,
                            UserID      = rgt.UserID,
                            PushType    = umeng.DeviceType,
                            PushTime    = DateTime.Now,
                            PushIP      = ip,
                            PushContent = content
                        };
                        int rows = FacadeManage.aideRecordFacade.AddRecordAccountsUmeng(record);
                        MessageBox(rows > 0 ? "赠送成功" : "赠送成功,但推送记录写入失败");
                    }
                    else
                    {
                        MessageBox("赠送成功,但推送用户未绑定设备,无法推送");
                    }
                }
                else
                {
                    MessageBox("赠送成功");
                }
            }
            else
            {
                MessageBox("赠送失败");
            }
            btnSave.Enabled = true;
        }
示例#27
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            #region 验证

            //判断权限
            AuthUserOperationPermission(Permission.Edit);
            string strAccount        = TextFilter.FilterAll(CtrlHelper.GetText(txtAccount));  //帐号
            string strNickName       = TextFilter.FilterAll(CtrlHelper.GetText(txtNickName)); //昵称
            string strLoginPassword  = CtrlHelper.GetText(txtLogonPass);
            string strInsurePassword = CtrlHelper.GetText(txtInsurePass);

            // 验证帐号
            if (string.IsNullOrEmpty(strAccount))
            {
                MessageBox("帐号不能为空!");
                return;
            }
            int length = Encoding.Default.GetBytes(strAccount).Length;
            if (length > 32 || length < 6)
            {
                MessageBox("帐号的长度为6-32个字符");
                return;
            }

            // 验证昵称
            if (string.IsNullOrEmpty(strNickName))
            {
                strNickName = strAccount;
            }
            length = Encoding.Default.GetBytes(strNickName).Length;
            if (length > 32 || length < 6)
            {
                MessageBox("昵称的长度为6-32个字符");
                return;
            }

            // 验证登陆密码
            if (!string.IsNullOrEmpty(strLoginPassword))
            {
                if (strLoginPassword.Length > 32 || strLoginPassword.Length < 6)
                {
                    MessageBox("登陆密码的长度为6-32个字符");
                    return;
                }
            }

            // 验证保险柜密码
            if (!string.IsNullOrEmpty(strInsurePassword))
            {
                if (strInsurePassword.Length > 32 || strInsurePassword.Length < 6)
                {
                    MessageBox("保险柜密码的长度为6-32个字符");
                    return;
                }
            }

            //计算用户权限
            int intUserRight = 0;
            if (ckbUserRight.Items.Count > 0)
            {
                foreach (ListItem item in ckbUserRight.Items)
                {
                    if (item.Selected)
                    {
                        intUserRight |= int.Parse(item.Value);
                    }
                }
            }
            //计算管理权限
            int intMasterRight = 0;
            if (ckbMasterRight.Items.Count > 0)
            {
                foreach (ListItem item in ckbMasterRight.Items)
                {
                    if (item.Selected)
                    {
                        intMasterRight |= int.Parse(item.Value);
                    }
                }
            }
            #endregion

            AccountsInfo model = new AccountsInfo();
            model = FacadeManage.aideAccountsFacade.GetAccountInfoByUserID(IntParam);
            if (model == null)
            {
                return;
            }
            string strOldAccounts   = model.Accounts;   //原帐号
            string strOldNickName   = model.NickName;   //原昵称
            string strOldLogonPass  = model.LogonPass;  //原登录密码
            string strOldInsurePass = model.InsurePass; //原银行密码

            model.UserID      = IntParam;
            model.Accounts    = strAccount;
            model.NickName    = strNickName;
            model.LogonPass   = string.IsNullOrEmpty(strLoginPassword) ? model.LogonPass : Utility.MD5(CtrlHelper.GetText(txtLogonPass));
            model.InsurePass  = string.IsNullOrEmpty(strInsurePassword) ? model.InsurePass : Utility.MD5(CtrlHelper.GetText(txtInsurePass));
            model.UnderWrite  = CtrlHelper.GetText(txtUnderWrite);
            model.Experience  = CtrlHelper.GetInt(txtExperience, 0);
            model.Present     = CtrlHelper.GetInt(txtPresent, 0);
            model.LoveLiness  = CtrlHelper.GetInt(txtLoveLiness, 0);
            model.Gender      = byte.Parse(ddlGender.SelectedValue);
            model.FaceID      = (short)GameRequest.GetFormInt("inFaceID", 0);
            model.Nullity     = (byte)(ckbNullity.Checked ? 1 : 0);
            model.StunDown    = (byte)(ckbStunDown.Checked ? 1 : 0);
            model.MoorMachine = byte.Parse(rdoMoorMachine.SelectedValue);

            model.IsAndroid   = (byte)(chkIsAndroid.Checked ? 1 : 0);
            model.UserRight   = intUserRight;
            model.MasterRight = intMasterRight;
            model.MasterOrder = Convert.ToByte(ddlMasterOrder.SelectedValue.Trim());

            //头像
            int type = (short)GameRequest.GetFormInt("faceType", 0);  //头像类型
            if (type == 1)
            {
                //系统头像
                model.FaceID   = (short)GameRequest.GetFormInt("inFaceID", 0);
                model.CustomID = 0;
            }
            else
            {
                //自定义头像
                model.CustomID = GameRequest.GetFormInt("inFaceID", 0);
            }

            Message msg = new Message();
            msg = FacadeManage.aideAccountsFacade.UpdateAccount(model, userExt.UserID, GameRequest.GetUserIP());

            if (msg.Success)
            {
                MessageBox(msg.Content, Request.Url.AbsoluteUri);
            }
            else
            {
                MessageBox(msg.Content);
            }
        }
示例#28
0
        /// <summary>
        /// 点击保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (!IsValid)
            {
                return;
            }

            if (string.IsNullOrEmpty(CtrlHelper.GetSelectValue(ddlTypeID)))
            {
                ShowError("请为商品选择一个商品类型");
                return;
            }

            AwardInfo info = new AwardInfo();

            if (IntParam > 0)
            {
                if (!AuthUserOperationPermission(Permission.Edit))
                {
                    return;
                }
                info = FacadeManage.aideNativeWebFacade.GetAwardInfoByID(IntParam);
            }
            else
            {
                if (!AuthUserOperationPermission(Permission.Add))
                {
                    return;
                }
                info.CollectDate = DateTime.Now;
            }

            #region 图片验证


            //展示图上传
            try
            {
                info.AwardImg = upBigImage.FilePath;
            }
            catch (Exception ex)
            {
                ShowError("展示图上传失败:" + ex.Message);
                return;
            }

            if (string.IsNullOrEmpty(info.AwardImg))
            {
                ShowError("请上传商品大图");
                return;
            }

            #endregion

            info.AwardName = CtrlHelper.GetText(txtAwardName);
            if (info.AwardName.Length > 32)
            {
                ShowError("商品名称过长!");
                return;
            }
            info.Inventory = CtrlHelper.GetInt(txtInventory, 0);

            info.Nullity   = Convert.ToByte(rbNullity.SelectedValue);
            info.UnitPrice = CtrlHelper.GetInt(txtPrice, 0);
            info.Gold      = CtrlHelper.GetInt(txtGold, 0);
            info.Diamond   = CtrlHelper.GetInt(txtDiamond, 0);
            info.SortID    = CtrlHelper.GetInt(txtSortID, 0);
            info.AwardType = Convert.ToInt32(CtrlHelper.GetSelectValue(ddlTypeID));
            bool result;
            if (IntParam > 0)
            {
                result = FacadeManage.aideNativeWebFacade.UpdateAwardInfo(info);
            }
            else
            {
                result = FacadeManage.aideNativeWebFacade.InsertAwardInfo(info);
            }

            if (result)
            {
                ShowInfo("商品信息保存成功", "MallInfoList.aspx", 1000);
            }
            else
            {
                ShowError("商品信息保存失败");
            }
        }
示例#29
0
        /// <summary>
        /// 提交
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void btnPay_Click(object sender, EventArgs e)
        {
            string strAccounts   = CtrlHelper.GetText(txtPayAccounts);
            string strReAccounts = CtrlHelper.GetText(txtPayReAccounts);
            int    amount        = CtrlHelper.GetInt(txtPayAmount, 0);

            if (strAccounts == "")
            {
                RenderAlertInfo(true, "抱歉,请输入充值帐号。", 2);
                return;
            }
            if (strReAccounts != strAccounts)
            {
                RenderAlertInfo(true, "抱歉,两次输入的帐号不一致。", 2);
                return;
            }

            // 验证是否合法的金额
            if (amount <= 0)
            {
                RenderAlertInfo(true, "请输入正确的充值金额", 2);
                return;
            }

            // 支付方法
            string p9_paymethod = "";
            string payPrefix    = string.Empty;
            int    shareID      = 0;

            switch (payType)
            {
            case "alipay":
                payPrefix    = "JFTZFB";
                shareID      = 14;
                p9_paymethod = "4";
                break;

            case "wechat":
                payPrefix    = "JFTWX";
                shareID      = 15;
                p9_paymethod = "3";
                break;

            case "bank":
            default:
                payPrefix    = "JFTBank";
                shareID      = 13;
                p9_paymethod = "1";
                break;
            }

            OnLineOrder onlineOrder = new OnLineOrder();

            onlineOrder.ShareID = shareID;
            onlineOrder.OrderID = PayHelper.GetOrderIDByPrefix(payPrefix);

            if (Fetch.GetUserCookie() == null)
            {
                onlineOrder.OperUserID = 0;
            }
            else
            {
                onlineOrder.OperUserID = Fetch.GetUserCookie().UserID;
            }
            onlineOrder.Accounts    = strAccounts;
            onlineOrder.OrderAmount = amount;
            onlineOrder.IPAddress   = GameRequest.GetUserIP();

            //生成订单
            Message umsg = FacadeManage.aideTreasureFacade.RequestOrder(onlineOrder);

            if (!umsg.Success)
            {
                RenderAlertInfo(true, umsg.Content, 2);
                return;
            }

            // 商户ID
            string p1_usercode = ApplicationSettings.Get("jftBankID");
            // 秘钥
            string key = ApplicationSettings.Get("jftBankKey");
            // 回调页面
            string p4_returnurl = "http://" + HttpContext.Current.Request.Url.Authority + "/UserService/JFT/PublicReturn.aspx";
            // 通知地址
            string p5_notifyurl = "http://" + HttpContext.Current.Request.Url.Authority + "/UserService/JFT/PublicAdvice.aspx";
            // 请求时间
            string p6_ordertime = DateTime.Now.ToString("yyyyMMddHHmmss");
            // 签名信息
            string strEncryption = string.Format("{0}&{1}&{2}&{3}&{4}&{5}{6}",
                                                 p1_usercode,
                                                 onlineOrder.OrderID,
                                                 amount,
                                                 p4_returnurl,
                                                 p5_notifyurl,
                                                 p6_ordertime,
                                                 key
                                                 );
            string p7_sign = Utility.MD5(strEncryption).ToUpper();

            // 加密方法
            string p8_signtype = "";
            // 银行编码
            string p10_paychannelnum = "";
            // 商户进行支付的银行卡类型
            string p11_cardtype = "";
            // 银行支付类型
            string p12_channel = "";
            // 订单失效时间
            string p13_orderfailertime = "";
            // 客户或卖家名称
            string p14_customname = "";
            // 客户联系方式类型 1、email,2、phone,3、地址
            string p15_customcontacttype = "";
            // 客户联系方式
            string p16_customcontact = "";
            // 客户IP地址
            string p17_customip = "";
            // 商品名称
            string p18_product = "";
            // 商品种类
            string p19_productcat = "";
            // 商品数量
            string p20_productnum = "";
            // 商品描述
            string p21_pdesc = "";
            // 接口版本
            string p22_version = "2.0";
            // 编码类型
            string p23_charset = "";
            // 备注信息
            string p24_remark = "";

            #region 整理参数

            pnlContinue.Visible = false;
            RenderAlertInfo(false, "页面正跳转到支付平台,请稍候。。。", 2);

            StringBuilder builder = new StringBuilder();
            builder.AppendLine(CreateInputHidden("p1_usercode", p1_usercode));
            builder.AppendLine(CreateInputHidden("p2_order", onlineOrder.OrderID));
            builder.AppendLine(CreateInputHidden("p3_money", amount.ToString()));
            builder.AppendLine(CreateInputHidden("p4_returnurl", p4_returnurl));
            builder.AppendLine(CreateInputHidden("p5_notifyurl", p5_notifyurl));
            builder.AppendLine(CreateInputHidden("p6_ordertime", p6_ordertime));
            builder.AppendLine(CreateInputHidden("p7_sign", p7_sign));
            builder.AppendLine(CreateInputHidden("p8_signtype", p8_signtype));
            builder.AppendLine(CreateInputHidden("p9_paymethod", p9_paymethod));
            builder.AppendLine(CreateInputHidden("p10_paychannelnum", p10_paychannelnum));
            builder.AppendLine(CreateInputHidden("p11_cardtype", p11_cardtype));
            builder.AppendLine(CreateInputHidden("p12_channel", p12_channel));
            builder.AppendLine(CreateInputHidden("p13_orderfailertime", p13_orderfailertime));
            builder.AppendLine(CreateInputHidden("p14_customname", p14_customname));
            builder.AppendLine(CreateInputHidden("p15_customcontacttype", p15_customcontacttype));
            builder.AppendLine(CreateInputHidden("p16_customcontact", p16_customcontact));
            builder.AppendLine(CreateInputHidden("p17_customip", p17_customip));
            builder.AppendLine(CreateInputHidden("p18_product", p18_product));
            builder.AppendLine(CreateInputHidden("p19_productcat", p19_productcat));
            builder.AppendLine(CreateInputHidden("p20_productnum", p20_productnum));
            builder.AppendLine(CreateInputHidden("p21_pdesc", p21_pdesc));
            builder.AppendLine(CreateInputHidden("p22_version", p22_version));
            builder.AppendLine(CreateInputHidden("p23_charset", p23_charset));
            builder.AppendLine(CreateInputHidden("p24_remark", p24_remark));

            formData = builder.ToString();

            #endregion

            js = "<script>window.onload = function() { document.forms[0].submit(); }</script>";
        }