Base solution for your next web application

Activities of "john_kattenhorn"

Answer

We've been using Hangfire with ABP for a while now and it took a while to figure out the Castle Windsor issues but it works fine now.

We use it as a WebJob in Azure as we didn't want to affect the performance of App whilst the jobs was running but it's actually a Console App.

Let me know if you want us to share some code and I'll see what I can do.

Answer

We've been using Hangfire with ABP for a while now and it took a while to figure out the Castle Windsor issues but it works fine now.

We use it as a WebJob in Azure as we didn't want to affect the performance of App whilst the jobs was running.

Let me know if you want us to share some code and I'll see what I can do.

We had this working pretty well, you can see our implementation in this PR which you can find here :

<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/pull/57">https://github.com/aspnetzero/aspnet-zero/pull/57</a>

I PR'd this work into the github repo; you can find it here :

<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/pull/57">https://github.com/aspnetzero/aspnet-zero/pull/57</a>

Answer

We've been using Hangfire with ABP for a while now and it took a while to figure out the Castle Windsor issues but it works fine now.

We use it as a WebJob in Azure as we didn't want to affect the performance of App whilst the jobs was running.

Let me know if you want us to share some code and I'll see what I can do.

Hi,

It was more around the POST'ing of values back, we've found that if we display in UK Format then we cannot post back as the binder doesn't like the date due to the month being on the wrong place.

I've solved it for now but wanted to get some best practice advice really.

Thanks

John

Answer

I went with the conversion of the tenants to abstract and it worked a treat!

What is the right way to control navigation on the save and cancel, should I use $state.go ?

Thanks again!

John

Answer

Thanks ever so much, it's probably something to do with my lack of experience for AngularJS but I really appreciate your help.

Answer

So I'm still stuck, I've read up on the ui-router and it looks really clever, I like it but I cannot make it work for me. I get on JS errors it simple refuses to do anything.

Here is the snippet from the app.js

if (abp.auth.hasPermission('Pages.Tenants')) {
            $urlRouterProvider.otherwise("/host/tenants"); // Entrance page for the host
            $stateProvider.state('host.tenants', {
                url: '/tenants',
                templateUrl: '~/App/host/views/tenants/index.cshtml',
                menu: 'Organisations'
            });

            $stateProvider.state('host.tenants.create', {
                url: '/create',
                templateUrl: '~/App/host/views/tenants/create.cshtml'
            });

            $stateProvider.state('host.tenants.edit', {
                url: '/edit/:tenantId',
                templateUrl: '~/App/host/views/tenants/edit.cshtml'                
            });

        }

        if (abp.auth.hasPermission('Pages.Administration.Host.Settings')) {
            $stateProvider.state('host.settings', {
                url: '/settings',
                templateUrl: '~/App/host/views/settings/index.cshtml',
                menu: 'Administration.Settings.Host'
            });
        }

I'm hoping that the nesting of host.tenants and host.tenants.create and host.tenants.edit gove the urls #/host/tenant, #/host/tenant/create and #host/tenant/edit respectively.

This is how I'm trying to call the create function (it doesn't work even if you try the url manually though).

<div class="col-xs-6 text-right">
            <a ng-if="vm.permissions.create" class="btn btn-primary blue" ng-href="#/host/tenants/create/"><i class="fa fa-plus"></i> @L("CreateNewTenant")</a>
        </div>

The Create.cshtml

<div ng-controller="host.views.tenants.create as vm">
    <div class="row margin-bottom-5">
        <div class="col-xs-6">
            <div class="page-head">
                <div class="page-title">
                    <h1>
                        <span>PAGE_NAME</span> <small>PAGE_NAME_INFO</small>
                    </h1>
                </div>
            </div>
        </div>
        <div class="col-xs-6 text-right">
            <button class="btn btn-primary blue" @*ng-click="vm.doIt1()"*@><i class="fa fa-plus"></i> ACTION_ONE</button>
            <button class="btn btn-primary blue" @*ng-click="vm.doIt2()"*@><i class="fa fa-plus"></i> ACTION_TWO</button>
        </div>
    </div>
    <div class="portlet light">
        <div class="portlet-body">
            <p>PAGE_CONTENT_HERE</p>
        </div>
    </div>
</div>

The create js file :

(function () {

    appModule.controller('host.views.tenants.create', [
         '$scope', '$modal', 'uiGridConstants', 'abp.services.app.tenant',
         function ($scope, $modal, uiGridConstants, tenantService) {
             var vm = this;

             $scope.$on('$viewContentLoaded', function () {
                 Metronic.initAjax();
             });
             

            //start from here...
        }
    ]);
})();

I'd really appreciate some help on this as I've now spent an entire day on this function and it's running late.

Thanks

Answer

OK, I've made some headway, but I think I've not done the routing correctly :

if (abp.auth.hasPermission('Pages.Tenants')) {
            $urlRouterProvider.otherwise("/host/tenants"); // Entrance page for the host
            $stateProvider.state('host.tenants', {
                url: '/tenants',
                templateUrl: '~/App/host/views/tenants/index.cshtml',
                menu: 'Organisations'
            });

            $stateProvider.state('host.tenants.create', {
                url: '/tenants/create',
                templateUrl: '~/App/host/views/tenants/create.cshtml'
            });

            $stateProvider.state('host.tenants.edit', {
                url: '/tenants/edit/:tenantId',
                templateUrl: '~/App/host/views/tenants/edit.cshtml'                
            });

        }

On the create button I have:

<div class="col-xs-6 text-right">
            <button ng-if="vm.permissions.create" class="btn btn-primary blue" href="#/tenants/create/"><i class="fa fa-plus"></i> @L("CreateNewTenant")</button>
        </div>

I think I have the navigation routes wrong maybe, I'm just going to have some dinner and then I will come back to it :-)

Showing 1 to 10 of 10 entries