Exemple #1
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;
        }
Exemple #2
0
        public static string GetKhoiNameByKhoiId(Int32 khoiId)
        {
            if (khoiId < 0)
            {
                return(CommonConstant.EMPTY);
            }

            QLMamNon.Dao.QLMamNonDs.KhoiDataTable khoiTable = StaticDataFacade.Get(StaticDataKeys.KhoiHoc) as QLMamNon.Dao.QLMamNonDs.KhoiDataTable;
            QLMamNon.Dao.QLMamNonDs.KhoiRow       khoiRow   = khoiTable.FindByKhoiId(khoiId);

            if (khoiRow != null)
            {
                return(khoiRow.Name);
            }

            return(CommonConstant.EMPTY);
        }