Exemplo n.º 1
0
 private void DataBind()
 {
     ds = db.getLop();
     dgvquanlylop.DataSource = ds.Tables[0];
     txtmalop.DataBindings.Clear();
     txttenlop.DataBindings.Clear();
     txtsiso.DataBindings.Clear();
     txtmakhoahoc.DataBindings.Clear();
     txtmanganh.DataBindings.Clear();
     txtmalop.DataBindings.Add("Text", ds.Tables[0], "MaLop");
     txttenlop.DataBindings.Add("Text", ds.Tables[0], "TenLop");
     txtsiso.DataBindings.Add("Text", ds.Tables[0], "SiSo");
     txtmakhoahoc.DataBindings.Add("Text", ds.Tables[0], "MaKhoaHoc");
     txtmanganh.DataBindings.Add("Text", ds.Tables[0], "MaNganh");
 }