コード例 #1
0
        public void DanhSachUserLoad()
        {
            DataTable dt = new DataTable(null);

            dt = _db.LoadDanhSachTaiKhoan(ref err);
            dgvdanhsach.PrimaryGrid.Rows.Clear();
            if (dt.Rows.Count > 0)
            {
                dgvdanhsach.PrimaryGrid.DataSource = dt;
            }
            context = ((DataTable)dt).DefaultView;
            try
            {
                txttendn.DataBindings.Add(new Binding("Text", context, "IDUsername"));
                //txttennv.DataBindings.Add(new Binding("Text", context, "NAME_TEACHER"));
                lblid.DataBindings.Add(new Binding("Text", context, "ID_User"));
            }
            catch (Exception e)
            {
            }
        }