public async Task <ActionResult> Zones(string zoneIds) { int? impersonatorTenantId; object value; object obj; List <ZoneListDto> zoneListDtos = new List <ZoneListDto>(); string[] strArrays = zoneIds.Split(new char[] { ',' }); for (int i = 0; i < (int)strArrays.Length; i++) { string str = strArrays[i]; IZoneAppService zoneAppService = this._zoneAppService; long num = long.Parse(str.ToString()); if (this.AbpSession.ImpersonatorTenantId.HasValue) { impersonatorTenantId = this.AbpSession.ImpersonatorTenantId; value = impersonatorTenantId.Value; } else { impersonatorTenantId = this.AbpSession.TenantId; value = impersonatorTenantId.Value; } ZoneListDto zone = await zoneAppService.GetZone(num, (long)value); if (zone != null && zone.Id.ToString().Length > 0) { zoneListDtos.Add(zone); } } strArrays = null; ITenantSettingsAppService tenantSettingsAppService = this._tenantsettingsAppService; if (this.AbpSession.ImpersonatorTenantId.HasValue) { impersonatorTenantId = this.AbpSession.ImpersonatorTenantId; obj = impersonatorTenantId.Value; } else { impersonatorTenantId = this.AbpSession.TenantId; obj = impersonatorTenantId.Value; } string tenantCoordinates = await tenantSettingsAppService.GetTenantCoordinates((long)obj); ZonesMapView zonesMapView = new ZonesMapView() { Zones = zoneListDtos, TenantCoordinates = tenantCoordinates }; return(this.View(zonesMapView)); }
public async Task <PartialViewResult> MapViewModal() { int? impersonatorTenantId; int value; object obj; IZoneAppService zoneAppService = this._zoneAppService; if (this.AbpSession.ImpersonatorTenantId.HasValue) { impersonatorTenantId = this.AbpSession.ImpersonatorTenantId; value = impersonatorTenantId.Value; } else { impersonatorTenantId = this.AbpSession.TenantId; value = impersonatorTenantId.Value; } List <ZoneListDto> zonesByTenantId = await zoneAppService.GetZonesByTenantId(value, true); if (zonesByTenantId == null || zonesByTenantId != null && zonesByTenantId.Count == 0) { zonesByTenantId = new List <ZoneListDto>(); } ITenantSettingsAppService tenantSettingsAppService = this._tenantsettingsAppService; if (this.AbpSession.ImpersonatorTenantId.HasValue) { impersonatorTenantId = this.AbpSession.ImpersonatorTenantId; obj = impersonatorTenantId.Value; } else { impersonatorTenantId = this.AbpSession.TenantId; obj = impersonatorTenantId.Value; } string tenantCoordinates = await tenantSettingsAppService.GetTenantCoordinates((long)obj); ZonesMapView zonesMapView = new ZonesMapView() { Zones = zonesByTenantId, TenantCoordinates = tenantCoordinates }; return(this.PartialView("_MapViewModal", zonesMapView)); }