示例#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();
        }
示例#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;
        }
示例#3
0
		private void detach_Mangas(Manga entity)
		{
			this.SendPropertyChanging();
			entity.AiredYet = null;
		}
示例#4
0
		private void attach_Mangas(Manga entity)
		{
			this.SendPropertyChanging();
			entity.AiredYet = this;
		}
示例#5
0
 partial void DeleteManga(Manga instance);
示例#6
0
 partial void UpdateManga(Manga instance);
示例#7
0
 partial void InsertManga(Manga instance);
示例#8
0
		private void detach_Mangas(Manga entity)
		{
			this.SendPropertyChanging();
			entity.Publisher = null;
		}
示例#9
0
		private void attach_Mangas(Manga entity)
		{
			this.SendPropertyChanging();
			entity.Publisher = this;
		}
示例#10
0
		private void attach_Mangas(Manga entity)
		{
			this.SendPropertyChanging();
			entity.Genre = this;
		}
示例#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;
 }