Example #1
0
        private static Dictionary<int, MissionInfo> LoadFromDatabase()
        {
            Dictionary<int, MissionInfo> dic = new Dictionary<int, MissionInfo>();
            using (ProduceBussiness db = new ProduceBussiness())
            {
                MissionInfo[] infos = db.GetAllMissionInfo();
                foreach (MissionInfo info in infos)
                {
                    if (!dic.ContainsKey(info.Id))
                    {
                        dic.Add(info.Id, info);
                    }
                }
            }

            return dic;
        }