public PhieuDangKyHoatDong(int iMaHoatDong)
 {
     using (QuanLyDoanVienEntities db = new QuanLyDoanVienEntities())
     {
         HoatDong hd = db.HoatDongs.Single(n => n.MaHoatDong == iMaHoatDong);
         this.MaHoatDong  = iMaHoatDong;
         this.TenHoatDong = hd.TenHoatDong;
         this.NgayBatDau  = hd.ThoiGianBauDau.Value;
         this.NgayKetThuc = hd.ThoiGianKetThuc.Value;
         this.DiaDiem     = hd.DiaDiem;
         this.NgayDangKy  = DateTime.Now;
     }
 }