Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "misix"

Good catch, this solved my issue. Thanks.

Hi,

This is my .js (_CreateOnyxClientModal.js)

(function () { app.modals.CreateOnyxClientModal = function () {

    var _modalManager;
    var _onyxclientService = abp.services.app.onyxclient;
    var _$form = null;
  

    this.init = function (modalManager) {
        _modalManager = modalManager;

        _$form = _modalManager.getModal().find('form');
        _$form.validate();
    };

    this.save = function() {
        if (!_$form.valid()) {
            return;
        }

        var onyxclient = _$form.serializeFormToObject();

        _modalManager.setBusy(true);
        _onyxclientService.createOnyxClient(onyxclient).done(function () {
            _modalManager.close();
            location.reload();
        }).always(function () {
            _modalManager.setBusy(false);
        });
    };
};

})(jQuery);

And this is OnyxClientAppService.cs

using Abp.Application.Services.Dto; using Abp.AutoMapper; using Abp.Collections.Extensions; using Abp.Domain.Repositories; using Abp.Extensions; using Sixoclock.Onyx.Entities; using Sixoclock.Onyx.OnyxClients.Dto; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks;

namespace Sixoclock.Onyx.OnyxClients { public class OnyxClientAppService : OnyxAppServiceBase, IOnyxClientAppService { private readonly IRepository<OnyxClient> _onyxclientRepository;

    public OnyxClientAppService(IRepository&lt;OnyxClient&gt; onyxclientRepository)
    {
        _onyxclientRepository = onyxclientRepository;
    }

    public ListResultDto&lt;OnyxClientListDto&gt; GetOnyxClients(GetOnyxClientsInput input)
    {
        var onyxclientss = _onyxclientRepository
            .GetAll()
            .WhereIf(
                !input.Filter.IsNullOrEmpty(),
                p => p.Name.Contains(input.Filter) ||
                    p.EmailAddress.Contains(input.Filter)
            )
            .OrderBy(p => p.Name)
            .ToList();

        return new ListResultDto&lt;OnyxClientListDto&gt;(ObjectMapper.Map&lt;List&lt;OnyxClientListDto&gt;>(onyxclientss));
    }

    public async Task CreateOnyxClient(CreateOnyxClientInput input)
    {
        var onyxclient = input.MapTo&lt;OnyxClient&gt;();
        await _onyxclientRepository.InsertAsync(onyxclient);
    }
}

}

I've used the example and replaced "person" with onyxclient and "Person" with "OnyxClient". "People" became "OnyxClients".

Thanks

I resolved this issue by changing

<PackageReference Include="System.Net.Http" Version="4.3.1" />

to

<PackageReference Include="System.Net.Http" Version="4.3.2" />

in the .csproj file. Now back to work..

Showing 1 to 3 of 3 entries