Example #1
0
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck(RightDef.OP_WEEK_CHAMPION_SETTING, context.Session, context.Response);

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

            ParamGrandPrixWeekChampion p = new ParamGrandPrixWeekChampion();

            p.m_op    = Convert.ToInt32(context.Request.Form["op"]);
            p.m_param = Convert.ToString(context.Request.Form["param"]);
            p.m_score = Convert.ToString(context.Request.Form["score"]);

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

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

            retVal.Add("op", p.m_op);
            retVal.Add("param", p.m_param);
            retVal.Add("score", p.m_score);
            retVal.Add("resultStr", str);
            retVal.Add("result", (int)res);

            if (!string.IsNullOrEmpty(p.m_retNickName))
            {
                retVal.Add("nickName", p.m_retNickName);
            }
            context.Response.ContentType = "text/plain";
            context.Response.Write(ItemHelp.genJsonStr(retVal));
        }
        protected void gameOnOff(MemberInfoDetail info, GMUser user)
        {
            if (!user.isAPIAcc())
            {
                gameOn.Visible = false;
                return;
            }

            string gameOpen = ItemHelp.getReverseGameList(info.m_gameClose);

            for (int i = 0; i < StrName.s_gameList.Count; i++)
            {
                GameInfo gi = StrName.s_gameList[i];

                CheckBox ck = new CheckBox();
                gameList.Controls.Add(ck);
                ck.Text = gi.m_gameName;
                ck.InputAttributes.Add("value", gi.m_gameId.ToString());

                //if (info.m_gameClose.IndexOf(gi.m_gameId.ToString()) >= 0)
                if (gameOpen.IndexOf(gi.m_gameId.ToString()) >= 0)
                {
                    ck.Checked = true;
                }
            }
        }
Example #3
0
        private void genBetInfo(InfoBaccarat info)
        {
            BetInfo bet = info.getBetInfo(4); // 庄

            tdZhuangBet.InnerText = ItemHelp.showMoneyValue(bet.bet_count).ToString();
            tdZhuangWin.InnerText = ItemHelp.showMoneyValue(bet.award_count).ToString();

            bet = info.getBetInfo(1); // 闲
            tdXianBet.InnerText = ItemHelp.showMoneyValue(bet.bet_count).ToString();
            tdXianWin.InnerText = ItemHelp.showMoneyValue(bet.award_count).ToString();

            bet = info.getBetInfo(0); // 和
            tdHeBet.InnerText = ItemHelp.showMoneyValue(bet.bet_count).ToString();
            tdHeWin.InnerText = ItemHelp.showMoneyValue(bet.award_count).ToString();

            bet = info.getBetInfo(3); // 庄对
            tdZhuangDuiBet.InnerText = ItemHelp.showMoneyValue(bet.bet_count).ToString();
            tdZhuangDuiWin.InnerText = ItemHelp.showMoneyValue(bet.award_count).ToString();

            bet = info.getBetInfo(2); // 闲对
            tdXianDuiBet.InnerText = ItemHelp.showMoneyValue(bet.bet_count).ToString();
            tdXianDuiWin.InnerText = ItemHelp.showMoneyValue(bet.award_count).ToString();

            // 总和
            tdSumBet.InnerText = ItemHelp.showMoneyValue(info.sumBet()).ToString();
            tdSumWin.InnerText = ItemHelp.showMoneyValue(info.sumAward()).ToString();
        }
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck(RightDef.TD_RECHARGE_PER_HOUR, context.Session, context.Response);
            ParamQuery param = new ParamQuery();

            param.m_time = DateTime.Now.Date.AddDays(-1).ToShortDateString() + "-" + DateTime.Now.Date.ToShortDateString();

            GMUser user = (GMUser)context.Session["user"];
            OpRes  res  = user.doQuery(param, QueryType.queryTypeRechargePerHour);
            Dictionary <string, object> retData = new Dictionary <string, object>();

            if (res == OpRes.opres_success)
            {
                DataEachDay qresult = (DataEachDay)user.getQueryResult(QueryType.queryTypeRechargePerHour);
                var         allData = qresult.getData();
                foreach (var data in allData)
                {
                    var s = string.Join <int>(",", data.m_data);
                    retData.Add(data.m_time.ToShortDateString(), s);
                }
            }

            string str = ItemHelp.genJsonStr(retData);

            context.Response.ContentType = "text/plain";
            context.Response.Write(str);
        }
Example #5
0
        /// <summary>
        ///     The nnames of well-known metadata for the specified item type.
        /// </summary>
        /// <param name="itemType">
        ///     The item type, or "*" for global item metadata.
        /// </param>
        /// <param name="includeGlobals">
        ///     Include global (built-in) metadata names?
        /// </param>
        /// <returns>
        ///     A sequence of metadata names.
        /// </returns>
        public static IEnumerable <string> WellKnownItemMetadataNames(string itemType, bool includeGlobals = true)
        {
            if (String.IsNullOrWhiteSpace(itemType))
            {
                throw new ArgumentException("Argument cannot be null, empty, or entirely composed of whitespace: 'itemType'.", nameof(itemType));
            }

            Help.ItemHelp itemHelp;
            if (!ItemHelp.TryGetValue(itemType, out itemHelp))
            {
                yield break;
            }

            // Well-known metadata.
            if (includeGlobals)
            {
                foreach (string metadataName in Utilities.MSBuildHelper.WellknownMetadataNames)
                {
                    yield return(metadataName);
                }
            }

            // Item-type-specific metadata.
            foreach (string metadataName in itemHelp.Metadata.Keys)
            {
                yield return(metadataName);
            }
        }
    public string toJson()
    {
        string str = "";
        Dictionary <string, object> ret = new Dictionary <string, object>();

        foreach (var d in m_data)
        {
            List <Dictionary <string, object> > List = new List <Dictionary <string, object> >();

            foreach (var dn in d.Value.m_data)
            {
                Dictionary <string, object> tmp = new Dictionary <string, object>();
                List.Add(tmp);
                tmp.Add("gameId", dn.Value.m_gameId);
                tmp.Add("Less10s", dn.Value.m_Less10s);
                tmp.Add("Less30s", dn.Value.m_Less30s);
                tmp.Add("Less60s", dn.Value.m_Less60s);
                tmp.Add("Less5min", dn.Value.m_Less5min);
                tmp.Add("Less10min", dn.Value.m_Less10min);
                tmp.Add("Less30min", dn.Value.m_Less30min);
                tmp.Add("Less60min", dn.Value.m_Less60min);
                tmp.Add("GT60min", dn.Value.m_GT60min);
            }

            ret.Add(d.Key.ToShortDateString(), List);
        }

        str = ItemHelp.genJsonStr(ret);
        return(str);
    }
Example #7
0
    private string getCondPlayerScore(ParamMemberInfo p, GMUser user)
    {
        string cond;

        if (p.isSearchAll()) // 搜索所有的
        {
            string createCode = "";
            if (string.IsNullOrEmpty(p.m_creator))
            {
                createCode = ItemHelp.getCreateCodeSpecial(user);
            }
            else
            {
                createCode = ItemHelp.getCreateCode(p.m_creator, user);
            }

            cond = string.Format(" opSrcCreateCode like '{0}%'  ", createCode);
        }
        else // 直接下级
        {
            if (string.IsNullOrEmpty(p.m_creator))
            {
                cond = string.Format(" opSrc='{0}' ", getAccountSpecial(user));
            }
            else
            {
                cond = string.Format(" opSrc='{0}' and opSrcCreateCode like '{1}%' ", p.m_creator,
                                     ItemHelp.getCreateCodeSpecial(user));
            }
        }
        return(cond);
    }
        // 增加统计页脚
        protected void addStatFoot(Table table, long totalIncome, long totalOutlay)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            m_content[0] = "总计";
            m_content[1] = "";
            // 总收入
            m_content[2] = ItemHelp.showMoneyValue(totalIncome).ToString();
            // 总支出
            m_content[3] = ItemHelp.showMoneyValue(totalOutlay).ToString();
            // 总盈亏
            m_content[4] = ItemHelp.showMoneyValue(totalIncome - totalOutlay).ToString();
            m_content[5] = "";
            m_content[6] = "";

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

                if (j == 4)
                {
                    setColor(td, m_content[j]);
                }
            }
        }
Example #9
0
    // 当前账号是否由user派生出来的
    public bool isDerivedFrom(GMUser user)
    {
        string ccode = ItemHelp.getCreateCodeSpecial(user);
        int    index = m_createCode.IndexOf(ccode, 0);

        return(index == 0);
    }
Example #10
0
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck("", context.Session, context.Response);

            ParamQuery param = new ParamQuery();

            param.m_param = context.Request.Form["data"];
            param.m_time  = context.Request.Form["time"];

            string str = "";

            if (param.m_param == "4")
            {
                Dictionary <string, object> ret = new Dictionary <string, object>();
                var data = Fish_LevelCFG.getInstance().getAllData();
                foreach (var d in data)
                {
                    ret.Add(d.Key.ToString(), d.Value.m_openRate);
                }
                str = ItemHelp.genJsonStr(ret);
            }
            else
            {
                GMUser          user   = (GMUser)context.Session["user"];
                OpRes           res    = user.doQuery(param, QueryType.queryTypeNewPlayer);
                ResultNewPlayer result = (ResultNewPlayer)user.getQueryResult(QueryType.queryTypeNewPlayer);
                str = result.toJson(param.m_param);
            }

            context.Response.ContentType = "text/plain";
            context.Response.Write(str);
        }
Example #11
0
        // 增加统计页脚
        protected void addStatFoot(Table table, EarningItem item)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            m_content[0] = "总计";
            // 总收入
            m_content[1] = ItemHelp.showMoneyValue(item.getRoomIncome(4)).ToString();
            // 总支出
            m_content[2] = ItemHelp.showMoneyValue(item.getRoomOutlay(4)).ToString();
            // 总盈亏
            m_content[3] = ItemHelp.showMoneyValue(item.getDelta(4)).ToString();
            m_content[4] = item.getFactExpRate(4);

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

                if (j == 3 || j == 4)
                {
                    setRedColor(td);
                }
            }
        }
Example #12
0
    // 生成查询具体账号的条件
    protected virtual string genAccSearchCond(GMUser user, ParamMemberInfo p)
    {
        string cond = "";

        if (isSearchGM())
        {
            if (p.m_acc == user.m_user ||
                user.m_accType == AccType.ACC_SUPER_ADMIN) // 是自己
            {
                cond = string.Format(" acc='{0}' ", p.m_acc);
            }
            else
            {
                cond = string.Format(" acc='{0}' and createCode like '{1}%' ", p.m_acc, ItemHelp.getCreateCodeSpecial(user));
            }
        }
        else if (isSearchPlayer())
        {
            cond = string.Format(" acc='{0}' and createCode like '{1}%' ", p.m_acc, ItemHelp.getCreateCodeSpecial(user));
        }
        else
        {
            cond = string.Format(" opDst='{0}' and opSrcCreateCode like '{1}%' ", p.m_acc, ItemHelp.getCreateCodeSpecial(user));
        }

        return(cond);
    }
Example #13
0
    private void scoreLog(string tableName, ParamScore p, long score, GMUser user)
    {
        long remainMoney = ItemHelp.getRemainMoney(p.m_toAcc, p.isToPlayer(), user);

        // 操作账号余额
        long opSrcRemainMoney = ItemHelp.getRemainMoney(user.m_user, false, user);

        /*string cmd = string.Format(SqlStrCMD.SQL_CMD_PLAYER_SCORE,
         *                         tableName,
         *                         DateTime.Now.ToString(ConstDef.DATE_TIME24),
         *                         user.m_user,
         *                         p.m_toAcc,
         *                         p.m_op,
         *                         score,
         *                         user.m_moneyType,
         *                         user.m_depth,
         *                         user.m_createCode,
         *                         p.isToPlayer() ? AccType.ACC_PLAYER : 0,
         *                         remainMoney);
         *
         * user.sqlDb.executeOp(cmd, user.getMySqlServerID(), MySqlDbName.DB_XIANXIA);
         */
        // 生成上下分记录
        OrderInfo oinfo =
            OrderGenerator.genOfflineSuccessOrder(user.m_user, p.m_toAcc, score,
                                                  p.m_op,
                                                  p.isToPlayer() ? AccType.ACC_PLAYER : 0,
                                                  remainMoney, p.m_orderFrom);
        // 生成上下分记录
        string cmd = OrderGenerator.genSqlForLogScore(oinfo, user.m_createCode, opSrcRemainMoney);

        user.sqlDb.executeOp(cmd, user.getMySqlServerID(), MySqlDbName.DB_XIANXIA);
    }
Example #14
0
    private OpRes updateWashRatio(ParamModifyGmProperty p, DestGmUser dst, GMUser user)
    {
        if (dst.m_owner != user.m_user)
        {
            return(OpRes.op_res_no_right);
        }

        ParamCreateGmAccount param = new ParamCreateGmAccount();

        param.m_washRatio = p.m_param;
        double washRatio = 0;

        if (!ItemHelp.isValidWashRatio(param, user, ref washRatio))
        {
            return(OpRes.op_res_param_not_valid);
        }

        SqlUpdateGenerator gen = new SqlUpdateGenerator();

        gen.addField("washRatio", washRatio, FieldType.TypeNumber);

        string sql   = gen.getResultSql(TableName.GM_ACCOUNT, string.Format(" acc='{0}' ", p.m_acc));
        int    count = user.sqlDb.executeOp(sql, user.getMySqlServerID(), MySqlDbName.DB_XIANXIA);

        return(count > 0 ? OpRes.opres_success : OpRes.op_res_db_failed);
    }
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck(RightDef.GM_TYPE_EDIT, context.Session, context.Response);
            ParamGmTypeEdit param = new ParamGmTypeEdit();

            param.m_op       = Convert.ToInt32(context.Request.Form["op"]);
            param.m_param    = context.Request.Form["param"];
            param.m_newValue = context.Request.Form["newValue"];

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

            string str = "";

            switch (param.m_op)
            {
            case DefCC.OP_ADD:
            {
                Dictionary <string, object> retData = new Dictionary <string, object>();
                retData.Add("result", (int)res);
                retData.Add("acc", param.m_param);
                retData.Add("id", param.m_newValue);
                str = ItemHelp.genJsonStr(retData);
            }
            break;

            case DefCC.OP_MODIFY:
            {
                Dictionary <string, object> retData = new Dictionary <string, object>();
                retData.Add("result", (int)res);
                retData.Add("id", param.m_param);
                retData.Add("newValue", param.m_newValue);
                str = ItemHelp.genJsonStr(retData);
            }
            break;

            case DefCC.OP_REMOVE:
            {
                Dictionary <string, object> retData = new Dictionary <string, object>();
                retData.Add("result", (int)res);
                retData.Add("id", param.m_param);
                str = ItemHelp.genJsonStr(retData);
            }
            break;

            case DefCC.OP_VIEW:
            {
                List <Dictionary <string, object> > gmList  = (List <Dictionary <string, object> >)user.getDyopResult(DyOpType.opTypeGmTypeEdit);
                Dictionary <string, object>         retData = new Dictionary <string, object>();
                retData.Add("gmList", gmList);

                str = ItemHelp.genJsonStr(retData);
            }
            break;
            }

            context.Response.ContentType = "text/plain";
            context.Response.Write(str);
        }
Example #16
0
        protected void genTable(Table table, GMUser user)
        {
            ParamTotalConsume param = new ParamTotalConsume();

            param.m_time         = m_time.Text;
            param.m_currencyType = moneyType.SelectedIndex + 1;
            OpRes res = user.doQuery(param, QueryType.queryTypeFishConsume);

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

            ResultTotalConsume qresult = (ResultTotalConsume)user.getQueryResult(QueryType.queryTypeFishConsume);

            var fields = from f in qresult.m_fields orderby f ascending select f;

            int i = 0, k = 0;

            TableCell td = new TableCell();
            TableRow  tr = new TableRow();

            tr.Cells.Add(td);
            table.Rows.Add(tr);

            // 生成行标题
            foreach (var reason in fields)
            {
                tr = new TableRow();
                table.Rows.Add(tr);

                td      = new TableCell();
                td.Text = qresult.getFishReason(reason);
                tr.Cells.Add(td);
            }

            for (i = 0; i < qresult.getResultCount(); i++)
            {
                TotalConsumeItem item = qresult.m_result[i];

                td      = new TableCell();
                td.Text = item.m_time.ToShortDateString();

                k  = 0;
                tr = table.Rows[k];
                tr.Cells.Add(td);

                // 生成这个结果
                foreach (var reason in fields)
                {
                    k++;
                    tr = table.Rows[k];

                    td      = new TableCell();
                    td.Text = ItemHelp.showMoneyValue(item.getValue(reason)).ToString();
                    tr.Cells.Add(td);
                }
            }
        }
Example #17
0
        protected void genResultTable(Table table, GMUser user, OpRes res, ParamQuery param)
        {
            m_page.InnerHtml = "";
            m_foot.InnerHtml = "";

            TableRow tr = new TableRow();

            table.Rows.Add(tr);

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

            int i = 0;

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

            // long totalIncome = 0;
            // long totalOutlay = 0;

            List <ResultPlayerBankerInfo> qresult
                = (List <ResultPlayerBankerInfo>)user.getQueryResult(QueryType.queryTypeBaccaratPlayerBanker);

            foreach (var info in qresult)
            {
                m_content[0] = info.m_genTime;
                m_content[1] = info.m_playerId.ToString();
                m_content[2] = info.m_nickName;
                m_content[3] = info.m_bankerCount.ToString();
                m_content[4] = ItemHelp.showMoneyValue(info.m_beforeGold).ToString();
                m_content[5] = ItemHelp.showMoneyValue(info.m_nowGold).ToString();
                m_content[6] = ItemHelp.showMoneyValue(info.m_resultValue).ToString();
                m_content[7] = ItemHelp.showMoneyValue(info.m_sysGet).ToString();

                tr = new TableRow();
                table.Rows.Add(tr);
                for (int j = 0; j < s_head.Length; j++)
                {
                    TableCell td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }

            string page_html = "", foot_html = "";

            m_gen.genPage(param, @"/appaspx/stat/baccarat/BaccaratPlayerBanker.aspx", ref page_html, ref foot_html, user);
            m_page.InnerHtml = page_html;
            m_foot.InnerHtml = foot_html;
        }
Example #18
0
        protected void onSellerChanged(object sender, EventArgs e)
        {
            GMUser user = (GMUser)Session["user"];

            m_sellerAdmin.Items.Clear();
            m_sellerAdmin.Items.Add(new ListItem("全部", ""));
            ItemHelp.fillDropDownList(m_sellerAdmin, AccType.ACC_SELLER_ADMIN, m_seller.SelectedValue, user);
        }
Example #19
0
        // 下注表
        protected void genBetTable(Table table, InfoCrocodile info)
        {
            GMUser user = (GMUser)Session["user"];

            TableRow tr = new TableRow();

            table.Rows.Add(tr);

            int i = 0;

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

            long totalBet = 0, totalWin = 0;

            // 1-12个区域
            for (i = 1; i < 13; i++)
            {
                Crocodile_RateCFGData data = Crocodile_RateCFG.getInstance().getValue(i);

                BetInfoCrocodile item = info.getBetInfo(i);
                if (item != null)
                {
                    m_content[1] = item.rate.ToString();
                    m_content[2] = ItemHelp.showMoneyValue(item.bet_count).ToString();
                    totalBet    += item.bet_count;

                    m_content[3] = ItemHelp.showMoneyValue(item.award_count).ToString();
                    totalWin    += item.award_count;
                }
                else
                {
                    m_content[1] = m_content[2] = m_content[3] = "";
                }

                tr = new TableRow();
                table.Rows.Add(tr);
                for (int j = 0; j < s_head.Length; j++)
                {
                    TableCell td = new TableCell();
                    tr.Cells.Add(td);
                    if (j == 0)
                    {
                        addBetImg(td, data);
                    }
                    else
                    {
                        td.Text = m_content[j];
                    }
                }
            }

            addStatFoot(table, totalBet, totalWin);
        }
Example #20
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;
            }

            ResultCows qresult = (ResultCows)user.getQueryResult(QueryType.queryTypeIndependentCows);

            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];
            }

            i = 0;
            Dictionary <int, CrocodileInfo> dict = qresult.m_betInfo.OrderBy(o => o.Key).ToDictionary(o => o.Key, p => p.Value);

            foreach (var info in dict)
            {
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                m_result.Rows.Add(tr);

                m_content[0] = info.Key.ToString();
                m_content[1] = qresult.getAreaName(info.Key);
                m_content[2] = info.Value.m_winCount.ToString();
                m_content[3] = ItemHelp.showMoneyValue(info.Value.m_income).ToString();
                m_content[4] = ItemHelp.showMoneyValue(info.Value.m_outlay).ToString();
                m_content[5] = info.Value.getFactExpRate();

                for (k = 0; k < s_head.Length; k++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[k];
                }
                i++;
            }
        }
    public string toJson()
    {
        string str = "";
        Dictionary <string, object> data = new Dictionary <string, object>();
        Dictionary <string, object> ret1 = toJson(PlayerType.TYPE_NEW);
        Dictionary <string, object> ret2 = toJson(PlayerType.TYPE_ACTIVE);

        data.Add(PlayerType.TYPE_NEW.ToString(), ret1);
        data.Add(PlayerType.TYPE_ACTIVE.ToString(), ret2);
        str = ItemHelp.genJsonStr(data);
        return(str);
    }
    public string toJson()
    {
        string str = "";
        Dictionary <string, object> data = new Dictionary <string, object>();
        Dictionary <string, object> ret1 = toJson(1);
        Dictionary <string, object> ret2 = toJson(2);

        data.Add("1", ret1);
        data.Add("2", ret2);
        str = ItemHelp.genJsonStr(data);
        return(str);
    }
        // 增加页脚总和
        public void addFootSum(Table table, bool isDetailSubAgent)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            m_content[0] = "总和";
            m_content[1] = "";                                                                         // 级别,账号类型
            m_content[2] = "";                                                                         // 账号
            m_content[3] = ItemHelp.toStrByComma(ItemHelp.showMoneyValue(m_sum.m_item.m_totalOutlay)); // 总押注
            m_content[4] = ItemHelp.toStrByComma(ItemHelp.showMoneyValue(m_sum.m_item.m_totalIncome)); // 总返还

            // 总盈利
            m_content[5] =
                ItemHelp.toStrByComma(ItemHelp.showMoneyValue(m_sum.m_item.m_totalOutlay - m_sum.m_item.m_totalIncome));
            m_content[6] = ItemHelp.toStrByComma(ItemHelp.showMoneyValue(m_sum.m_item.m_totalWashCount)); // 洗码量
            m_content[7] = "";                                                                            // 洗码比

            string[] head = null;
            if (isDetailSubAgent)
            {
                m_content[8]  = ItemHelp.toStrByComma(m_sum.m_washCommission);         // 洗码佣金
                m_content[9]  = ItemHelp.toStrByComma(m_sum.m_totalMoney);             // 总金额
                m_content[10] = "";                                                    // 代理占成
                m_content[11] = ItemHelp.toStrByComma(m_sum.m_agentHandInCompany);     // 代理交公司
                m_content[12] = ItemHelp.toStrByComma(m_sum.m_outlayHandInCompany);    // 交公司投注
                m_content[13] = ItemHelp.toStrByComma(m_sum.m_washCountHandInCompany); // 交公司洗码量
                m_content[14] = m_sum.getCompanyProfitRatioStr();                      // 公司获利比

                head = s_head;
            }
            else
            {
                m_content[8] = ItemHelp.toStrByComma(m_sum.m_washCommission); // 洗码佣金
                m_content[9] = ItemHelp.toStrByComma(m_sum.m_totalMoney);     // 总金额

                head = s_head1;
            }

            TableCell td = null;

            for (int k = 0; k < head.Length; k++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = m_content[k];

                if (k == 14)
                {
                    setColor(td, td.Text);
                }
            }
        }
Example #24
0
        // 增加统计页脚
        protected void addDetailStatFoot(Table table, EarningItem item, int gameId)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            m_content[0] = "总计";

            m_content[1] = ItemHelp.showMoneyValue(item.getRoomIncome(0)).ToString();
            m_content[2] = ItemHelp.showMoneyValue(item.getRoomOutlay(0)).ToString();
            m_content[3] = ItemHelp.showMoneyValue(item.getDelta(0)).ToString();
            m_content[4] = item.getFactExpRate(0);

            /* m_content[5] = ItemHelp.showMoneyValue(item.getRoomIncome(1)).ToString();
             * m_content[6] = ItemHelp.showMoneyValue(item.getRoomOutlay(1)).ToString();
             * m_content[7] = ItemHelp.showMoneyValue(item.getDelta(1)).ToString();
             * m_content[8] = item.getFactExpRate(1);
             *
             * m_content[9] = ItemHelp.showMoneyValue(item.getRoomIncome(2)).ToString();
             * m_content[10] = ItemHelp.showMoneyValue(item.getRoomOutlay(2)).ToString();
             * m_content[11] = ItemHelp.showMoneyValue(item.getDelta(2)).ToString();
             * m_content[12] = item.getFactExpRate(2);
             *
             * m_content[13] = ItemHelp.showMoneyValue(item.getRoomIncome(3)).ToString();
             * m_content[14] = ItemHelp.showMoneyValue(item.getRoomOutlay(3)).ToString();
             * m_content[15] = ItemHelp.showMoneyValue(item.getDelta(3)).ToString();
             * m_content[16] = item.getFactExpRate(3);
             *
             * m_content[17] = ItemHelp.showMoneyValue(item.getRoomIncome(4)).ToString();
             * m_content[18] = ItemHelp.showMoneyValue(item.getRoomOutlay(4)).ToString();
             * m_content[19] = ItemHelp.showMoneyValue(item.getDelta(4)).ToString();
             * m_content[20] = item.getFactExpRate(4);
             *
             * if (gameId == (int)GameId.fishlord)
             * {
             *   m_content[21] = ItemHelp.showMoneyValue(item.getRoomOutlay(5)).ToString();
             *   m_content[22] = ItemHelp.showMoneyValue(item.getRoomOutlay(6)).ToString();
             * }*/

            for (int j = 0; j < getHead1Length(gameId); j++)
            {
                TableCell td = new TableCell();
                tr.Cells.Add(td);
                td.Style.Clear();
                td.Text = m_content[j];
            }

            /*for (int k = 3; k < 20; k += 4)
             * {
             *  setRedColor(tr.Cells[k]);
             *  setRedColor(tr.Cells[k + 1]);
             * }*/
        }
Example #25
0
        /// <summary>
        ///     Type initialiser for <see cref="MSBuildSchemaHelp"/>.
        /// </summary>
        static MSBuildSchemaHelp()
        {
            string extensionDirectory = Environment.GetEnvironmentVariable("MSBUILD_PROJECT_TOOLS_DIR");

            if (String.IsNullOrWhiteSpace(extensionDirectory))
            {
                throw new InvalidOperationException("Cannot determine current extension directory ('MSBUILD_PROJECT_TOOLS_DIR' environment variable is not present).");
            }

            extensionDirectory = Path.GetFullPath(extensionDirectory);
            HelpDirectory      = new DirectoryInfo(
                Path.Combine(extensionDirectory, "help")
                );
            ElementHelpFile = new FileInfo(
                Path.Combine(HelpDirectory.FullName, "elements.json")
                );
            PropertyHelpFile = new FileInfo(
                Path.Combine(HelpDirectory.FullName, "properties.json")
                );
            ItemHelpFile = new FileInfo(
                Path.Combine(HelpDirectory.FullName, "items.json")
                );
            TaskHelpFile = new FileInfo(
                Path.Combine(HelpDirectory.FullName, "tasks.json")
                );

            using (StreamReader input = ElementHelpFile.OpenText())
                using (JsonTextReader json = new JsonTextReader(input))
                {
                    ElementHelp = Help.ElementHelp.FromJson(json);
                }

            using (StreamReader input = PropertyHelpFile.OpenText())
                using (JsonTextReader json = new JsonTextReader(input))
                {
                    PropertyHelp = Help.PropertyHelp.FromJson(json);
                }

            using (StreamReader input = ItemHelpFile.OpenText())
                using (JsonTextReader json = new JsonTextReader(input))
                {
                    ItemHelp = Help.ItemHelp.FromJson(json);
                    GlobalItemMetadataHelp = ItemHelp.ContainsKey("*") ? ItemHelp["*"].Metadata : new SortedDictionary <string, string>();
                }

            using (StreamReader input = TaskHelpFile.OpenText())
                using (JsonTextReader json = new JsonTextReader(input))
                {
                    TaskHelp = Help.TaskHelp.FromJson(json);
                }
        }
Example #26
0
    public string getRightJson()
    {
        Dictionary <string, object> ret = new Dictionary <string, object>();

        // 人员类型列表
        List <Dictionary <string, object> > gmTypeList = new List <Dictionary <string, object> >();
        var drs = from d in m_rs
                  orderby d.Value.m_genTime
                  select d;

        foreach (var d in drs)
        {
            Dictionary <string, object> dt = new Dictionary <string, object>();
            dt.Add("gmTypeId", d.Key);
            dt.Add("gmTypeName", d.Value.m_gmTypeName);
            gmTypeList.Add(dt);
        }
        ret.Add("gmTypeList", gmTypeList);

        // 每个GM类型的权限
        foreach (var d in m_rs)
        {
            Dictionary <string, object> dt1 = new Dictionary <string, object>();
            ret.Add(d.Key, dt1);

            foreach (var sd in d.Value.getRightSet())
            {
                Dictionary <string, object> dt2 = new Dictionary <string, object>();
                dt1.Add(sd.Key, dt2);

                dt2.Add("canEdit", sd.Value.m_canEdit);
                dt2.Add("canView", sd.Value.m_canView);
            }
        }

        List <Dictionary <string, object> > rightList = new List <Dictionary <string, object> >();
        // 所有权限
        var allRight = ResMgr.getInstance().getBaseRight();

        foreach (var d in allRight)
        {
            Dictionary <string, object> dt = new Dictionary <string, object>();
            dt.Add("rightId", d.Key);
            dt.Add("rightName", d.Value.m_rightName);
            dt.Add("category", d.Value.m_category);
            rightList.Add(dt);
        }
        ret.Add("rightList", rightList);

        return(ItemHelp.genJsonStr(ret));
    }
Example #27
0
        public void init(GMUser user)
        {
            switch (user.m_accType)
            {
            case AccType.ACC_SUPER_ADMIN:
            {
                m_dealer.Items.Add(new ListItem("全部", ""));
                ItemHelp.fillDropDownList(m_dealer, AccType.ACC_DEALER, user.m_user, user);
                onDealerChanged(null, null);
            }
            break;

            case AccType.ACC_DEALER:
            {
                m_dealerAdmin.Items.Add(new ListItem("全部", ""));
                ItemHelp.fillDropDownList(m_dealerAdmin, AccType.ACC_DEALER_ADMIN, user.m_user, user);
                onDealerAdminChanged(null, null);
                m_dealer.Enabled = false;
            }
            break;

            case AccType.ACC_DEALER_ADMIN:
            {
                m_seller.Items.Add(new ListItem("全部", ""));
                ItemHelp.fillDropDownList(m_seller, AccType.ACC_SELLER, user.m_user, user);
                onSellerChanged(null, null);
                m_dealer.Enabled      = false;
                m_dealerAdmin.Enabled = false;
            }
            break;

            case AccType.ACC_SELLER:
            {
                m_sellerAdmin.Items.Add(new ListItem("全部", ""));
                ItemHelp.fillDropDownList(m_sellerAdmin, AccType.ACC_SELLER_ADMIN, user.m_user, user);
                m_dealer.Enabled      = false;
                m_dealerAdmin.Enabled = false;
                m_seller.Enabled      = false;
            }
            break;

            case AccType.ACC_SELLER_ADMIN:
            {
                m_dealer.Enabled      = false;
                m_dealerAdmin.Enabled = false;
                m_seller.Enabled      = false;
                m_sellerAdmin.Enabled = false;
            }
            break;
            }
        }
Example #28
0
        /// <summary>
        ///     Get help content for a well-known MSBuild item type.
        /// </summary>
        /// <param name="itemType">
        ///     The item type (e.g. Compile, Content).
        /// </param>
        /// <returns>
        ///     The item help content, or <c>null</c> if no content is available for it.
        /// </returns>
        public static string ForItemType(string itemType)
        {
            if (String.IsNullOrWhiteSpace(itemType))
            {
                throw new ArgumentException("Argument cannot be null, empty, or entirely composed of whitespace: 'itemName'.", nameof(itemType));
            }

            if (ItemHelp.TryGetValue(itemType, out ItemHelp help))
            {
                return(help.Description);
            }

            return(null);
        }
Example #29
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);
        }
        // 增加统计页脚
        protected void addStatFoot(Table table, long totalWin, InfoDragon info)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            m_content[0] = "总计";
            m_content[1] = info.getFinalOdds().ToString();
            m_content[2] = ItemHelp.showMoneyValue(totalWin).ToString();

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