Base solution for your next web application

Activities of "hans abelshausen"

Hi, I'm using Abp 0.7.5.0 I'm trying to get values stored in my database, but I only get the values stored in my application.dll In Core:

public class FeatureValueStore : AbpFeatureValueStore<Tenant, Role, User>
    {
        public FeatureValueStore(TenantManager tenantManager)
            : base(tenantManager)
        {
        }
        
    }

In Application:

public class AppFeatureProvider : FeatureProvider
    {
        public override void SetFeatures(IFeatureDefinitionContext context)
        {
            context.Create("Test", defaultValue: "false");
            context.Create("SecondTest", defaultValue: "50");
        }
    }

In ApplicationModule:

Configuration.Features.Providers.Add<AppFeatureProvider>();

And in my database in abpfeatures table 2 Test true 2016-07-28 08:45:00.400 2 NULL 1 FeatureSetting 3 SecondTest 3 2016-07-28 08:45:00.403 2 NULL 1 FeatureSetting

I thought abp.features.isEnabled for example is getting value from database like it works in abpsettings

"If current unit of work is transactional, all changes in the transaction are rolled back if an exception occurs, even saved changes." We are getting an out of memory exception inserting elements. So our plan is to save the elements before memory exception occurs, but everything is rolled back. Is there a way to insert the elements although memory exception appears.

Hi,

I'm trying to increase the max value of the Value field. In database it is declared as max, but if I try to insert a new entry following error occures: Value: Das Feld "Value" muss ein Zeichenfolgen- oder Arraytyp mit einer maximalen Länge von 2000 sein.

In my code I try this: public class UserSetting : Setting { [MaxLength] public override string Value { get; set; } }

I'm using abp 0.7.5

Hi, I have a lot of sites which are only for logged in users. If someone tries to add the URL, the Controller redirects the user to the Login.cshtml page. After Login I would like to Redirect to the url the user tries to reach. Where can I store this url path. I have tried to put it in the app.js $rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {} but this didn't work. Can anyone help me? Thanks in advance

Question

Hi, is there a way to delete auditlogs by button? I try to get all elements in the table abpauditlogs var logs = _logRepository.GetAll().ToList(); foreach (var log in logs) { _logRepository.Delete(log.Id); _unitOfWorkManager.Current.SaveChanges(); }

But only logs that are pushed by myself to the table are deleted? What's the right way to delete the other entries?

Hi, I have a simple question, how to get path of a cshtml which is two Levels above app.js

.state('customHome', {
                     url: '/',
                     controller: 'Test.controllers.views.home.home as vm',
                     templateUrl: '/../../Custom/test.cshtml',
                     menu: 'CustomHome'
                 })

my tree structure Looks like: Test App Main app.js

Test Custom test.cshtml test.js

Thanks in advance.

Hi, I have updated abp to newest version and now my dictionary provider is not working anymore... The function GetDictionaries is not there anymore and LocalizationDictionaryInfo has less params...Could you please show me the correct code?

public IEnumerable<LocalizationDictionaryInfo> GetDictionaries(string sourceName)
        {

            var cultures = _cultureService.GetOnlyLanguages().GlobalLanguages.ToList();
            var entries = _labelTextService.GetTranslationTexts().TranslationTexts.ToList();

            var dictionaries = new List<LocalizationDictionaryInfo>();

            foreach (var culture in cultures)
            {
                var tempInfo = new CultureInfo(culture.IsoCode);
                dictionaries.Add(new LocalizationDictionaryInfo(DbLocalizationDictionary.Build(tempInfo, entries),
                    isDefault: Convert.ToBoolean(culture.DefaultLang)));
            }
            return dictionaries;

        }

I have tried following code and the dictionaries are loaded. But if I change language in my menu, the localization do not swtich to the selected lang? [code][/public void Initialize(string sourceName) { var cultures = _cultureService.GetOnlyLanguages().GlobalLanguages.ToList(); var entries = _labelTextService.GetTranslationTexts().TranslationTexts.ToList();

        foreach (var culture in cultures)
        {
            var tempInfo = new CultureInfo(culture.IsoCode);
            if(Dictionaries == null)
                Dictionaries = new Dictionary&lt;string, ILocalizationDictionary&gt;();
            Dictionaries.Add(tempInfo.ToString(),DbLocalizationDictionary.Build(tempInfo, entries));
        }
    }code]
Question

Hi, I'm trying to delete a table entry in db with foreign key properties to another table. Correctly, the enty is not deleted. My question, after going back to my javascript code: .error(function (response) { abp.message.error('Error Message', 'Is not deleted'); })

following popup appears in my browser. That is perfect. But before this popup appears, another popup is shown, which is not very userfriendly...Something like: An error occured while updating the entries. See the inner exception for details.... STACK TRACE: System.Data.Entity... and so on..

How can I turn off this message and only show up the abp.message.error?

Question

Hi, could you please explain the abp setting table. I have filled the db table with content. Is it necessary to add these content in application settingprovider what I have done. If I started my app a few times and then try to add another setting in the db, the ID increments but not to the next number instead of for example from 3 to 10. I don't know why or haven't understood the settingmanager :-( Here in my application layer:

public override IEnumerable<SettingDefinition> GetSettingDefinitions(SettingDefinitionProviderContext context)
        {
            return new[]
                   {
                       new SettingDefinition(
                           "FunctionShowShortField", 
                           "true",
                           scopes: SettingScopes.Application, 
                           isVisibleToClients: true),
                        new SettingDefinition(
                           "ProcEditOnlyDraft", 
                           "true",
                           scopes: SettingScopes.Application, 
                           isVisibleToClients: true)
                   };
        }

I wolud like to handle the values of the db table in my angular controller. (abp.setting.get("FunctionShowShortField"))

Question

Hi, I have implemented Module Zero and everything works fine. Now I try to implement the Login later. What is the best way to do this? A normal user(Not logged in) can view the page and some buttons on top of the page! If the user clicks Button login, the Login Form should appear and after login the edit Buttons should also be visible! Thanks in advance Hans

Showing 1 to 10 of 20 entries