| | |
| | | using AutoMapper.Execution; |
| | | using AutoMapper.Execution; |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using Magicodes.ExporterAndImporter.Core.Models; |
| | | using Magicodes.ExporterAndImporter.Excel; |
| | |
| | | if (userRole == null) |
| | | throw new Exception($"æ æé"); |
| | | |
| | | if (type.IsAssignableFrom(typeof(BaseWarehouseEntity)) || type.GetProperty(nameof(BaseWarehouseEntity.WarehouseId)) != null) |
| | | if (typeof(BaseWarehouseEntity).IsAssignableFrom(type)) |
| | | { |
| | | if (userRole.WarehouseIds.Count > 0) |
| | | { |
| | | return $"{nameof(BaseWarehouseEntity.WarehouseId)} in ({userRole.WarehouseIds.Serialize().Replace("[", "").Replace("]", "")})"; |
| | | } |
| | | |
| | | else |
| | | return $"1 != 1"; |
| | | return "1 = 1"; |
| | | } |
| | | else |
| | | { |