Esempio n. 1
0
        private void btnTimKiem_Click(object sender, EventArgs e)
        {
            DanhSachKhachTroDataContext db = new DanhSachKhachTroDataContext();

            dataGridView1.DataSource = db.KHACHTROs.Where(p => p.HoTen.Equals(txtTimkiem.Text));
        }
Esempio n. 2
0
        void Xemkhachtro()
        {
            DanhSachKhachTroDataContext dskt = new DanhSachKhachTroDataContext();

            dataGridView1.DataSource = dskt.KHACHTROs.Select(d => d);
        }