private void btnTimKiem_Click(object sender, EventArgs e) { SplashScreenManager.ShowForm(typeof(O2S_Common.Utilities.ThongBao.WaitForm_Wait)); try { DataGridView_ResetLaiCot(); if (cboKhoaHoc.SelectedValue != null) { LopHocFilter _filter = new LopHocFilter(); _filter.KhoaHocId = O2S_Common.TypeConvert.Parse.ToInt32(cboKhoaHoc.SelectedValue.ToString()); List <LopHoc_PlusDTO> _lstLopHoc = LopHocLogic.Select(_filter); if (_lstLopHoc != null && _lstLopHoc.Count > 0) { TaoCot_DataGridView(_lstLopHoc); LayDuLieuLenGridView(_lstLopHoc); } } else { O2S_Common.Utilities.ThongBao.frmThongBao frmthongbao = new O2S_Common.Utilities.ThongBao.frmThongBao(Base.ThongBaoLable.VUI_LONG_NHAP_DAY_DU_THONG_TIN); frmthongbao.Show(); } } catch (Exception ex) { O2S_Common.Logging.LogSystem.Error(ex); } SplashScreenManager.CloseForm(); }
private void LoadLopHocTheoKhoaHoc() { try { LopHocFilter _filter = new LopHocFilter(); _filter.KhoaHocId = O2S_Common.TypeConvert.Parse.ToInt32(cboKhoaHoc.SelectedValue.ToString()); cboLopHoc.DataSource = LopHocLogic.Select(_filter); cboLopHoc.DisplayMember = "TenLopHoc"; cboLopHoc.ValueMember = "LopHocId"; } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }
private void LoadLopCuaKhoaHoc() { try { int _khoahocId = O2S_Common.TypeConvert.Parse.ToInt32(cboKhoaHoc.SelectedValue.ToString()); if (_khoahocId != 0) { LopHocFilter _filter = new LopHocFilter(); _filter.CoSoId = GlobalSettings.CoSoId; _filter.KhoaHocId = _khoahocId; List <LopHoc_PlusDTO> _lstLopHoc = LopHocLogic.Select(_filter); cboLopHoc.DataSource = _lstLopHoc; cboLopHoc.DisplayMember = "TenLopHoc"; cboLopHoc.ValueMember = "LopHocId"; cboLopHoc.SelectedIndex = 0; } } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }
private void LoadGridLopHoc() { try { LopHocFilter _filter = new LopHocFilter(); _filter.CoSoId = GlobalSettings.CoSoId; List <LopHoc_PlusDTO> _lstLopHoc = LopHocLogic.Select(_filter); if (_lstLopHoc != null && _lstLopHoc.Count > 0) { gridControlLopHoc.DataSource = _lstLopHoc; } else { gridControlLopHoc.DataSource = null; } lblTongCong.Text = string.Format("Tổng cộng: {0} ca/tiết học", gridViewLopHoc.RowCount); } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }