Esempio n. 1
0
        public IEnumerable<Employee> SubordinatesFor(Employee employee, object zoneCode, object districtId)
        {
            string subordinateQuery = @"GetSubordinatesFor";

            return DBHelper.ExecuteReader<IList<Employee>>(new SqlConnection(DBHelper.ConnectionString), new SqlCommand(subordinateQuery) { CommandType = CommandType.StoredProcedure }, LoadEmployees,
                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 });
        }
Esempio n. 2
0
 public RegionItem(IEmployeeRepository repo, Employee employee)
     : this()
 {
     _Repo = repo;
     _Employee = employee;
 }
Esempio n. 3
0
 public object IdOf(Employee item)
 {
     return _IdsByHashCode[item.GetHashCode()];
 }