Пример #1
0
 public void MissionListBox_Click(object sender, EventArgs e)
 {
     if (missionsListBox.SelectedItem != null)
     {
         string str = missionsListBox.SelectedValue.ToString();
         missionRepo.GetAllMissions().ForEach(m =>
         {
             if (m.MissionName == str)
             {
                 ShowInfo(m.Id);
             }
         });
     }
 }
Пример #2
0
        public List <Mission> GetAllMissionsByPlanet(int planetId)
        {
            List <Mission> missions = new List <Mission>();

            _missionRepository.GetAllMissions().ForEach(m =>
            {
                if (m.PlanetId == planetId)
                {
                    missions.Add(m);
                }
            });
            return(missions);
        }