OpRes statAve(IMongoQuery imq, GMUser user)
    {
        m_result.Clear();
        MapReduceResult mapResult = DBMgr.getInstance().executeMapReduce(TableName.STAT_PLAYER_GAME_BET_RESULT,
                                                                         user.getDbServerID(),
                                                                         DbName.DB_PUMP,
                                                                         imq,
                                                                         MapReduceTable.getMap("userGameBet"),
                                                                         MapReduceTable.getReduce("userGameBet"));

        if (mapResult != null)
        {
            IEnumerable <BsonDocument> bson = mapResult.GetResults();

            foreach (BsonDocument d in bson)
            {
                ResultItemPlayerGameBet tmp = new ResultItemPlayerGameBet();
                m_result.Add(tmp);

                BsonValue resValue = d["value"];

                tmp.m_time  = Convert.ToDateTime(d["_id"]).ToLocalTime();
                tmp.m_round = resValue["playerCount"].ToInt32();

                long   max = resValue["maxCarry"].ToInt64();
                long   min = resValue["minCarry"].ToInt64();
                double sum = resValue["sumCarry"].ToDouble();
                tmp.addData(ResultItemPlayerGameBet.CARRY, sum, max, min);

                max = resValue["maxOutlay"].ToInt64();
                min = resValue["minOutlay"].ToInt64();
                sum = resValue["sumOutlay"].ToDouble();
                tmp.addData(ResultItemPlayerGameBet.OUTLAY, sum, max, min);

                max = resValue["maxWin"].ToInt64();
                min = resValue["minWin"].ToInt64();
                sum = resValue["sumWin"].ToDouble();
                tmp.addData(ResultItemPlayerGameBet.WIN, sum, max, min);

                max = resValue["maxLose"].ToInt64();
                min = resValue["minLose"].ToInt64();
                sum = resValue["sumLose"].ToDouble();
                tmp.addData(ResultItemPlayerGameBet.LOSE, sum, max, min);

                tmp.m_rw = resValue["rw"].ToInt64();
            }
        }

        return(OpRes.opres_success);
    }
Пример #2
0
        protected void onQuery(object sender, EventArgs e)
        {
            GMUser     user  = (GMUser)Session["user"];
            ParamQuery param = new ParamQuery();

            param.m_curPage       = m_gen.curPage;
            param.m_countEachPage = m_gen.rowEachPage;
            param.m_param         = txtPlayerId.Text;
            param.m_time          = __time__.Text;

            OpRes res = user.doQuery(param, QueryType.queryTypeBaccaratPlayerBanker);

            genResultTable(m_result, user, res, param);
        }
    // 会话退出
    public void sessionEnd(HttpSessionState session)
    {
        if (session["user"] == null)
        {
            return;
        }

        GMUser info = (GMUser)session["user"];

        if (m_user.ContainsKey(info.m_user))
        {
            m_user.Remove(info.m_user);
        }
    }
    string genCond(object param, GMUser user)
    {
        QueryCondGenerator gen = new QueryCondGenerator();

        gen.addCondition(string.Format("apiCreatorCode like '{0}%' ",
                                       user.m_createCode));
        if (param != null)
        {
            string acc = (string)param;
            gen.addCondition(string.Format("apiAcc='{0}'", acc));
        }

        return(gen.and());
    }
Пример #5
0
        protected void onReset(object sender, EventArgs e)
        {
            GMUser user = (GMUser)Session["user"];

            ParamFishlordParamAdjust p = new ParamFishlordParamAdjust();

            p.m_isReset  = true;
            p.m_roomList = "1";
            p.m_gameId   = GameId.shcd;
            OpRes res = user.doDyop(p, DyOpType.opTypeGameParamAdjust);

            m_res.InnerHtml = OpResMgr.getInstance().getResultString(res);
            genExpRateTable(m_expRateTable);
        }
Пример #6
0
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck(RIGHT.SCORE, context.Session, context.Response);

            GMUser     user  = (GMUser)context.Session["user"];
            ParamScore param = new ParamScore();

            param.m_op    = Convert.ToInt32(context.Request.Form["op"]);
            param.m_toAcc = context.Request.Form["acc"];
            param.m_score = context.Request.Form["param"];
            int targetType = Convert.ToInt32(context.Request.Form["targetType"]);

            if (targetType == AccType.ACC_PLAYER)
            {
                param.scoreToPlayer();
            }
            else
            {
                param.scoreToMgr();
            }

            OpRes  res = user.doDyop(param, DyOpType.opTypeDyOpScore);
            string str = OpResMgr.getInstance().getResultString(res);

            long remainScoreFixBug = -1;

            if (targetType == AccType.ACC_SUPER_ADMIN || targetType == AccType.ACC_SUPER_ADMIN_SUB)
            {
                remainScoreFixBug = 0;
            }
            else
            {
                remainScoreFixBug = ItemHelp.getRemainMoney(param.m_toAcc, targetType == AccType.ACC_PLAYER, user);
            }

            Dictionary <string, object> ret = new Dictionary <string, object>();

            ret.Add("result", (int)res);
            ret.Add("resultInfo", str);

            string rs = (user.m_accType == AccType.ACC_SUPER_ADMIN ||
                         user.m_accType == AccType.ACC_SUPER_ADMIN_SUB) ? "0" : ItemHelp.toStrByComma(ItemHelp.showMoneyValue(user.m_money));

            ret.Add("remainScoreStr", rs);
            ret.Add("remainScore", ItemHelp.showMoneyValue(user.m_money));
            ret.Add("remainScoreFixBug", ItemHelp.showMoneyValue(remainScoreFixBug));
            str = BaseJsonSerializer.genJsonStr(ret);
            context.Response.ContentType = "text/plain";
            context.Response.Write(str);
        }
Пример #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RightMgr.getInstance().opCheck(RightDef.OP_INFORM_HEAD, Session, Response);

            if (!IsPostBack)
            {
                GMUser user = (GMUser)Session["user"];
                genTable(m_result, user);
            }
            else
            {
                m_playerList = Request["playerList"];
            }
        }
Пример #8
0
    ResultAPIItem getItem(ParamApiApprove p, GMUser user)
    {
        OpRes res = user.doQuery(p.m_apiAcc, QueryType.queryTypeQueryApiApprove);

        if (res != OpRes.opres_success)
        {
            return(null);
        }

        List <ResultAPIItem> qresult =
            (List <ResultAPIItem>)user.getQueryResult(QueryType.queryTypeQueryApiApprove);

        return(qresult[0]);
    }
        protected void onStat(object sender, EventArgs e)
        {
            GMUser            user  = (GMUser)Session["user"];
            ParamTotalConsume param = new ParamTotalConsume();

            param.m_changeType   = m_changeType.SelectedIndex;
            param.m_currencyType = Convert.ToInt32(m_currencyType.SelectedValue);
            param.m_time         = m_time.Text;

            QueryMgr mgr = user.getSys <QueryMgr>(SysType.sysTypeQuery);
            OpRes    res = mgr.doQuery(param, QueryType.queryTypeTotalConsume, user);

            genTable(m_result, res, user, mgr);
        }
Пример #10
0
        private void genTable(Table table, OpRes res, GMUser user)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            TableCell td = null;

            if (res != OpRes.opres_success)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            List <MemberInfo> qresult = (List <MemberInfo>)user.getQueryResult(QueryType.queryTypePlayerMember);
            int i = 0, j = 0;

            // 表头
            for (i = 0; i < s_head.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head[i];
            }

            for (i = 0; i < qresult.Count; i++)
            {
                MemberInfo item = qresult[i];
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                table.Rows.Add(tr);

                m_content[0] = item.m_acc;
                m_content[1] = item.m_createTime;
                m_content[2] = item.m_seller;
                m_content[3] = item.m_sellerAdmin;
                m_content[4] = item.m_money.ToString() + StrName.s_moneyType[item.m_moneyType];

                for (j = 0; j < s_head.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }
        }
Пример #11
0
        private void genTable(Table table, OpRes res, ParamGameCalfRoping param, GMUser user)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            TableCell td = null;

            if (res != OpRes.opres_success)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            int i = 0, k = 0;

            for (i = 0; i < s_head.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head[i];
            }

            List <ResultCalfRopingLevelItem> qresult =
                (List <ResultCalfRopingLevelItem>)user.getQueryResult(param, QueryType.queryTypeGameCalfRoping);

            for (i = 0; i < qresult.Count; i++)
            {
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                m_result.Rows.Add(tr);
                ResultCalfRopingLevelItem item = qresult[i];

                m_content[0] = item.m_passId.ToString();
                m_content[1] = item.m_hitCount.ToString();
                m_content[2] = item.allcount.ToString();
                m_content[3] = item.getHitRate();

                for (k = 0; k < s_head.Length; k++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[k];
                }
            }
        }
Пример #12
0
        private void genTable(Table table, OpRes res, ParamGrandPrix param, GMUser user)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            TableCell td = null;

            if (res != OpRes.opres_success)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            int i = 0, k = 0;

            for (i = 0; i < s_head.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head[i];
            }

            List <ResultChampionItem> qresult =
                (List <ResultChampionItem>)user.getQueryResult(param, QueryType.queryTypeGrandPrix);

            for (i = 0; i < qresult.Count; i++)
            {
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                m_result.Rows.Add(tr);
                ResultChampionItem item = qresult[i];

                m_content[0] = item.m_time;
                m_content[1] = item.m_playerId.ToString();
                m_content[2] = item.m_nickName;
                m_content[3] = item.m_bestScore.ToString();

                for (k = 0; k < s_head.Length; k++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[k];
                }
            }
        }
        private void genTableByDay(Table table, OpRes res, GMUser user)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            TableCell td = null;

            if (res != OpRes.opres_success)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            StatResultSeller qresult = (StatResultSeller)user.getStatResult(StatType.statTypeSeller);
            int i = 0, j = 0;

            // 表头
            for (i = 0; i < s_head1.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head1[i];
            }

            for (i = 0; i < qresult.m_items.Count; i++)
            {
                StatResultSellerItem item = qresult.m_items[i];
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                table.Rows.Add(tr);

                m_content[0] = item.m_time;
                m_content[1] = item.m_addScore.ToString();
                m_content[2] = item.m_addScoreCount.ToString();
                m_content[3] = item.m_desScore.ToString();
                m_content[4] = item.m_desScoreCount.ToString();

                for (j = 0; j < s_head1.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }
        }
Пример #14
0
    public OpRes onModifyExpRate(GMUser user, string expRate, string roomList, DyOpType dyType)
    {
        ParamFishlordParamAdjust p = new ParamFishlordParamAdjust();

        p.m_isReset  = false;
        p.m_expRate  = expRate;
        p.m_roomList = roomList;

        OpRes res = user.doDyop(p, dyType /*DyOpType.opTypeFishlordParamAdjust*/);

        // genExpRateTable(m_expRateTable, user);

        return(res);
    }
        protected void onAddWishCurse(object sender, EventArgs e)
        {
            ParamAddWishCurse param = new ParamAddWishCurse();

            param.m_gameId   = Convert.ToInt32(m_game.SelectedValue);
            param.m_opType   = m_opType.SelectedIndex;
            param.m_wishType = m_type.SelectedIndex;
            param.m_playerId = m_playerId.Text;
            param.m_rate     = m_rate.Text;
            GMUser user = (GMUser)Session["user"];
            OpRes  res  = user.doDyop(param, DyOpType.opTypeWishCurse);

            m_res.InnerHtml = OpResMgr.getInstance().getResultString(res);
        }
Пример #16
0
    public override OpRes doDyop(object param, GMUser user)
    {
        ParamModifyGmProperty p   = (ParamModifyGmProperty)param;
        DestGmUser            dst = new DestGmUser(p.m_acc, user);

        if (!dst.m_isExists)
        {
            return(OpRes.op_res_no_right);
        }

        OpRes res   = OpRes.op_res_failed;
        int   count = 0;

        switch (p.m_whichProperty)
        {
        case ParamModifyGmProperty.MODIFY_ALIASNAME:
        {
            if (!dst.isDerivedFrom(user))
            {
                return(OpRes.op_res_no_right);
            }

            SqlUpdateGenerator gen = new SqlUpdateGenerator();
            gen.addField("aliasName", p.m_param, FieldType.TypeString);
            string sql = gen.getResultSql(TableName.GM_ACCOUNT, string.Format(" acc='{0}' ", p.m_acc));
            count = user.sqlDb.executeOp(sql, user.getMySqlServerID(), MySqlDbName.DB_XIANXIA);
            res   = count > 0 ? OpRes.opres_success : OpRes.op_res_db_failed;
        }
        break;

        case ParamModifyGmProperty.MODIFY_AGENT_RATION:
        {
            res = updateAgentRatio(p, dst, user);
        }
        break;

        case ParamModifyGmProperty.MODIFY_WASH_RATION:
        {
            res = updateWashRatio(p, dst, user);
        }
        break;

        case ParamModifyGmProperty.MODIFY_ACC_STATE:
        {
            res = modifyAccState(p, user);
        }
        break;
        }
        return(res);
    }
Пример #17
0
        protected void onKickPlayer(object sender, EventArgs e)
        {
            GMUser        user  = (GMUser)Session["user"];
            ParamPlayerOp param = new ParamPlayerOp();

            param.m_acc = m_acc.Text;
            OpRes res = user.doDyop(param, DyOpType.opTypeKickPlayer);

            m_res.InnerHtml = OpResMgr.getInstance().getResultString(res);
            if (res == OpRes.opres_success)
            {
                m_res.InnerHtml += ",该玩家10分钟以内不能重新登录";
            }
        }
Пример #18
0
    // 开始统计
    public override OpRes doStat(object param, GMUser user)
    {
        ParamQueryRecharge p   = (ParamQueryRecharge)param;
        QueryMgr           mgr = user.getSys <QueryMgr>(SysType.sysTypeQuery);

        m_cond.startQuery();
        OpRes res = mgr.makeQuery(param, QueryType.queryTypeRecharge, user, m_cond);

        if (res != OpRes.opres_success)
        {
            return(res);
        }

        IMongoQuery   imq = m_cond.getImq();
        QueryDocument qd  = (QueryDocument)imq;

        if (!qd.Contains("PayTime"))
        {
            return(OpRes.op_res_time_format_error);
        }

        m_result.Clear();
        QueryRecharge   rq         = mgr.getQuery <QueryRecharge>(QueryType.queryTypeRecharge);
        int             serverId   = DBMgr.getInstance().getSpecialServerId(DbName.DB_PAYMENT);
        MapReduceResult map_result = DBMgr.getInstance().executeMapReduce(rq.getPlatInfo().m_tableName,
                                                                          serverId,
                                                                          DbName.DB_PAYMENT,
                                                                          imq,
                                                                          MapReduceTable.getMap("sameOrderId"),
                                                                          MapReduceTable.getReduce("sameOrderId"));
        int count = 0;

        if (map_result != null)
        {
            IEnumerable <BsonDocument> bson = map_result.GetResults();
            foreach (BsonDocument d in bson)
            {
                BsonValue resValue = d["value"];
                count = resValue["total"].ToInt32();
                if (count > 1)
                {
                    ResultSameOrderIdItem tmp = new ResultSameOrderIdItem();
                    m_result.Add(tmp);
                    tmp.m_count   = count;
                    tmp.m_orderId = Convert.ToString(d["_id"]);
                }
            }
        }
        return(OpRes.opres_success);
    }
    public override OpRes doQuery(object param, GMUser user)
    {
        m_result.Clear();
        ParamRealTimeOrder p    = (ParamRealTimeOrder)param;
        string             cond = "";
        OpRes res = getQueryCond(p, user, ref cond);

        if (res != OpRes.opres_success)
        {
            return(res);
        }

        string cmd = string.Format(SQL_QUERY_REAL_TIME_ORDER,
                                   TableName.PLAYER_ORDER_COMPLETE,
                                   cond,
                                   (p.m_curPage - 1) * p.m_countEachPage,
                                   p.m_countEachPage);

        // 查看满足条件的记当个数
        user.totalRecord = user.sqlDb.getRecordCountNoWhere(TableName.PLAYER_ORDER_COMPLETE,
                                                            cond, user.getMySqlServerID(), MySqlDbName.DB_XIANXIA);

        List <Dictionary <string, object> > dataList = user.sqlDb.queryList(cmd,
                                                                            user.getMySqlServerID(), MySqlDbName.DB_XIANXIA);

        if (dataList == null)
        {
            return(OpRes.op_res_failed);
        }

        for (int i = 0; i < dataList.Count; i++)
        {
            OrderInfoItem info = new OrderInfoItem();
            m_result.Add(info);

            Dictionary <string, object> data = dataList[i];
            info.m_orderId    = Convert.ToString(data["orderId"]);
            info.m_apiOrderId = Convert.ToString(data["apiOrderId"]);
            info.m_genTime    = Convert.ToDateTime(data["genTime"]);
            info.m_finishTime = Convert.ToDateTime(data["finishTime"]);
            info.m_gmAcc      = Convert.ToString(data["gmAcc"]);
            info.m_playerAcc  = Convert.ToString(data["playerAcc"]);
            info.m_orderType  = Convert.ToInt32(data["orderType"]);
            info.m_money      = Convert.ToInt64(data["money"]);
            info.m_orderState = Convert.ToInt32(data["orderState"]);
            info.m_failReason = Convert.ToInt32(data["failReason"]);
        }

        return(OpRes.opres_success);
    }
        protected void onExport(object sender, EventArgs e)
        {
            GMUser user = (GMUser)Session["user"];
            ParamDragonBallDaily param = new ParamDragonBallDaily();

            param.m_time      = m_time.Text;
            param.m_discount  = m_discount.Text;
            param.m_eachValue = m_eachValue.Text;

            ExportMgr mgr = user.getSys <ExportMgr>(SysType.sysTypeExport);
            OpRes     res = mgr.doExport(param, ExportType.exportTypeDragonBallDaily, user);

            m_res.InnerHtml = OpResMgr.getInstance().getResultString(res);
        }
    public string getRootUser(GMUser user)
    {
        if (!string.IsNullOrEmpty(m_acc))
        {
            return(m_acc);
        }

        if (string.IsNullOrEmpty(m_creator))
        {
            return(user.m_user);
        }

        return(m_creator);
    }
        protected void onModify(object sender, EventArgs e)
        {
            ParamModifyPwd p = new ParamModifyPwd();

            p.m_playerId = m_account.Text;
            p.m_newPwd   = m_newPwd.Text;
            p.m_pwdType  = Convert.ToInt32(m_pwdType.SelectedValue);

            GMUser  user = (GMUser)Session["user"];
            DyOpMgr mgr  = user.getSys <DyOpMgr>(SysType.sysTypeDyOp);
            OpRes   res  = mgr.doDyop(p, DyOpType.opTypeModifyPwd, user);

            m_res.InnerHtml = OpResMgr.getInstance().getResultString(res);
        }
Пример #23
0
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck("", context.Session, context.Response);

            ParamMaxBetLimit param = new ParamMaxBetLimit();

            param.m_gameId = Convert.ToInt32(context.Request.Form["gameId"]);
            if (param.m_gameId == (int)GameId.fishpark)
            {
                param.m_rateList = context.Request.Form["newValue"];
            }
            else
            {
                param.m_newValue = Convert.ToInt32(context.Request.Form["newValue"]);
            }
            param.m_areaId = Convert.ToInt32(context.Request.Form["areaId"]);
            param.m_op     = Convert.ToInt32(context.Request.Form["op"]);

            GMUser user = (GMUser)context.Session["user"];
            OpRes  res  = user.doDyop(param, DyOpType.opTypeModifyMaxBetLimit);
            string ret  = "";

            if (param.isModify())
            {
                ret  = ((int)res).ToString();
                ret += "@" + OpResMgr.getInstance().getResultString(res);
                ret += "@" + param.m_gameId.ToString();
                ret += "@" + param.m_areaId.ToString();
                if (param.m_gameId == (int)GameId.fishpark)
                {
                    ret += "@" + param.m_rateList;
                }
                else
                {
                    ret += "@" + param.m_newValue.ToString();
                }
            }
            else if (param.isQuery())
            {
                Dictionary <string, object> qresult =
                    (Dictionary <string, object>)user.getSys <DyOpMgr>(SysType.sysTypeDyOp).getDyOp(DyOpType.opTypeModifyMaxBetLimit).getResult();
                ret = BaseJsonSerializer.genJsonStr(qresult);
            }
            else
            {
                ret = OpResMgr.getInstance().getResultString(res);
            }
            context.Response.ContentType = "text/plain";
            context.Response.Write(ret);
        }
Пример #24
0
        private void genTable(Table table, ParamQuery param, GMUser user, QueryMgr mgr)
        {
            table.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            TableCell td = null;

            List <ResultMoneyMost> qresult = (List <ResultMoneyMost>)mgr.getQueryResult(QueryType.queryTypeMoneyAtMost);
            int i = 0, j = 0;

            string[] head = null;
            if (param.m_way == QueryWay.by_way0)
            {
                head = s_head;
            }
            else
            {
                head = s_head1;
            }

            // 表头
            for (i = 0; i < head.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = head[i];
            }

            for (i = 0; i < qresult.Count; i++)
            {
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                table.Rows.Add(tr);

                m_content[0] = qresult[i].m_playerId.ToString();
                m_content[1] = qresult[i].m_nickName;
                m_content[2] = qresult[i].m_val.ToString();

                for (j = 0; j < s_head.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }
        }
        protected void onSendMail(object sender, EventArgs e)
        {
            GMUser  user = (GMUser)Session["user"];
            DyOpMgr mgr  = user.getSys <DyOpMgr>(SysType.sysTypeDyOp);

            if (m_strList == "")
            {
                genTable(m_result, user, mgr);
                return;
            }
            DyOpSendMail dyip = (DyOpSendMail)mgr.getDyOp(DyOpType.opTypeSendMail);

            string[] str = Tool.split(m_strList, ',');
            for (int i = 0; i < str.Length; i++)
            {
                ParamSendMail param = new ParamSendMail();
                Dictionary <string, object> data = dyip.getCheckMail(user, str[i]);
                if (data != null)
                {
                    param.m_title          = Convert.ToString(data["title"]);
                    param.m_sender         = Convert.ToString(data["sender"]);
                    param.m_content        = Convert.ToString(data["content"]);
                    param.m_validDay       = Convert.ToString(data["validDay"]);
                    param.m_toPlayer       = Convert.ToString(data["toPlayer"]);
                    param.m_itemList       = Convert.ToString(data["itemList"]);
                    param.m_target         = Convert.ToInt32(data["target"]);
                    param.m_condVipLevel   = Convert.ToString(data["vipLevel"]);
                    param.m_condLogoutTime = Convert.ToString(data["logOutTime"]);
                    if (data.ContainsKey("comment"))
                    {
                        param.m_comment = Convert.ToString(data["comment"]);
                    }
                    param.m_isCheck = false;

                    OpRes res = dyip.doDyop(param, user);
                    if (param.m_result == "" && res == OpRes.opres_success)
                    {
                        dyip.removeCheckMail(user, str[i]);
                        m_res.InnerHtml = OpResMgr.getInstance().getResultString(res);
                    }
                    else
                    {
                        m_res.InnerHtml = OpResMgr.getInstance().getResultString(res);
                    }
                }
            }

            genTable(m_result, user, mgr);
        }
        private void genTable(Table table, GMUser user, DyOpMgr mgr)
        {
            table.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            TableCell td = null;

            int i = 0, j = 0;

            // 表头
            for (i = 0; i < s_head.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head[i];
            }

            List <ParamCheckMail> resultList = new List <ParamCheckMail>();
            DyOpSendMail          dyip = (DyOpSendMail)mgr.getDyOp(DyOpType.opTypeSendMail);

            dyip.getCheckMailList(user, resultList);

            for (i = 0; i < resultList.Count; i++)
            {
                tr = new TableRow();
                table.Rows.Add(tr);

                m_content[0]  = resultList[i].m_result;
                m_content[1]  = resultList[i].m_target == 0 ? "给指定玩家发送" : "全服发送";
                m_content[2]  = resultList[i].m_title;
                m_content[3]  = resultList[i].m_sender;
                m_content[4]  = resultList[i].m_content;
                m_content[5]  = resultList[i].m_validDay;
                m_content[6]  = resultList[i].m_toPlayer;
                m_content[7]  = resultList[i].m_itemList;
                m_content[8]  = resultList[i].m_condLogoutTime;
                m_content[9]  = resultList[i].m_condVipLevel;
                m_content[10] = resultList[i].m_comment;
                m_content[11] = Tool.getCheckBoxHtml("sel", resultList[i].m_id, false);

                for (j = 0; j < s_head.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }
        }
Пример #27
0
    private OpRes query(GMUser user)
    {
        List <Dictionary <string, object> > dataList = DBMgr.getInstance().executeQuery(TableName.DRAGON_ROOM,
                                                                                        user.getDbServerID(), DbName.DB_GAME);

        if (dataList == null)
        {
            return(OpRes.opres_success);
        }

        for (int i = 0; i < dataList.Count; i++)
        {
            ResultDragonParam info = new ResultDragonParam();
            m_result.Add(info);

            info.m_roomId = Convert.ToInt32(dataList[i]["room_id"]);
            if (dataList[i].ContainsKey("expect_earn_rate"))
            {
                info.m_expRate = Convert.ToDouble(dataList[i]["expect_earn_rate"]);
            }
            else
            {
                info.m_expRate = 0.05;
            }

            if (dataList[i].ContainsKey("room_income")) // 总收入
            {
                info.m_totalIncome = Convert.ToInt64(dataList[i]["room_income"]);
            }
            if (dataList[i].ContainsKey("room_outcome"))  // 总支出
            {
                info.m_totalOutlay = Convert.ToInt64(dataList[i]["room_outcome"]);
            }
            if (dataList[i].ContainsKey("double_income"))  // 翻倍收入
            {
                info.m_doubleIncome = Convert.ToInt64(dataList[i]["double_income"]);
            }
            if (dataList[i].ContainsKey("double_outcome"))  // 翻倍支出
            {
                info.m_doubleOutcome = Convert.ToInt64(dataList[i]["double_outcome"]);
            }
            if (dataList[i].ContainsKey("player_count"))
            {
                info.m_curPlayerCount = Convert.ToInt32(dataList[i]["player_count"]);
            }
        }

        return(OpRes.opres_success);
    }
Пример #28
0
        private void genTable(Table table, GMUser user)
        {
            m_result.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

            m_result.Rows.Add(tr);
            TableCell td = null;

            int i = 0, j = 0;

            // 表头
            for (i = 0; i < s_head.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head[i];
            }

            string dir = HttpRuntime.BinDirectory + "..\\excel\\";

            string path = Path.Combine(dir, user.m_user);

            if (Directory.Exists(path))
            {
                string[] allExcels = Directory.GetFiles(path);

                for (i = 0; i < allExcels.Length; i++)
                {
                    tr = new TableRow();
                    if ((i & 1) == 0)
                    {
                        tr.CssClass = "alt";
                    }
                    m_result.Rows.Add(tr);

                    string fileName = Path.GetFileName(allExcels[i]);
                    string href     = string.Format("/excel/{0}/{1}", user.m_user, fileName);
                    m_content[0] = "<a href=\"" + href + "\">" + fileName + "</a>";
                    m_content[1] = Directory.GetLastWriteTime(allExcels[i]).ToString();

                    for (j = 0; j < s_head.Length; j++)
                    {
                        td = new TableCell();
                        tr.Cells.Add(td);
                        td.Text = m_content[j];
                    }
                }
            }
        }
        protected void genTable(Table result, GMUser user)
        {
            TableRow  tr = new TableRow();
            TableCell td = null;

            int i = 0, k = 0;

            result.Rows.Add(tr);

            // 列标题
            for (i = 0; i < s_head.Length; i++)
            {
                td      = new TableCell();
                td.Text = s_head[i];
                tr.Cells.Add(td);
            }

            OpRes res = user.doQuery(null, QueryType.queryTypeGmAccount);
            List <GMAccountItem> qresult = (List <GMAccountItem>)user.getQueryResult(QueryType.queryTypeGmAccount);

            // 添加内容
            for (i = 0; i < qresult.Count; i++)
            {
                GMAccountItem item = qresult[i];
                if (item.m_type == "admin")
                {
                    continue;
                }

                tr = new TableRow();
                result.Rows.Add(tr);

                // 第0列
                td      = new TableCell();
                td.Text = Tool.getCheckBoxHtml("flag", item.m_user, false);
                tr.Cells.Add(td);

                // 第1列
                td      = new TableCell();
                td.Text = item.m_user;
                tr.Cells.Add(td);

                // 第2列
                td = new TableCell();
                CheckBoxList chkList = getCheckBoxList(item);
                td.Controls.Add(chkList);
                tr.Cells.Add(td);
            }
        }
Пример #30
0
        private void genTable(Table table, GMUser user)
        {
            table.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            TableCell td = null;

            QueryMgr mgr = user.getSys <QueryMgr>(SysType.sysTypeQuery);

            mgr.doQuery(null, QueryType.queryTypeCurNotice, user);
            List <ResultNoticeInfo> qresult = (List <ResultNoticeInfo>)mgr.getQueryResult(QueryType.queryTypeCurNotice);

            int i = 0, j = 0;

            // 表头
            for (i = 0; i < s_head.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head[i];
            }

            for (i = 0; i < qresult.Count; i++)
            {
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                table.Rows.Add(tr);

                m_tableContent[0] = qresult[i].m_id;
                m_tableContent[1] = qresult[i].m_genTime;
                m_tableContent[2] = qresult[i].m_deadTime;
                m_tableContent[3] = qresult[i].m_title;
                m_tableContent[4] = qresult[i].m_content;
                m_tableContent[5] = qresult[i].m_comment;
                m_tableContent[6] = qresult[i].m_order.ToString();
                m_tableContent[7] = Tool.getCheckBoxHtml("sel", m_tableContent[0], false);

                for (j = 0; j < s_head.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_tableContent[j];
                }
            }
        }