Mini Kabibi Habibi
using System.Collections;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace DevExpress.Web.Demos {
public static class BinaryImages {
public static IEnumerable GetData(int? categoryId = null) {
string selectCommand = "SELECT * FROM BinaryImages ";
if(categoryId != null)
selectCommand += string.Format("WHERE CategoryID = {0}", categoryId);
using(AccessDataSource dataSource = new AccessDataSource("~/App_Data/binary_images.mdb", selectCommand))
return dataSource.Select(new DataSourceSelectArguments());
}
}
}