Ejemplo n.º 1
0
 public MonHoc(int mm, string tm, Khoa khoa, List <MonHoc> mdk, int v2)
 {
     _MaMH        = mm;
     _TenMon      = tm;
     _MoTa        = null;
     _KhoaQuanLy  = khoa;
     _MonDieuKien = mdk;
     _SoTinChi    = v2;
 }
Ejemplo n.º 2
0
        public static void Stored10MonHoc(IObjectContainer db)
        {
            Khoa khoa1 = new Khoa("COMP", "CNTT", "I101", "077896452");

            db.Store(khoa1);
            Khoa khoa2 = new Khoa("MATH", "TOAN-TIN", "C507", "078231654");

            db.Store(khoa2);
            Khoa khoa3 = new Khoa("PHYS", "TRIETHOC", "A302", "078963147");

            db.Store(khoa3);
            MonHoc mon1 = new MonHoc(1, "Co so du lieu", khoa1, null, 3);

            db.Store(mon1);
            MonHoc mon2 = new MonHoc(2, "Lap trinh huong doi tuong", khoa1, null, 3);

            db.Store(mon2);
            MonHoc mon3 = new MonHoc(3, "Co so du lieu nang cao", khoa1, null, 3);

            mon3.MonDieuKien = new List <MonHoc>()
            {
                mon1
            };
            db.Store(mon3);
            MonHoc mon4 = new MonHoc(4, "Phan tich thiet ke huong doi tuong", khoa1, null, 3);

            mon4.MonDieuKien = new List <MonHoc>()
            {
                mon1, mon2, mon3
            };
            db.Store(mon4);
            MonHoc mon5 = new MonHoc(5, "Bao mat co so du lieu", khoa1, null, 3);

            mon5.MonDieuKien = new List <MonHoc>()
            {
                mon1
            };
            db.Store(mon5);
            MonHoc mon6 = new MonHoc(6, "Toan Roi Rac", khoa2, null, 3);

            db.Store(mon6);
            MonHoc mon7 = new MonHoc(7, "Xac suat thong ke", khoa2, null, 3);

            db.Store(mon7);
            MonHoc mon8 = new MonHoc(8, "Dai so tuyen tinh", khoa2, null, 3);

            db.Store(mon8);
            MonHoc mon9 = new MonHoc(9, "Triet hoc Mac-Lenin", khoa3, null, 2);

            db.Store(mon9);
            MonHoc mon10 = new MonHoc(10, "Tu tuong Ho Chi Minh", khoa3, null, 2);

            db.Store(mon10);
        }