Beispiel #1
0
 public static void AddStaff(int titleid, int manid, string staffname, string occ, string page)
 {
     AnimeDataContext db = new AnimeDataContext();
     Staff adt = new Staff
     {
         TitleID = titleid,
         MangaID = manid,
         StaffName = staffname,
         Occupation = occ,
         PersonalPage = page
     };
     db.Staffs.InsertOnSubmit(adt);
     db.SubmitChanges();
 }
Beispiel #2
0
        public static StaffConstructModel[] ReturnAllStaffNamesByGenre(int genID, ref Staff[] anit)
        {
            AnimeDataContext db = new AnimeDataContext();
            StaffConstructModel[] temp = (from tp in db.Staffs
                                          join ant in db.Animes on tp.TitleID equals ant.TitleID
                                          join mang in db.Mangas on tp.MangaID equals mang.MangaID

                                          where ant.GenreID == genID || mang.GenreID == genID
                                          select new StaffConstructModel(tp.StaffName, tp.PersonalPage, tp.Occupation)).ToArray();
            anit = (from tp in db.Staffs
                    join ant in db.Animes on tp.TitleID equals ant.TitleID
                    join mang in db.Mangas on tp.MangaID equals mang.MangaID

                    where ant.GenreID == genID || mang.GenreID == genID
                    select tp).ToArray();
            return temp;
        }
Beispiel #3
0
		private void detach_Staffs(Staff entity)
		{
			this.SendPropertyChanging();
			entity.Anime = null;
		}
Beispiel #4
0
		private void attach_Staffs(Staff entity)
		{
			this.SendPropertyChanging();
			entity.Anime = this;
		}
Beispiel #5
0
 partial void DeleteStaff(Staff instance);
Beispiel #6
0
 partial void UpdateStaff(Staff instance);
Beispiel #7
0
 partial void InsertStaff(Staff instance);
Beispiel #8
0
 // returns all staff by genre
 public static StaffConstructModel[] ReturnAllFavStaffByGenre(string genrename, ref Staff[] anit)
 {
     AnimeDataContext db = new AnimeDataContext();
     StaffConstructModel[] tmp = StaffModel.ReturnAllStaffNamesByGenre(GenreModel.ReturnGenreID(genrename), ref anit);
     return tmp;
 }