static public List<Media> GetGalleryMedia (int AlbumID)
{
string strLanguage = ThisSession.Language;
string strApplication = System.Convert.ToString (ConfigurationManager.AppSettings
["Application"]);
using (SqlConnection connection = new SqlConnection
(ConfigurationManager.ConnectionStrings["Personal"].ConnectionString))
{
using (SqlCommand command = new SqlCommand ("GetGalleryMedia", connection))
{
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add (new SqlParameter ("@AlbumID", AlbumID));
command.Parameters.Add (new SqlParameter ("@IsPublic", Filter));
command.Parameters.Add (new SqlParameter ("@Application", strApplication));
command.Parameters.Add (new SqlParameter ("@Lang", strLanguage));
connection.Open ();
SqlDataReader reader = command.ExecuteReader ();
List<Media> list = new List<Media> ();
while (reader.Read ())
{
Media media = MediaFromReader (reader);
list.Add (media);
}
reader.Close ();
return list;
}
}
}