public void fillResultList(List <RechargeItem> result, List <Dictionary <string, object> > data)
    {
        for (int i = 0; i < data.Count; i++)
        {
            RechargeItem tmp = new RechargeItem();
            result.Add(tmp);
            tmp.m_time    = Convert.ToDateTime(data[i]["PayTime"]).ToLocalTime().ToString();
            tmp.m_account = Convert.ToString(data[i]["Account"]);
            tmp.m_orderId = Convert.ToString(data[i]["OrderID"]);
            tmp.m_payCode = Convert.ToString(data[i]["PayCode"]);
            tmp.m_process = Convert.ToBoolean(data[i]["Process"]);
            if (data[i].ContainsKey("RMB"))
            {
                tmp.m_totalPrice = Convert.ToInt32(data[i]["RMB"]);
            }
            if (data[i].ContainsKey("PlayerId"))
            {
                tmp.m_playerId = Convert.ToInt32(data[i]["PlayerId"]);
            }

            /* if (data[i].ContainsKey("ServerId"))
             * {
             *   int id = Convert.ToInt32(data[i]["ServerId"]);
             *   tmp.m_serverInfo = ResMgr.getInstance().getDbInfoById(id);
             * }*/
            fillResult(tmp, data[i]);
        }
    }
示例#2
0
    public void Read()
    {
        XmlDocument xmldoc  = new XmlDocument();
        string      xmlText = xLoad("Recharge");

        xmldoc.LoadXml(xmlText);
        XmlNodeList nodelist = xmldoc.SelectSingleNode("root").ChildNodes;

        foreach (XmlNode node in nodelist)
        {
            XmlAttributeCollection xAC = node.Attributes;
            GetAttribute           g   = new GetAttribute(xAC);
            int          id            = int.Parse(node.Name.Replace("ID", ""));
            RechargeItem info          = new RechargeItem();
            info.ID        = id;
            info.CnName    = g.getString("CnName");
            info.CnContent = g.getString("CnContent");
            info.EnName    = g.getString("EnName");
            info.EnContent = g.getString("EnContent");
            info.JpName    = g.getString("JpName");
            info.JpContent = g.getString("JpContent");
            info.Price     = g.getInt("Price");
            info.GemNum    = g.getInt("GemNum");
            if (!dicRechargeList.ContainsKey(id))
            {
                dicRechargeList.Add(id, info);
            }
        }
        HasReadToMemory = true;
        Debug.Log("TableRechargeLoadDone!");
    }
示例#3
0
    public void UpdateRechargeList()
    {
        GCGame.Utils.CleanGrid(m_TransRechargeGrid.gameObject);

        Obj_MainPlayer mainPlayer = Singleton <ObjManager> .Instance.MainPlayer;

        if (null == mainPlayer)
        {
            LogModule.ErrorLog("main player is not init");
            return;
        }

        for (int i = 0; i < TableManager.GetRecharge().Count; i++)
        {
            Tab_Recharge curTabRecharge = TableManager.GetRechargeByID(i, 0);
            if (null == curTabRecharge)
            {
                continue;
            }

            if (!RechargeData.m_dicGoodInfos.ContainsKey(curTabRecharge.RegisterID))
            {
                continue;
            }

            RechargeData.GoodInfo curGoodInfo = RechargeData.m_dicGoodInfos[curTabRecharge.RegisterID];

            string          iconName     = "";
            string          goodName     = curGoodInfo.goods_number + "#y";
            bool            bEnableTimes = false;
            PayActivityData payData      = GameManager.gameManager.PlayerDataPool.PayActivity;
            if (curTabRecharge.Type == 1 && payData.IsMonthCardFlag())
            {
                // 月卡并且已经生效
                // TT9809 月卡也显示
                //continue;
            }
            if (curTabRecharge.Type == 2 && (payData.IsGrowUpFlag() || mainPlayer.BaseAttr.Level >= payData.GrowUpLevel))
            {
                // 成长基金并且已经生效或者玩家已经大于50级
                continue;
            }
            else if (curTabRecharge.Type == 3)
            {
                bEnableTimes = true;
            }
            iconName = curTabRecharge.IconName;
            goodName = curTabRecharge.GoodName;

            RechargeItem.CreateItem(m_ObjRechargeItem, m_TransRechargeGrid, curGoodInfo.goods_register_id, iconName, curGoodInfo.goods_price, goodName, curTabRecharge.HotLabelTip, bEnableTimes);
        }

        UIGrid curGrid = m_TransRechargeGrid.GetComponent <UIGrid>();

        if (null != curGrid)
        {
            curGrid.repositionNow = true;
        }
    }
示例#4
0
    public static RechargeItem CreateItem(GameObject resItem, Transform grid, string registerID, string strIconName, string price, string goodName, string strHotLabelText, bool bEnableTimes)
    {
        GameObject newItem = Utils.BindObjToParent(resItem, grid.gameObject, registerID);

        if (null == newItem)
        {
            LogModule.ErrorLog("load recharge item error!");
            return(null);
        }
        RechargeItem curItem = newItem.GetComponent <RechargeItem>();

        if (null != curItem)
        {
            curItem.InitData(strIconName, price, goodName, strHotLabelText, bEnableTimes);
        }

        return(curItem);
    }
示例#5
0
    public void fillResultList(List <RechargeItem> result, List <Dictionary <string, object> > data, GMUser user)
    {
        string[] fieldChannel = { "ChannelID" };

        for (int i = 0; i < data.Count; i++)
        {
            RechargeItem tmp = new RechargeItem();
            result.Add(tmp);
            tmp.m_time    = Convert.ToDateTime(data[i]["PayTime"]).ToLocalTime().ToString();
            tmp.m_account = Convert.ToString(data[i]["Account"]);
            tmp.m_orderId = Convert.ToString(data[i]["OrderID"]);
            tmp.m_payCode = Convert.ToString(data[i]["PayCode"]);
            tmp.m_process = Convert.ToBoolean(data[i]["Process"]);
            if (data[i].ContainsKey("RMB"))
            {
                tmp.m_totalPrice = Convert.ToInt32(data[i]["RMB"]);
            }
            if (data[i].ContainsKey("PlayerId"))
            {
                tmp.m_playerId = Convert.ToInt32(data[i]["PlayerId"]);

                Dictionary <string, object> pd = QueryBase.getPlayerProperty(tmp.m_playerId, user, fieldChannel);
                if (pd != null)
                {
                    if (pd.ContainsKey("ChannelID"))
                    {
                        tmp.m_channelId = Convert.ToString(pd["ChannelID"]).PadLeft(6, '0');
                    }
                }
            }

            /* if (data[i].ContainsKey("ServerId"))
             * {
             *   int id = Convert.ToInt32(data[i]["ServerId"]);
             *   tmp.m_serverInfo = ResMgr.getInstance().getDbInfoById(id);
             * }*/
            fillResult(tmp, data[i]);
        }
    }
 public override void fillResult(RechargeItem tmp, Dictionary <string, object> data)
 {
     tmp.m_clientType = "shuanglong";
 }
 public virtual void fillResult(RechargeItem tmp, Dictionary <string, object> data)
 {
 }