Exemple #1
0
        private void loadHocSinhToGridDi()
        {
            if (this.hocSinhRowBindingSourceDi.DataSource != null)
            {
                ((QLMamNon.Dao.QLMamNonDs.HocSinhDataTable) this.hocSinhRowBindingSourceDi.DataSource).Clear();
            }

            int?namHoc = (int?)this.cmbNamHocDi.EditValue;
            int?lopHoc = (int?)this.cmbLopHocDi.EditValue;

            QLMamNon.Dao.QLMamNonDs.HocSinhDataTable hocSinhTable;

            if (lopHoc == null)
            {
                hocSinhTable = this.hocSinhTableAdapter.GetHocSinhNotAssignedToLop();
            }
            else
            {
                hocSinhTable = this.hocSinhTableAdapter.GetHocSinhByParams(new DateTime(namHoc.Value + 1, 1, 1), null, lopHoc, null);
            }

            ThongTinHocSinhUtil.EvaluateLopInfoForHocSinhTable(hocSinhLopTableAdapter, hocSinhTable);

            this.hocSinhRowBindingSourceDi.DataSource = hocSinhTable;
        }
Exemple #2
0
 private void loadThongTinHocSinh(int?quan, int?phuong, int?lop, int?thangSinh, int?namSinh, DateTime?ngaySinh, int?thoiHoc)
 {
     QLMamNon.Dao.QLMamNonDs.HocSinhDataTable hocSinhTable = this.hocSinhTableAdapter.GetDataForThongTinHocSinh(quan, phuong, ngaySinh, thangSinh, lop, thoiHoc, namSinh);
     hocSinhTable.CreatedDateColumn.DefaultValue = DateTime.Now;
     ThongTinHocSinhUtil.EvaluateLopInfoForHocSinhTable(hocSinhLopTableAdapter, hocSinhTable);
     hocSinhTable.AcceptChanges();
     this.DataTable = hocSinhTable;
     this.hocSinhRowBindingSource.DataSource = this.DataTable;
 }
Exemple #3
0
        private void loadHocSinhToGridDen()
        {
            if (ControlUtil.IsEditValueNull(this.cmbLopHocDen))
            {
                return;
            }

            QLMamNon.Dao.QLMamNonDs.HocSinhDataTable hocSinhTable = this.hocSinhTableAdapter.GetHocSinhByParams(DateTime.Now, null, (int)this.cmbLopHocDen.EditValue, null);

            ThongTinHocSinhUtil.EvaluateLopInfoForHocSinhTable(hocSinhLopTableAdapter, hocSinhTable);

            this.hocSinhRowBindingSourceDen.DataSource = hocSinhTable;
        }
Exemple #4
0
        private void FrmTaoPhieuThu_Load(object sender, EventArgs e)
        {
            HocSinhTableAdapter    hocSinhTableAdapter    = (HocSinhTableAdapter)StaticDataFacade.Get(StaticDataKeys.AdapterHocSinh);
            HocSinhLopTableAdapter hocSinhLopTableAdapter = (HocSinhLopTableAdapter)StaticDataFacade.Get(StaticDataKeys.AdapterHocSinhLop);

            QLMamNon.Dao.QLMamNonDs.HocSinhDataTable hocSinhTable = hocSinhTableAdapter.GetData();
            ThongTinHocSinhUtil.EvaluateLopInfoForHocSinhTable(hocSinhLopTableAdapter, hocSinhTable);
            this.hocSinhRowBindingSource.DataSource     = hocSinhTable;
            this.phanLoaiThuRowBindingSource.DataSource = StaticDataFacade.Get(StaticDataKeys.PhanLoaiThu);

            if (this.IsEditing)
            {
                this.loadPhieuThu();
            }
            else
            {
                this.resetForm();
            }
        }