Beispiel #1
0
        public async Task <ActionResult> Index()
        {
            int?impersonatorTenantId;
            int value;

            if (this.AbpSession.ImpersonatorTenantId.HasValue)
            {
                impersonatorTenantId = this.AbpSession.ImpersonatorTenantId;
                value = impersonatorTenantId.Value;
            }
            else
            {
                impersonatorTenantId = this.AbpSession.TenantId;
                value = impersonatorTenantId.Value;
            }
            int num = value;
            IRepository <FuelCastSetting> repository   = this._fuelCastSettingRepository;
            List <FuelCastSetting>        allListAsync = await repository.GetAllListAsync((FuelCastSetting m) => m.TenantId == num);

            List <FuelCastSetting> fuelCastSettings  = allListAsync;
            GetSettingsOutput      getSettingsOutput = new GetSettingsOutput()
            {
                Settings = new SettingsEditDto()
            };
            ManageSettings manageSetting = new ManageSettings(getSettingsOutput);

            if (fuelCastSettings.Count == 1)
            {
                manageSetting.Settings = fuelCastSettings[0].MapTo <SettingsEditDto>();
            }
            return(this.View(manageSetting));
        }
Beispiel #2
0
 public ManageSettings(GetSettingsOutput output)
 {
     output.MapTo <GetSettingsOutput, ManageSettings>(this);
 }