Exemple #1
0
        private void listLop_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (listLop.SelectedIndex >= 0)
                {
                    lopDTO = LopBUS.TimLopTheoMaLop(Int32.Parse(listLop.SelectedValue.ToString()));

                    txtTenLop.Text               = lopDTO.TenLop;
                    txtSoLuongSinhVien.Text      = lopDTO.SoLuongSinhVien.ToString();
                    txtSoLuongNgoaiNganSach.Text = lopDTO.SoLuongNgoaiNganSach.ToString();
                    txtSoLuongTrongNganSach.Text = lopDTO.SoLuongTrongNganSach.ToString();

                    LayDanhSachChiTietMon();

                    btnCapNhatChiTietMon.Visible = true;
                    dtgvChiTietMon.Visible       = true;
                    groupBox2.Visible            = true;

                    cmbNamHocCuaLop.DataSource    = NamHocBUS.GetList();
                    cmbNamHocCuaLop.DisplayMember = "TenNamHoc";
                    cmbNamHocCuaLop.ValueMember   = "MaNamHoc";
                    cmbNamHocCuaLop.SelectedValue = lopDTO.MaNamHoc;
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }