Ejemplo n.º 1
0
 private void LoadDanhSachGiangVien()
 {
     try
     {
         GiangVienFilter _filter = new GiangVienFilter();
         _filter.CoSoId = GlobalSettings.CoSoId;
         _filter.NgayBatDauLamViec_Tu  = date_TuNgay.DateTime;
         _filter.NgayBatDauLamViec_Den = date_DenNgay.DateTime;
         List <GiangVien_PlusDTO> _lstGiangVien = GiangVienLogic.Select(_filter);
         if (_lstGiangVien != null && _lstGiangVien.Count > 0)
         {
             for (int i = 0; i < _lstGiangVien.Count; i++)
             {
                 _lstGiangVien[i].Stt = i + 1;
             }
             gridControlDSGiangVien.DataSource = _lstGiangVien;
             lblTongCong.Text = string.Format("Tổng cộng: {0} giảng viên)", _lstGiangVien.Count);
         }
         else
         {
             gridControlDSGiangVien.DataSource = null;
             lblTongCong.Text = string.Format("Tổng cộng: {0} giảng viên)", 0);
         }
     }
     catch (Exception ex)
     {
         O2S_Common.Logging.LogSystem.Warn(ex);
     }
 }
Ejemplo n.º 2
0
 private void LoadGiangVien()
 {
     try
     {
         GiangVienFilter _filter = new GiangVienFilter();
         _filter.CoSoId = GlobalSettings.CoSoId;
         //_filter.IsRemove = 0;
         cboGiangVien.DataSource    = GiangVienLogic.Select(_filter);
         cboGiangVien.DisplayMember = "TenGiangVien";
         cboGiangVien.ValueMember   = "GiangVienId";
     }
     catch (Exception ex)
     {
         O2S_Common.Logging.LogSystem.Warn(ex);
     }
 }
        private void LoadGiangVien()
        {
            try
            {
                List <XepLich_GiaoVienChinhDTO>    _dataGiaoVienChinh    = new List <XepLich_GiaoVienChinhDTO>();
                List <XepLich_GiaoVienTroGiangDTO> _dataGiaoVienTroGiang = new List <XepLich_GiaoVienTroGiangDTO>();

                GiangVienFilter _filter = new GiangVienFilter();
                _filter.CoSoId = GlobalSettings.CoSoId;
                List <GiangVien_PlusDTO> _dataGiangVien = GiangVienLogic.Select(_filter);
                if (_dataGiangVien != null && _dataGiangVien.Count > 0)
                {
                    foreach (var item in _dataGiangVien)
                    {
                        XepLich_GiaoVienChinhDTO _gvChinh = new XepLich_GiaoVienChinhDTO()
                        {
                            GiaoVien_ChinhId  = item.GiangVienId,
                            TenGiaoVien_Chinh = item.TenGiangVien,
                        };
                        _dataGiaoVienChinh.Add(_gvChinh);
                        //
                        XepLich_GiaoVienTroGiangDTO _gvTroGiang = new XepLich_GiaoVienTroGiangDTO()
                        {
                            GiaoVien_TroGiangId  = item.GiangVienId,
                            TenGiaoVien_TroGiang = item.TenGiangVien,
                        };
                        _dataGiaoVienTroGiang.Add(_gvTroGiang);
                    }
                }

                repositoryItemGrid_GVChinh.DataSource    = _dataGiaoVienChinh;
                repositoryItemGrid_GVChinh.DisplayMember = "TenGiaoVien_Chinh";
                repositoryItemGrid_GVChinh.ValueMember   = "GiaoVien_ChinhId";

                repositoryItemGrid_TroGiang.DataSource    = _dataGiaoVienTroGiang;
                repositoryItemGrid_TroGiang.DisplayMember = "TenGiaoVien_TroGiang";
                repositoryItemGrid_TroGiang.ValueMember   = "GiaoVien_TroGiangId";
            }
            catch (Exception ex)
            {
                O2S_Common.Logging.LogSystem.Warn(ex);
            }
        }