Ejemplo n.º 1
0
        private void btnChonBai_Click(object sender, EventArgs e)
        {
            frmBai f = new frmBai();

            f.ShowDialog();
            id_chon = f.id_chon;
            f.Dispose();
            BaiHoc bh = MyFunction.ThongtinBaihoc(id_chon);

            if (bh == null)
            {
                return;
            }

            baihocTV = bh;

            HienThiBaiHoc();
        }
Ejemplo n.º 2
0
        private void lstBaihoc_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lstBaihoc.SelectedIndices.Count <= 0)
            {
                return;
            }
            int intselectedindex = lstBaihoc.SelectedIndices[0];

            if (intselectedindex >= 0)
            {
                String id = lstBaihoc.Items[intselectedindex].SubItems[0].Text;
                txtID.Text = id;

                BaiHoc bh = MyFunction.ThongtinBaihoc(int.Parse(id));
                txtTieude.Text  = bh.tieude;
                txtNoidung.Text = MyFunction.NoidungToText(bh.baihoc);
                txtThutu.Text   = bh.thutu.ToString();
            }
        }