// LoadRecentMsgsList unused?

        /// <summary>
        /// The load recent msgs list.
        /// </summary>
        /// <param name="charId">
        /// The char Id.
        /// </param>
        /// <returns>
        /// List of received messages
        /// </returns>
        public static Collection<RecentMsgsEntry> LoadRecentMsgsList(uint charId)
        {
            Collection<RecentMsgsEntry> reciviedMsgsList = new Collection<RecentMsgsEntry>();
            SqlWrapper ms = new SqlWrapper();
            string sqlQuery = "SELECT `ReceivedID` FROM `receivedmsgs` WHERE PlayerID =" + "'" + charId + "'";
            DataTable dt = ms.ReadDatatable(sqlQuery);
            foreach (DataRow msgsRow in dt.Rows)
            {
                RecentMsgsEntry rme = new RecentMsgsEntry { ReceivedId = uint.Parse(msgsRow["ReceivedID"].ToString()) };
                reciviedMsgsList.Add(rme);
            }

            return reciviedMsgsList;
        }
Esempio n. 2
0
        // LoadRecentMsgsList unused?

        /// <summary>
        /// The load recent msgs list.
        /// </summary>
        /// <param name="charId">
        /// The char Id.
        /// </param>
        /// <returns>
        /// List of received messages
        /// </returns>
        public static Collection <RecentMsgsEntry> LoadRecentMsgsList(uint charId)
        {
            Collection <RecentMsgsEntry> reciviedMsgsList = new Collection <RecentMsgsEntry>();
            SqlWrapper ms       = new SqlWrapper();
            string     sqlQuery = "SELECT `ReceivedID` FROM `receivedmsgs` WHERE PlayerID =" + "'" + charId + "'";
            DataTable  dt       = ms.ReadDatatable(sqlQuery);

            foreach (DataRow msgsRow in dt.Rows)
            {
                RecentMsgsEntry rme = new RecentMsgsEntry {
                    ReceivedId = uint.Parse(msgsRow["ReceivedID"].ToString())
                };
                reciviedMsgsList.Add(rme);
            }

            return(reciviedMsgsList);
        }