示例#1
0
    // 解析牛牛json串信息
    public static InfoCows parseInfoCows(string exInfo, GMUser user)
    {
        InfoCows info = null;

        try
        {
            DbCowsBet bet = BaseJsonSerializer.deserialize <DbCowsBet>(exInfo);
            if (bet == null)
            {
                return(null);
            }

            info           = new InfoCows();
            info.m_betInfo = bet;

            ObjectId oid = ObjectId.Parse(bet.key);
            Dictionary <string, object> data = DBMgr.getInstance().getTableData(TableName.PUMP_COWS_CARD,
                                                                                "_id",
                                                                                oid,
                                                                                user.getDbServerID(),
                                                                                DbName.DB_PUMP);

            if (data == null)
            {
                return(null);
            }

            detailInfoForCows(info, data);
        }
        catch (System.Exception ex)
        {
        }
        return(info);
    }
示例#2
0
        private void genBetInfo(InfoCows info)
        {
            DbCowsBet bet = info.m_betInfo;

            tdEastBet.InnerText = bet.betgold0.ToString();
            tdEastWin.InnerText = bet.wingold0.ToString();

            tdSouthBet.InnerText = bet.betgold1.ToString();
            tdSouthWin.InnerText = bet.wingold1.ToString();

            tdWestBet.InnerText = bet.betgold2.ToString();
            tdWestWin.InnerText = bet.wingold2.ToString();

            tdNorthBet.InnerText = bet.betgold3.ToString();
            tdNorthWin.InnerText = bet.wingold3.ToString();

            tdSumBet.InnerText = bet.sumBet().ToString();
            tdSumWin.InnerText = bet.sumWin().ToString();
        }
        private void genBetInfo(InfoCows info)
        {
            DbCowsBet bet = info.m_betInfo;

            tdEastBet.InnerText = ItemHelp.showMoneyValue(bet.betgold0).ToString();
            tdEastWin.InnerText = ItemHelp.showMoneyValue(bet.wingold0).ToString();

            tdSouthBet.InnerText = ItemHelp.showMoneyValue(bet.betgold1).ToString();
            tdSouthWin.InnerText = ItemHelp.showMoneyValue(bet.wingold1).ToString();

            tdWestBet.InnerText = ItemHelp.showMoneyValue(bet.betgold2).ToString();
            tdWestWin.InnerText = ItemHelp.showMoneyValue(bet.wingold2).ToString();

            tdNorthBet.InnerText = ItemHelp.showMoneyValue(bet.betgold3).ToString();
            tdNorthWin.InnerText = ItemHelp.showMoneyValue(bet.wingold3).ToString();

            tdSumBet.InnerText = ItemHelp.showMoneyValue(bet.sumBet()).ToString();
            tdSumWin.InnerText = ItemHelp.showMoneyValue(bet.sumWin()).ToString();
        }