Пример #1
0
        public IEnumerable <PlanoTelefoniaVOViewModel> FiltrosEspecificos(PlanoTelefoniaVOViewModel obj)
        {
            if (string.IsNullOrEmpty(obj.CodDDD))
            {
                var result = new List <PlanoTelefoniaVOViewModel>();
                var o      = new PlanoTelefoniaVOViewModel {
                    Mensagem = "Por favor, preencher os parâmetros."
                };

                result.Add(o);
                return(result);
            }

            var ret = _planoAppService.FiltrosEspecificos(obj);

            return(ret.Count > 0 ? ret : throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound, "Nenhum registro encontrado.")));
        }
Пример #2
0
 public ICollection <PlanoTelefoniaVOViewModel> FiltrosEspecificos(PlanoTelefoniaVOViewModel objViewModel)
 {
     return(Mapper.Map <ICollection <PlanoTelefoniaVOViewModel> >(_planoService.FiltrosEspecificos(Mapper.Map <PlanoTelefoniaVO>(objViewModel))));
 }