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

Activities of "dntframework"

We only need to replace the authentication process. We would like to use the authentication provided directly by azure instead the login page of the aspnetzero framework

Best Regards

We would like to use the Authentication integrated in azure App service:

https://docs.microsoft.com/en-us/azure/app-service/overview-authentication-authorization

What could be the easier way? It is supported natively in asp.net zero?

Thanks

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Abp.Application.Services.Dto;
using Abp.Authorization;
using Abp.Domain.Repositories;
using Abp.Extensions;
using Abp.Localization;
using Abp.MultiTenancy;
using Abp.UI;
using cscDemo.Authorization;
using cscDemo.Localization.Dto;

using Abp.AutoMapper;
using System.Linq.Dynamic;
using Abp.Linq.Extensions;
//using System.Data.Entity;
//using System.Web.Http;
using cscDemo.Dto.ProductsBrands;

namespace cscDemo
{
   class ProductsBrandsAppService : cscDemoAppServiceBase, IProductsBrandsAppService
   {
       private readonly IRepository<cscDemo.ProductsBrands> _myRepository;
       public ProductsBrandsAppService(IRepository<cscDemo.ProductsBrands> myRepository)
       {
           _myRepository = myRepository;
       }

       public ListResultDto<GetTableDto> GetTable(GetTableFilters input)
       {
           var retValues = _myRepository
               .GetAll()
               .WhereIf
               (
                   !input.FilterName.IsNullOrEmpty(),
                   p => p.bnd_name.Contains(input.FilterName)
               )
               .OrderBy(p => p.bnd_name)
               .ToList();

           return new ListResultDto<GetTableDto>(ObjectMapper.Map<List<GetTableDto>>(retValues));
       }

       public async Task CreateRecord(CreateRecordInput input)
       {
           var person = ObjectMapper.Map<ProductsBrands>(input);
           await _myRepository.InsertAsync(person);
       }

   }
}

I've just copied the code, thanks!

using Abp.Application.Services;
using Abp.Application.Services.Dto;
using System.Threading.Tasks;
using cscDemo.Dto.ProductsBrands;

namespace cscDemo
{
   public interface IProductsBrandsAppService : IApplicationService
   {
       ListResultDto<GetTableDto> GetTable(GetTableFilters input);
       //Task<GetRecordDto> GetRecord(IEntityDto input);
       //Task DeleteRecord(EntityDto input);
       Task CreateRecord(CreateRecordInput input);
   }
}

Could you please confirm what part of code would you like to see (I've included in the first email part of the function).

Thanks

Yes, we have the corresponding interface and implementation. Up to here "https://docs.aspnetzero.com/documents/aspnet-core-mvc/latest/Developing-Step-By-Step-Core-Using-GetPeople-Method-From-MVC-Controller" the project works correctly.

Then, in the "Creating a new person" stage, it works well until the "Opening the person modal" step, but the next step "Saving person" is where the error occurs and, as indicated in the previous ticket, we have detected that the problem is because the proxy "abp.services.app.person" has the value "undefined"

Thanks

Hi,

We are creating our project under the "ASP.NET CORE MVC & JQUERY" development model and after several revisions we find the following problem when trying to save a record in a table of the database following the tutorial provided by asp.net.zero (https://docs.aspnetzero.com/documents/aspnet-core-mvc/latest/Developing-Step-By-Step-Core-Saving-Person)

Uncaught TypeError: Cannot read property 'createRecord' of undefined
at app.modals.CreateRecordModal.save (<anonymous>:24:24)
at _saveModal (common-scripts.min.js?v=vA1O4M4uaZQnqZ9HNaBPBzScMHs9G2pV771ZD1B3Pqo:1321)
at HTMLDivElement.<anonymous> (common-scripts.min.js?v=vA1O4M4uaZQnqZ9HNaBPBzScMHs9G2pV771ZD1B3Pqo:1362)
at HTMLDivElement.dispatch (app-layout-libs.min.js?v=kiKOH3Y_fJm5plIXFqEXEi1gXe_Aq_p_UmJ3EA2xe-k:5666)
at HTMLDivElement.elemData.handle (app-layout-libs.min.js?v=kiKOH3Y_fJm5plIXFqEXEi1gXe_Aq_p_UmJ3EA2xe-k:5474)

The error occurs in the file "_CreateRecordModal.js" since the object "_myService" has an "undefined" value

(function($) {
    app.modals.CreateRecordModal = function() {
        var _modalManager;
        var _myService = abp.services.app.productsBrands;
        var _$form = null;
        this.init = function(modalManager) {
            _modalManager = modalManager;
            _$form = _modalManager.getModal().find('form');
            _$form.validate();
        };
        this.save = function() {
            if (!_$form.valid()) {
                return;
            }
            var record = _$form.serializeFormToObject();
            _modalManager.setBusy(true);
            _myService.createRecord(record).done(function() {
                _modalManager.close();
                location.reload();
            }).always(function() {
                _modalManager.setBusy(false);
            });
        };
    };
})(jQuery);

Analyzing the content of the object "abp.services.app" we can see the following properties:

{
    timing: {…},
    tenantDashboard: {…},
    session: {…},
    organizationUnit: {…},
    notification: {…},
    …
}
account: { isTenantAvailable: ƒ, resolveTenantId: ƒ, register: ƒ, sendPasswordResetCode: ƒ, resetPassword: ƒ, …}
auditLog: { getAuditLogs: ƒ, getAuditLogsToExcel: ƒ, getEntityHistoryObjectTypes: ƒ, getEntityChanges: ƒ, getEntityTypeChanges: ƒ, …}
caching: { getAllCaches: ƒ, clearCache: ƒ, clearAllCaches: ƒ}
chat: { getUserChatFriendsWithSettings: ƒ, getUserChatMessages: ƒ, markAllUnreadMessagesOfUserAsRead: ƒ}
commonLookup: { getEditionsForCombobox: ƒ, findUsers: ƒ, getDefaultEditionName: ƒ}
demoUiComponents: { sendAndGetDate: ƒ, sendAndGetDateTime: ƒ, sendAndGetDateRange: ƒ, getCountries: ƒ, sendAndGetSelectedCountries: ƒ, …}
edition: { getEditions: ƒ, getEditionForEdit: ƒ, createEdition: ƒ, updateEdition: ƒ, deleteEdition: ƒ, …}
friendship: { createFriendshipRequest: ƒ, createFriendshipRequestByUserName: ƒ, blockUser: ƒ, unblockUser: ƒ, acceptFriendshipRequest: ƒ}
hostDashboard: { getDashboardStatisticsData: ƒ, getIncomeStatistics: ƒ, getEditionTenantStatistics: ƒ}
hostSettings: { getAllSettings: ƒ, updateAllSettings: ƒ, sendTestEmail: ƒ}
install: { setup: ƒ, getAppSettingsJson: ƒ, checkDatabase: ƒ}
invoice: { getInvoiceInfo: ƒ, createInvoice: ƒ}
language: { getLanguages: ƒ, getLanguageForEdit: ƒ, createOrUpdateLanguage: ƒ, deleteLanguage: ƒ, setDefaultLanguage: ƒ, …}
notification: { getUserNotifications: ƒ, setAllNotificationsAsRead: ƒ, setNotificationAsRead: ƒ, getNotificationSettings: ƒ, updateNotificationSettings: ƒ, …}
organizationUnit: { getOrganizationUnits: ƒ, getOrganizationUnitUsers: ƒ, getOrganizationUnitRoles: ƒ, createOrganizationUnit: ƒ, updateOrganizationUnit: ƒ, …}
payPalPayment: { confirmPayment: ƒ, getConfiguration: ƒ, cancelPayment: ƒ}
payment: { getPaymentInfo: ƒ, createPayment: ƒ, cancelPayment: ƒ, getPaymentHistory: ƒ, getActiveGateways: ƒ, …}
permission: { getAllPermissions: ƒ}
profile: { getCurrentUserProfileForEdit: ƒ, updateGoogleAuthenticatorKey: ƒ, sendVerificationSms: ƒ, verifySmsCode: ƒ, prepareCollectedData: ƒ, …}
role: { getRoles: ƒ, getRoleForEdit: ƒ, createOrUpdateRole: ƒ, deleteRole: ƒ}
session: { getCurrentLoginInformations: ƒ, updateUserSignInToken: ƒ}
stripePayment: { confirmPayment: ƒ, createSubscription: ƒ, updateSubscription: ƒ, getConfiguration: ƒ}
subscription: { upgradeTenantToEquivalentEdition: ƒ, disableRecurringPayments: ƒ, enableRecurringPayments: ƒ}
tenant: { getTenants: ƒ, createTenant: ƒ, getTenantForEdit: ƒ, updateTenant: ƒ, deleteTenant: ƒ, …}
tenantDashboard: { getMemberActivity: ƒ, getDashboardData: ƒ, getSalesSummary: ƒ, getRegionalStats: ƒ, getGeneralStats: ƒ}
tenantRegistration: { registerTenant: ƒ, getEditionsForSelect: ƒ, getEdition: ƒ}
tenantSettings: { getAllSettings: ƒ, updateAllSettings: ƒ, clearLogo: ƒ, clearCustomCss: ƒ, sendTestEmail: ƒ}
timing: { getTimezones: ƒ, getTimezoneComboboxItems: ƒ}
uiCustomizationSettings: { getUiManagementSettings: ƒ, changeThemeWithDefaultValues: ƒ, updateUiManagementSettings: ƒ, updateDefaultUiManagementSettings: ƒ, useSystemDefaultSettings: ƒ}
user: { getUsers: ƒ, getUsersToExcel: ƒ, getUserForEdit: ƒ, getUserPermissionsForEdit: ƒ, resetUserSpecificPermissions: ƒ, …}
userLink: { linkToUser: ƒ, getLinkedUsers: ƒ, getRecentlyUsedLinkedUsers: ƒ, unlinkUser: ƒ }
userLogin: { getRecentUserLoginAttempts: ƒ }
webLog: { getLatestWebLogs: ƒ, downloadWebLogs: ƒ }
proto: Object

Here we can see that the proxy is not being generated dynamically as indicated at the end of the tutorial ("Notice that; We used PersonAppService's createPerson method directly from javascript. This is possible by ABP's dynamic javascript proxy system.")

Could you help us with this?

Thanks

Answer

Thanks!

Question

Hi,

We have created a new project using the configuration "ASP.NET MVC 5.x & jQuery" and we are trying to change the visual style of it, for this we want to use some other theme as you do in the demonstration site and from there customize some aspects of it.

The problem is that in the downloaded project we do not have all the available themes and we did not find information or tools on how to use the themes indicated above.

If we follow the instructions for creating a custom theme as indicated here "https://github.com/aspnetzero/metronic" the generated design seems to correspond to a template of "Metronic 5.5" but the project we have downloaded uses "Metronic 4.7 .5 "(judging by the structure of directories and files).

How can we check which version of metronic is using and update it if required up to the latest version?

Thanks in advance!

Showing 1 to 10 of 13 entries