Beispiel #1
0
        /* public void AddAwardWithImg(Award award)
         * {
         *   repoAwards.Add(award.Id, award);
         *   FilesDao.AddAwardWithImg(repoAwards);
         * }*/

        public void Change(int no, string newname)
        {
            int    count = 0;
            string id    = string.Empty;

            foreach (var item in repoAwards)
            {
                if (count == no)
                {
                    id = item.Key;
                }

                count++;
            }

            repoAwards[id].Title = newname;
            FilesDao.AddAward(repoAwards);
        }
Beispiel #2
0
        public void DeleteFromAwards(int no)
        {
            int    count = 0;
            string id    = string.Empty;

            foreach (var item in repoAwards)
            {
                if (count == no)
                {
                    id = item.Key;
                }

                count++;
            }

            repoAwards.Remove(id);
            FilesDao.AddAward(repoAwards);
        }
Beispiel #3
0
 public void AddAward(Award award)
 {
     repoAwards.Add(award.Id, award);
     FilesDao.AddAward(repoAwards);
 }