private void cmbMonHoc_SelectedIndexChanged(object sender, EventArgs e) { ThreadBUS tbus = new ThreadBUS(); DataTable dt = new DataTable(); string a = cmbMonHoc.SelectedItem.ToString(); lstDanhSachThread.DataSource = tbus.LayDanhSach(cmbMonHoc.Text); lstDanhSachThread.ValueMember = "ThreadID"; lstDanhSachThread.DisplayMember = "Title"; }
void ListDSThreadInit() { ThreadBUS tbus = new ThreadBUS(); DataTable dt = new DataTable(); string a = cmbMonHoc.SelectedItem.ToString(); lstDanhSachThread.DataSource = tbus.LayDanhSach(cmbMonHoc.Text); lstDanhSachThread.ValueMember = "ThreadID"; lstDanhSachThread.DisplayMember = "Title"; }
void DanhSachThreadMoiInit() { ThreadBUS tbus = new ThreadBUS(); tbDanhSachThread = tbus.LayBang(); DataTable dt = new DataTable(); dt = tbus.LayDanhSach(612557); if (dt.Rows.Count > 0) { dtgvDSNewThread.Rows.Add(dt.Rows.Count); } for (int i = 0; i < dt.Rows.Count; i++) { dtgvDSNewThread.Rows[i].Cells["MonHoc"].Value = dt.Rows[i][0]; dtgvDSNewThread.Rows[i].Cells["TieuDe"].Value = dt.Rows[i][1]; dtgvDSNewThread.Rows[i].Cells["NgayCapNhat"].Value = dt.Rows[i][2]; } }