Ejemplo n.º 1
0
        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 });
        }
Ejemplo n.º 2
0
 public RegionItem(IEmployeeRepository repo, Employee employee)
     : this()
 {
     _Repo = repo;
     _Employee = employee;
 }
Ejemplo n.º 3
0
 public object IdOf(Employee item)
 {
     return _IdsByHashCode[item.GetHashCode()];
 }