Пример #1
0
        private void UCEditFormKhoiHoc_Enter(object sender, EventArgs e)
        {
            QLMamNon.Dao.QLMamNonDs.KhoiRow row = this.GridView.GetFocusedDataRow() as QLMamNon.Dao.QLMamNonDs.KhoiRow;

            if (row != null)
            {
                this.cmbTruong.EditValue = StaticDataUtil.GetTruongIdByKhoiId(this.khoiTruongTableAdapter, row.KhoiId);
            }
        }
Пример #2
0
        private void loadKhoiData()
        {
            QLMamNon.Dao.QLMamNonDs.KhoiDataTable dataTable = this.khoiTableAdapter.GetData();

            foreach (QLMamNon.Dao.QLMamNonDs.KhoiRow row in dataTable)
            {
                int?truongId = StaticDataUtil.GetTruongIdByKhoiId(this.khoiTruongTableAdapter, row.KhoiId);
                if (truongId.HasValue)
                {
                    row.TruongId = truongId.Value;
                }
            }

            this.khoiRowBindingSource.DataSource = dataTable;
        }