コード例 #1
0
        public DataSourceResult GetDataSource(
            [ModelBinder(typeof(WebApiDataSourceRequestModelBinder))] DataSourceRequest filter, int distritoId,
            int baseId)
        {
            var filterValue = GetFilterValue(filter.Filters, "Codigo");

            return(EntityDao.FindByCodeLike(distritoId, baseId, filterValue.ToString()).ToDataSourceResult(filter, e => Mapper.EntityToModel(e, new ViajeDistribucionModel())));
        }
コード例 #2
0
        public DataSourceResult GetDataSource([ModelBinder(typeof(WebApiDataSourceRequestModelBinder))] DataSourceRequest filter, int distritoId, int baseId)
        {
            var filterValue = GetFilterValue(filter.Filters, "Codigo");

            return(filterValue != null?EntityDao.FindByCodeLike(new[] { distritoId }, new[] { baseId }, new int[] { }, filterValue.ToString()).ToList().ToDataSourceResult(filter, e => Mapper.EntityToModel(e, new PuntoEntregaModel())) : EntityDao.GetList(new[] { distritoId }, new[] { baseId }, new int[] { }).ToDataSourceResult(filter, e => Mapper.EntityToModel(e, new PuntoEntregaModel())));
        }