Esempio n. 1
0
        public static List<OfficialGameMin> GetPlayedList(int topCount, int userId)
        {
            List<OfficialGameMin> fgmList = new List<OfficialGameMin>();

            bizOfficialMatchRank biz = new bizOfficialMatchRank();

            List<OfficialMatchRankRelationQuery> list = biz.GetPlayedList(userId);

            if (list != null)
            {
                for (int i = 0; i < list.Count && i < topCount; i++)
                {
                    OfficialGameMin fgm = new OfficialGameMin();
                    fgm.MatchId = list[i].gmid;
                    fgm.MatchName = list[i].GmName;

                    AddToFlashGameMin(fgmList, fgm);
                }
            }

            if (fgmList.Count < topCount)
            {
                List<OfficialMatchRank_HistoryRelationQuery> list_history = biz.GetPlayedHistoryList(userId);
                if (list_history != null)
                {
                    int k = topCount - fgmList.Count;

                    for (int i = 0; i < list_history.Count && i < k; i++)
                    {
                        OfficialGameMin fgm = new OfficialGameMin();
                        fgm.MatchId = list_history[i].gmid;
                        fgm.MatchName = list_history[i].GmName;

                        AddToFlashGameMin(fgmList, fgm);
                    }
                }
            }

            return fgmList;
        }
Esempio n. 2
0
        public static DataSet GetOfficialMatchRankList(int gmid, int topCount)
        {
            bizOfficialMatchRank biz = new bizOfficialMatchRank();

            OfficialMatchRelationQuery model = OfficialMatchFacade.GetModel(gmid);

            DataSet ds = new DataSet();

            if (model != null)
            {
                if (model.GmState == 1)
                {
                    if (topCount == 0)
                    {
                        ds = biz.GetOfficialMatchRankList(gmid);
                    }
                    else
                    {
                        ds = biz.GetOfficialMatchRankList(gmid, topCount);
                    }
                }
                else if (model.GmState == 3)
                {
                    if (topCount == 0)
                    {
                        ds = biz.GetOfficialMatchRankHistoryList(gmid);
                    }
                    else
                    {
                        ds = biz.GetOfficialMatchRankHistoryList(gmid, topCount);
                    }
                }
            }

            return ds;
        }
Esempio n. 3
0
 public static int GetOfficialMatchRankMaxScore(int gmid)
 {
     bizOfficialMatchRank biz = new bizOfficialMatchRank();
     return biz.GetOfficialMatchRankMaxScore(gmid);
 }
Esempio n. 4
0
 public static OfficialMatchRank GetModel(int gmid, int userid)
 {
     bizOfficialMatchRank biz = new bizOfficialMatchRank();
     return biz.GetModel(gmid, userid);
 }
Esempio n. 5
0
 public static int GetAwardCount(int gmid, int RankNum)
 {
     bizOfficialMatchRank biz = new bizOfficialMatchRank();
     return biz.GetAwardCount(gmid, RankNum);
 }
Esempio n. 6
0
 public static void SetUserRecord(int gmid, int userid, string username, decimal score)
 {
     bizOfficialMatchRank biz = new bizOfficialMatchRank();
     biz.SetUserRecord(gmid, userid, username, score);
 }
Esempio n. 7
0
 public static void GetUserRecord(int gmid, int userid, out decimal Score, out int order)
 {
     bizOfficialMatchRank biz = new bizOfficialMatchRank();
     biz.GetUserRecord(gmid, userid, out Score, out order);
 }