Example #1
0
 private void resetform()
 {
     txtHoTen.Enabled       = false;
     txtVaiTro.Enabled      = false;
     cbSach.Enabled         = false;
     cbTacGia.Enabled       = false;
     btnThemTacGia.Enabled  = true;
     btnHuyTacGia.Enabled   = false;
     btnLuuTacGia.Enabled   = false;
     btnXoaTacGia.Enabled   = false;
     btnThemThamGia.Enabled = true;
     btnHuyThamGia.Enabled  = false;
     btnLuuThamGia.Enabled  = false;
     btnXoaThamGia.Enabled  = false;
     txtHoTen.Text          = "";
     txtVaiTro.Text         = "";
     cbSach.DataSource      = client.listAllBook();
     cbSach.DisplayMember   = "TieuDeSach";
     cbSach.ValueMember     = "MaSach";
     cbTacGia.DataSource    = client.listAllAuthor();
     cbTacGia.DisplayMember = "HoTen";
     cbTacGia.ValueMember   = "MaTacGia";
     dgvTacGia.DataSource   = client.listAllAuthor();
     dgvThamGia.DataSource  = client.listAllAttend();
 }