Ejemplo n.º 1
0
 public KhoaMNg(DbAccess db) : this()
 {
     this.db     = db;
     db.dataKhoa = db.GetListKhoa(null);
     this.dic    = new Dictionary <string, string>();
     for (int i = 0; i < db.dataKhoa.Rows.Count; i++)
     {
         var makhoa = db.dataKhoa.Rows[i]["Mã khoa"].ToString();
         var teKhoa = db.dataKhoa.Rows[i]["Tên khoa"].ToString();
         comboBoxKhoa.Items.Add(makhoa);
         dic.Add(makhoa, teKhoa);
     }
 }
Ejemplo n.º 2
0
 public ThemSinhVien(DbAccess db) : this()
 {
     this.DB     = db;
     DB.dataKhoa = DB.GetListKhoa(null);
     for (int i = 0; i < DB.dataKhoa.Rows.Count; i++)
     {
         comboBoxKhoa.Items.Add(DB.dataKhoa.Rows[i]["Mã khoa"].ToString());
     }
     DB.dataLop = DB.GetListLop(null);
     for (int i = 0; i < DB.dataLop.Rows.Count; i++)
     {
         comboBoxIDLop.Items.Add(db.dataLop.Rows[i]["Mã lớp"]);
     }
 }