Esempio n. 1
0
        public static List <TextTwo> ServerSelByAbbre(string sServerAbbres)
        {
            List <string> lsServerAbbre = new List <string>(sServerAbbres.Split('|'));
            XElement      xdObject      = XElement.Load("http://db.dao50.com/data/game.xml");

            var serverinfo = from server in xdObject.Elements("game").Elements("server")
                             from serverabbre in lsServerAbbre
                             where serverabbre == server.Attribute("abbre").Value
                             select new
            {
                gamename    = server.Parent.Attribute("name").Value,
                serverid    = server.Attribute("id").Value,
                servername  = server.Value,
                serverabbre = server.Attribute("abbre").Value
            };
            List <TextTwo> lttServerInfo = new List <TextTwo>();

            foreach (var server in serverinfo)
            {
                TextTwo ttServer = new TextTwo();
                ttServer.first  = string.Format("{0} {1} {2}服", server.gamename, server.servername, server.serverid);
                ttServer.second = server.serverabbre.ToString();
                lttServerInfo.Add(ttServer);
            }
            return(lttServerInfo);
        }
Esempio n. 2
0
        public static List <TextTwo> GetUserInfo(string sUserID, string sGameAbbre)
        {
            string      sUrl      = string.Format("http://{0}/loginselectlist?username={1}&site={2}", GetDomain(sGameAbbre), sUserID, GetSite(sGameAbbre));
            XmlDocument objXmlDoc = new XmlDocument();

            objXmlDoc.Load(sUrl);
            XmlNode        nodeObject = objXmlDoc.SelectSingleNode("/Result");
            string         sGameSite  = GetSite(sGameAbbre);
            List <TextTwo> ttLObject  = new List <TextTwo>();

            foreach (XmlNode xn in nodeObject)
            {
                XmlElement xe       = (XmlElement)xn;
                TextTwo    ttObject = new TextTwo();
                ttObject.first  = xe.GetAttribute("ID");
                ttObject.second = xe.GetAttribute("NickName");
                ttLObject.Add(ttObject);
            }
            return(ttLObject);
        }
Esempio n. 3
0
        public static List <TextTwo> GameHelpSelFromCMS(string sClassID)
        {
            Database  dbDCenter = DatabaseFactory.CreateDatabase(sCMSConn);
            DbCommand dcGame    = dbDCenter.GetStoredProcCommand("Game_Help");

            dbDCenter.AddInParameter(dcGame, "@classid", DbType.String, sClassID);

            IDataReader    drGame = dbDCenter.ExecuteReader(dcGame);
            List <TextTwo> sDRes  = new List <TextTwo>();

            while (drGame.Read())
            {
                TextTwo ttObject = new TextTwo();
                ttObject.first  = drGame["NewsTitle"].ToString();
                ttObject.second = drGame["filename"].ToString();
                sDRes.Add(ttObject);
            }
            drGame.Close();
            drGame.Dispose();
            return(sDRes);
        }
Esempio n. 4
0
        public static List <TextTwo> NoticeSelC(string sAbbre)
        {
            Database  dbDCenter = DatabaseFactory.CreateDatabase(sConnRead);
            DbCommand dcGame    = dbDCenter.GetStoredProcCommand("SP_Notice_Sel");

            dbDCenter.AddInParameter(dcGame, "@abbre", DbType.String, sAbbre);

            IDataReader    drGame = dbDCenter.ExecuteReader(dcGame);
            List <TextTwo> sDRes  = new List <TextTwo>();

            while (drGame.Read())
            {
                TextTwo ttObject = new TextTwo();
                ttObject.first  = drGame["NewsTitle"].ToString();
                ttObject.second = drGame["filename"].ToString();
                sDRes.Add(ttObject);
            }
            drGame.Close();
            drGame.Dispose();
            return(sDRes);
        }
Esempio n. 5
0
        public static List <TextTwo> TranPTop20PaySel(DateTime dtBegin, DateTime dtEnd)
        {
            Database  dbUCenter = DatabaseFactory.CreateDatabase(sConn);
            DbCommand dcTran    = dbUCenter.GetStoredProcCommand("TranP_Top20PaySel");

            dbUCenter.AddInParameter(dcTran, "@begintime", DbType.DateTime, dtBegin);
            dbUCenter.AddInParameter(dcTran, "@endtime", DbType.DateTime, dtEnd);

            IDataReader drRead = dbUCenter.ExecuteReader(dcTran);

            List <TextTwo> lObject = new List <TextTwo>();

            while (drRead.Read())
            {
                TextTwo ttObject = new TextTwo();
                ttObject.first  = drRead["account"].ToString();
                ttObject.second = drRead["price"].ToString();
                lObject.Add(ttObject);
            }
            drRead.Close();
            return(lObject);
        }