Exemple #1
0
        public int DeleteOldMovies()//checked
        {
            DataTable dt  = Movies.OldMoviesList();
            DataTable dt2 = Screening.ScreeningsOfOldMoviesTable();

            for (int i = 0; i < dt2.Rows.Count; i++)
            {
                int       screening = int.Parse(dt2.Rows[i]["ScreeningID"].ToString());
                DataTable dtchange  = Invitation.InvitationsToDeleteTable(screening);
                for (int j = 0; j < dtchange.Rows.Count; j++)
                {
                    int invitation = int.Parse(dtchange.Rows[j]["InvitationID"].ToString());
                    Invitation.DeleteInvitation(invitation);
                }
            }
            Screening.DeleteOldScreenings();
            int k = Movies.DeleteOldMovies();

            return(k);
        }