public IEnumerable<Employee> SubordinatesFor(Employee employee, object zoneCode, object districtId) { string subordinateQuery = @"GetSubordinatesFor"; return DBHelper.ExecuteReader<IList<Employee>>(LoadEmployees, new SqlConnection(DBHelper.ConnectionString), new SqlCommand(subordinateQuery) { CommandType = CommandType.StoredProcedure }, new SqlParameter() { ParameterName = "@ReportingScope", DbType = DbType.Int32, Value = employee.ReportingScope }, new SqlParameter() { ParameterName = "@ZoneCode", DbType = DbType.String, Value = zoneCode }, new SqlParameter() { ParameterName = "@DistrictCode", Value = districtId }); }
public RegionItem(IEmployeeRepository repo, Employee employee) : this() { _Repo = repo; _Employee = employee; }
public object IdOf(Employee item) { return _IdsByHashCode[item.GetHashCode()]; }