Skip to content

Instantly share code, notes, and snippets.

@xerardoo
Created April 24, 2014 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xerardoo/11247007 to your computer and use it in GitHub Desktop.
Save xerardoo/11247007 to your computer and use it in GitHub Desktop.
GridControl
///model
public class CustomerDAO{
public XPCollection<Client> getAllCustomer()
{
var session = Session.DefaultSession;
XPCollection<Client> Customers = new XPCollection<Client>(session);
return Customers;
}
}
///view
public partial class CustomerXF : DevExpress.XtraEditors.XtraForm
{
public CustomerXF()
{
InitializeComponent();
}
private void CustomerXF_Load(object sender, EventArgs e){
CustomerDAO c = new CustomerDAO();
this.gridControlCustomer.DataSource = c.getAllCustomer();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment