public List<ListItem> GetGrades() { DataTable table = null; if (_grades.Count == 0 && base.Factory.OpenConnection()) { table = base.Factory.CreateTable(Properties.Resources.SQLLookupStoreGrades); if (table != null && table.Rows.Count > 0) foreach (DataRow row in table.Rows) { var item = new ListItem(row[colId].ToString(), row[colDescription].ToString(), row[colAltDescription].ToString(), "StoreGrade"); _grades.Add(item); } base.Factory.CloseConnection(); } return _grades; }
public List<ListItem> GetDepartments() { DataTable table = null; if (_departments.Count == 0 && base.Factory.OpenConnection()) { table = base.Factory.CreateTable(Properties.Resources.SQLDepartmentsSelect); if (table != null && table.Rows.Count > 0) foreach (DataRow row in table.Rows) { var item = new ListItem(row[colDeptId].ToString(), row[colDeptName].ToString(), "Department"); _departments.Add(item); } base.Factory.CloseConnection(); } return _departments; }