예제 #1
0
        /// <summary>
        /// 新增游戏配置
        /// </summary>
        /// <param name="game">配置信息</param>
        /// <returns></returns>
        public Message AddUserLoadGame(AccountsGame game)
        {
            var prams = new List <DbParameter>
            {
                Database.MakeInParam("dwUniteID", game.UniteID),
                Database.MakeInParam("dwTypeID", game.TypeID),
                Database.MakeInParam("dwKindID", game.KindID),
                Database.MakeInParam("dwSortID", game.SortID)
            };

            return(MessageHelper.GetMessage(Database, "NET_PW_AddUserLoadGame", prams));
        }
예제 #2
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("添加配置信息已存在");
            }
        }
예제 #3
0
 /// <summary>
 /// 新增游戏配置
 /// </summary>
 /// <param name="game">配置信息</param>
 /// <returns></returns>
 public Message AddUserLoadGame(AccountsGame game)
 {
     return(aideAccountsData.AddUserLoadGame(game));
 }