Esempio n. 1
0
        public static DataTable GetAvailableMedal()
        {
            DataTable medal     = Medals.GetMedal();
            DataTable dataTable = medal.Clone();

            DataRow[] array = medal.Select("available=1");
            for (int i = 0; i < array.Length; i++)
            {
                DataRow row = array[i];
                dataTable.ImportRow(row);
            }
            return(dataTable);
        }
Esempio n. 2
0
        public static DataTable GetMedal(int medalId)
        {
            DataTable dataTable = Medals.GetMedal().Clone();

            foreach (DataRow dataRow in Medals.GetMedal().Rows)
            {
                if (dataRow["medalid"].ToString() == medalId.ToString())
                {
                    dataTable.ImportRow(dataRow);
                }
            }
            return(dataTable);
        }
Esempio n. 3
0
        public static void InsertMedalList(ArrayList medalFiles)
        {
            medalFiles.Remove("thumbs.db");
            DataTable existMedalList = BBX.Data.Medals.GetExistMedalList();

            foreach (DataRow dataRow in existMedalList.Rows)
            {
                medalFiles.Remove(dataRow["image"].ToString().ToLower());
            }
            int num = TypeConverter.ObjectToInt(existMedalList.Rows[existMedalList.Rows.Count - 1]["medalid"]) + 1;

            for (int i = 0; i < medalFiles.Count; i++)
            {
                int num2 = num + i;
                Medals.InsertMedal(num2, "Medal No." + num2, medalFiles[i].ToString());
            }
            XCache.Remove(CacheKeys.FORUM_UI_MEDALS_LIST);
        }