Example #1
0
        public static void AddManga(int airedid, int chaps, int genreid, string mname, int myear, 
            int pubid, string shortd, int thomes)
        {
            AnimeDataContext db = new AnimeDataContext();
            Manga adt = new Manga {AiredID = airedid, Chapters = chaps, GenreID = genreid, MangaName = mname,
                MangaYear = myear, PublisherID = pubid, ShortDescription = shortd, Thomes = thomes};

            db.Mangas.InsertOnSubmit(adt);
            db.SubmitChanges();
        }
Example #2
0
        public static MangaConstructModel[] ReturnAllMangaNamesByGenre(int genID, ref Manga[] anit)
        {
            AnimeDataContext db = new AnimeDataContext();
            MangaConstructModel[] temp = (from tp in db.Mangas
                                          join pub in db.Publishers on tp.PublisherID equals pub.PublisherID
                                          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 MangaConstructModel(tp.MangaName,
                                           pub.PublisherName, tp.MangaYear,
                                           tp.MangaName, tp.ShortDescription, tp.Chapters, tp.Thomes, air.AiredName,
                                           gen.GenreName)).ToArray();
            anit = (from tp in db.Mangas
                    join pub in db.Publishers on tp.PublisherID equals pub.PublisherID
                    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 tp).ToArray();
            return temp;
        }
Example #3
0
		private void detach_Mangas(Manga entity)
		{
			this.SendPropertyChanging();
			entity.AiredYet = null;
		}
Example #4
0
		private void attach_Mangas(Manga entity)
		{
			this.SendPropertyChanging();
			entity.AiredYet = this;
		}
Example #5
0
 partial void DeleteManga(Manga instance);
Example #6
0
 partial void UpdateManga(Manga instance);
Example #7
0
 partial void InsertManga(Manga instance);
Example #8
0
		private void detach_Mangas(Manga entity)
		{
			this.SendPropertyChanging();
			entity.Publisher = null;
		}
Example #9
0
		private void attach_Mangas(Manga entity)
		{
			this.SendPropertyChanging();
			entity.Publisher = this;
		}
Example #10
0
		private void attach_Mangas(Manga entity)
		{
			this.SendPropertyChanging();
			entity.Genre = this;
		}
Example #11
0
 // searches by genre
 public static MangaConstructModel[] ReturnAllFavMangaByGenre(string genrename, ref Manga[] anit)
 {
     AnimeDataContext db = new AnimeDataContext();
     MangaConstructModel[] tmp = MangaModel.ReturnAllMangaNamesByGenre(GenreModel.ReturnGenreID(genrename), ref anit);
     return tmp;
 }