Esempio n. 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();
 }
Esempio n. 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;
        }
Esempio n. 3
0
		private void detach_Staffs(Staff entity)
		{
			this.SendPropertyChanging();
			entity.Anime = null;
		}
Esempio n. 4
0
		private void attach_Staffs(Staff entity)
		{
			this.SendPropertyChanging();
			entity.Anime = this;
		}
Esempio n. 5
0
 partial void DeleteStaff(Staff instance);
Esempio n. 6
0
 partial void UpdateStaff(Staff instance);
Esempio n. 7
0
 partial void InsertStaff(Staff instance);
Esempio n. 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;
 }