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