Base solution for your next web application

Activities of "ismcagdas"

Hi,

For matching your html form to your dto you can use third party javascript libraries. One might be this <a class="postlink" href="http://maxatwork.github.io/form2js/">http://maxatwork.github.io/form2js/</a>.

Entity Framework does not support saving nested entities. You can do it manually or there are also custom solutions for this like GraphDiff <a class="postlink" href="https://github.com/refactorthis/GraphDiff">https://github.com/refactorthis/GraphDiff</a>.

I haven't tried GraphDiff yet but you can give it a try.

Hi,

By default HomePage is not a part of single page application, it's a classic Asp.Net MVC multi page application.

You can convert it to a single page application by implementing a similar code in app.js but it requires a bit more work.

Why don't you get data from your AppService in HomeController and pass it to your view with a view model. I think it's a better and easier solution :).

Answer

Hi,

Your code might look like this

vm.importAll = function() {
    abp.message.confirm(app.localize('ImportWarning'),
        function(isConfirmed) {

            if (isConfirmed) {
                abp.ui.block();
                setupService.seedSampleCompany().success(function() {
                    abp.notify.success(app.localize('Organization') + ' ' + app.localize('SuccessfullyImported'));
                    setupService.seedSampleMenu().success(function() {
                        abp.notify.success(app.localize('Menu') + ' ' + app.localize('SuccessfullyImported'));

                        var seedSampleCustomer = setupService.seedSampleCustomer().success(function() {
                            abp.notify.success(app.localize('Customer') + ' ' + app.localize('SuccessfullyImported'));
                        }).finally(function() {});

                        var seedSampleSupplier = setupService.seedSampleSupplier().success(function() {
                            abp.notify.success(app.localize('Supplier') + ' ' + app.localize('SuccessfullyImported'));
                        }).finally(function() {
                            setupService.seedSampleMaterial().success(function() {
                                abp.notify.success(app.localize('Material') + ' ' + app.localize('SuccessfullyImported'));
                            });
                        });

                        var seedSampleTax = setupService.seedSampleTax().success(function() {
                            abp.notify.success(app.localize('Tax') + ' ' + app.localize('SuccessfullyImported'));
                        }).finally(function() {});

                        $q.all([seedSampleCustomer, seedSampleSupplier, seedSampleTax]).then(function() {
                            abp.ui.unblock();
                        });

                    });

                });

            }
        });
}

I didn't include seedSampleMaterial. If it takes long time, your screen might be unblocked before it's completed. I think you might figure it out after you run this code successfully :).

I hope this helps you.

Hi,

Which type is your application, single page or multi page ? And can you see the necessary scripts when you view the source of your page in a browser ?

Hi,

Can you share your EntityBase class as well. Because I have tried your first schenario by replacing EntityBase with Entity, it worked for me.

Hi,

There is an open issue about this problem for EntityFramework.Extended library on github. <a class="postlink" href="https://github.com/loresoft/EntityFramework.Extended/issues/114">https://github.com/loresoft/EntityFrame ... issues/114</a>

For now it seems, it's not possible to use EntityFramework.Extended library.

You can fork EntityFramework.Extended library and change the name of OrderBy method but it will bring you an extra work for keeping synchronized your version with EntityFramework.Extended master.

Answer

Hi,

Before doing anything, you can run "abp.ui.block();" on your Chrome's developer console to see if this really blocks the screen or not ?

You should call "abp.ui.unblock();" inside of your ajax success handler, it's outside of all success handlers for now. Because of that your screen is getting blocked and then unblocked immediately.

If you want to unblock your screen after all ajax calls completed, then you can use angular's $q.all.

These two links might help you for that,

<a class="postlink" href="http://stackoverflow.com/questions/23931846/wait-for-all-http-requests-to-complete-in-angular-js">http://stackoverflow.com/questions/2393 ... angular-js</a> <a class="postlink" href="https://code.angularjs.org/1.1.5/docs/api/ng.$q">https://code.angularjs.org/1.1.5/docs/api/ng.$q</a>

Answer

Hi,

Two files must be included in your page.

1 - abp.blockUI.js which is under path ""~/Abp/Framework/scripts/libs/abp.blockUI.js"" 2 - block UI jquery plugin which must be under this path "~/libs/jquery-blockui/jquery.blockui.min.js"

But these two files must be already included in the AppBundleConfig class. It shouldn't be a problem if you are trying to use this code on the admin site.

Hi,

I believe your problem is related to your modal's controller. Can you share createPersonModal controller's code as well.

Probably you will need to inject $uibModalInstance on that controller.

Hi,

When do you get this error ? As soon as run the application or in a specific case ? Can you also check your database that AbpTenants table has a record with id=2.

Showing 12591 to 12600 of 12723 entries