private void LoadPhongHoc() { try { PhongHocFilter _filter = new PhongHocFilter(); _filter.CoSoId = GlobalSettings.CoSoId; _filter.IsRemove = 0; List <PHONGHOC> dataPhongHoc = PhongHocLogic.Select(_filter); repositoryItemGrid_PhongHoc.DataSource = dataPhongHoc; repositoryItemGrid_PhongHoc.DisplayMember = "TenPhongHoc"; repositoryItemGrid_PhongHoc.ValueMember = "PhongHocId"; } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }
private void LoadGridPhongHoc() { try { PhongHocFilter _filter = new PhongHocFilter(); _filter.CoSoId = GlobalSettings.CoSoId; List <PHONGHOC> _lstPhongHoc = PhongHocLogic.Select(_filter); if (_lstPhongHoc != null && _lstPhongHoc.Count > 0) { gridControlPhongHoc.DataSource = _lstPhongHoc; } else { gridControlPhongHoc.DataSource = null; } lblTongCong.Text = string.Format("Tổng cộng: {0} ca/tiết học", gridViewPhongHoc.RowCount); } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }