public void LoadCustomer() { var listCustomer = customerDAL.GetAll(); DataTable table = new DataTable(); //convert form list to datatable using (var reader = ObjectReader.Create(listCustomer)) { table.Load(reader); } gridControlKhachHang.DataSource = table; }
public KHACHHANG GetKhachHangByID(int ID) { var currentCustomer = customerDAL.GetAll().Where(c => c.MAKH == ID).FirstOrDefault(); return(currentCustomer); }