예제 #1
0
    //ritorna l'elenco delle foto ordinate per posizione nell'album
    public static DataTable GetPhotosByPos(int AlbumID)
    {
        DataSetVepAdminTableAdapters.PhotosTableAdapter taPhotos = new DataSetVepAdminTableAdapters.PhotosTableAdapter();
        DataTable dtPhotos = taPhotos.GetPhotosByPos(AlbumID);

        return(dtPhotos);
    }
예제 #2
0
    //GetPhotoSliderHome
    public static DataTable GetPhotoSliderHome()
    {
        var       taAlbum  = new DataSetVepAdminTableAdapters.AlbumsTableAdapter();
        DataTable dtAlbum  = taAlbum.GetAlbumByCaption("HOME");
        var       taPhotos = new DataSetVepAdminTableAdapters.PhotosTableAdapter();

        if (dtAlbum.Rows.Count == 0)
        {
            return(null);
        }
        DataTable dtPhotos = taPhotos.GetPhotosByPos(int.Parse(dtAlbum.Rows[0]["AlbumID"].ToString()));

        return(dtPhotos);
    }