Exemple #1
0
        public IEnumerable <TeamViewModel> Get(string typeName, int parentId)
        {
            int teamTypeId = TeamTypeHelper.GetIdByFiendlyName(typeName);

            teamBll.FillTeamType = true;
            teamBll.Active       = true;

            return(teamBll.GetTeamsByTypeAndParent(teamTypeId, parentId).ToViewModel());
        }
Exemple #2
0
        public IEnumerable <TeamViewModel> Get(string type, [FromQuery] string txt)
        {
            teamBll.FillTeamType = true;
            teamBll.FillCities   = true;

            int teamTypeId = TeamTypeHelper.GetIdByFiendlyName(type);

            return(teamBll.SearchByTypeDefault(txt, teamTypeId).ToViewModel());
        }
Exemple #3
0
        public object Get(string typeName, string mode)
        {
            switch (mode.ToLowerInvariant())
            {
            case "list":
                int teamTypeId = TeamTypeHelper.GetIdByFiendlyName(typeName);

                teamBll.Active = true;

                return(teamBll.GetTeamsByType(teamTypeId).ToShortViewModel());
            }

            Response.StatusCode = (int)HttpStatusCode.MethodNotAllowed;

            return(null);
        }