Esempio n. 1
0
        // returns all names by genre and.. oh shit =O
        public static AnimeConstructModel[] ReturnAllAnimeNamesByGenre(int genID, ref Anime[] anit)
        {
            AnimeDataContext db = new AnimeDataContext();
            AnimeConstructModel[] temp = (from tp in db.Animes
                                          join ma in db.Mangas on tp.MangaID equals ma.MangaID
                                          join st in db.Studios on tp.StudioID equals st.StudioID
                                          join sty in db.SerialTypes on tp.SerialTypeID equals sty.SerialTypeID
                                          join gen in db.Genres on tp.GenreID equals gen.GenreID
                                          join air in db.AiredYets on tp.AiredID equals air.AiredID

                                          where tp.GenreID == genID
                                          select new AnimeConstructModel(ma.MangaName,
                                                     st.StudioName,
                                                     tp.AniYear,
                                                     tp.TitleName,
                                                     sty.SerialName,
                                                     gen.GenreName,
                                                     tp.ShortDescription,
                                                     tp.Episodes,
                                                     air.AiredName)).ToArray();
            anit = (from tp in db.Animes
                    where tp.GenreID == genID
                    select tp).ToArray();
            return temp;
        }
Esempio n. 2
0
 // adds title
 public static void AddAnime(int manid, int studid, int ayear, string tname, int stypeid, 
                             int genid, string shortdesc, int eps, int airedid)
 {
     AnimeDataContext db = new AnimeDataContext();
     Anime adt = new Anime { MangaID = manid, StudioID = studid, AniYear = ayear,
                                 TitleName = tname, SerialTypeID = stypeid, GenreID = genid
                             , ShortDescription = shortdesc, Episodes = eps, AiredID = airedid};
     db.Animes.InsertOnSubmit(adt);
     db.SubmitChanges();
 }
Esempio n. 3
0
 // searches by genre
 public static AnimeConstructModel[] ReturnAllFavAnimeByGenre(string genrename, ref Anime[] anit)
 {
     AnimeDataContext db = new AnimeDataContext();
     AnimeConstructModel[] tmp = AnimeModel.ReturnAllAnimeNamesByGenre(GenreModel.ReturnGenreID(genrename), ref anit);
     return tmp;
 }
Esempio n. 4
0
		private void detach_Animes(Anime entity)
		{
			this.SendPropertyChanging();
			entity.AiredYet = null;
		}
Esempio n. 5
0
		private void attach_Animes(Anime entity)
		{
			this.SendPropertyChanging();
			entity.AiredYet = this;
		}
Esempio n. 6
0
		private void detach_Animes(Anime entity)
		{
			this.SendPropertyChanging();
			entity.Studio = null;
		}
Esempio n. 7
0
		private void attach_Animes(Anime entity)
		{
			this.SendPropertyChanging();
			entity.Studio = this;
		}
Esempio n. 8
0
 partial void DeleteAnime(Anime instance);
Esempio n. 9
0
 partial void UpdateAnime(Anime instance);
Esempio n. 10
0
 partial void InsertAnime(Anime instance);