private void LoadKhoa()
        {
            KhoaDAO dao = new KhoaDAO();

            cbbKhoa.DisplayMember = "TenKhoa";
            cbbKhoa.ValueMember   = "MaKhoa";
            cbbKhoa.DataSource    = dao.GetAll();
        }
Пример #2
0
        public void LoadDanhSachKhoa()
        {
            var dao = new KhoaDAO();
            var lst = dao.GetAll();

            cbbDanhSachKhoa.Properties.DataSource    = lst;
            cbbDanhSachKhoa.Properties.ValueMember   = "MaKhoa";
            cbbDanhSachKhoa.Properties.DisplayMember = "TenKhoa";
        }
Пример #3
0
        public void LoadDanhSachKhoa()
        {
            gcDanhSach.DataSource = null;
            gcDanhSach.Controls.Clear();
            var dao = new KhoaDAO();
            var ser = txtSearch.Text;
            var lst = dao.GetAll(ser);

            gcDanhSach.DataSource = lst;
        }
Пример #4
0
        private void LoadData()
        {
            KhoaDAO dao = new KhoaDAO();

            dgvKhoa.DataSource = dao.GetAll().Select(t => new
            {
                MaKhoa      = t.MaKhoa,
                TenKhoa     = t.TenKhoa,
                DiaChi      = t.DiaChi,
                SoDienThoai = t.SoDienThoai
            }).ToList();
        }
Пример #5
0
        /// <summary>
        /// Lay tat ca record
        /// </summary>
        /// <returns>List</returns>
        public List <Khoa> GetAll()
        {
            KhoaDAO context = new KhoaDAO();

            try
            {
                List <Khoa> lstKhoa = context.GetAll();
                return(lstKhoa);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return(null);
            }
        }
Пример #6
0
        private void LoadData()
        {
            KhoaDAO dao = new KhoaDAO();

            dgvKhoa.DataSource = dao.GetAll();
        }
Пример #7
0
 public DataTable DanhSach()
 {
     return(khoaDAO.GetAll());
 }