private void LoadCaHoc() { try { CaHocFilter _filter = new CaHocFilter(); _filter.CoSoId = GlobalSettings.CoSoId; _filter.IsRemove = 0; List <CAHOC> dataCaHoc = CaHocLogic.Select(_filter); repositoryItemGrid_CaHoc.DataSource = dataCaHoc; repositoryItemGrid_CaHoc.DisplayMember = "TenCaHocFull"; repositoryItemGrid_CaHoc.ValueMember = "CaHocId"; } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }
private void LoadGridCaHoc() { try { CaHocFilter _filter = new CaHocFilter(); _filter.CoSoId = GlobalSettings.CoSoId; List <CAHOC> _lstCaHoc = CaHocLogic.Select(_filter); if (_lstCaHoc != null && _lstCaHoc.Count > 0) { gridControlCaHoc.DataSource = _lstCaHoc; } else { gridControlCaHoc.DataSource = null; } lblTongCong.Text = string.Format("Tổng cộng: {0} ca/tiết học", gridViewCaHoc.RowCount); } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }