コード例 #1
0
        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;
        }
コード例 #2
0
        public KHACHHANG GetKhachHangByID(int ID)
        {
            var currentCustomer = customerDAL.GetAll().Where(c => c.MAKH == ID).FirstOrDefault();

            return(currentCustomer);
        }