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

Activities of "panic"

Hello Aliriza, Thank you for your reply. Regarding format, I am actually asking if there is a way to combine s specific format with the "L" for preserving language localization. For example something like below:

$('.date-picker').datetimepicker({
            locale: abp.localization.currentLanguage.name,
            format: 'L("dd MMM yyyy, HH:MM")'
        });

Thank you.

Hello, As taken from DemoUiComponents page, the below javascript is used to initialize a datetime-picker input. Now, I would like to apply a specific display format but I cannot do it because the option is already assigned value 'L'. How can I apply "dd/mm/yyyy HH:MM"?

$('.date-picker').datetimepicker({
            locale: abp.localization.currentLanguage.name,
            format: 'L'
        });

Additionally, just to mention that I tried to use the date-picker component and it would not work because file "bootstrap-datepicker.min.js" was not included in bundle.config.js. Below entries had to be added, to copy file under wwwroot/lib and then to bundle it in "app-layout-libs.js".

under mappings: "node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js": "bootstrap-datepicker/dist/js",
.
.
.
and then:
            outputFileName: 'wwwroot/view-resources/Areas/App/Views/_Bundles/app-layout-libs.js',
            inputFiles: [
                "wwwroot/lib/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js",
Question

Hello, I would like your recommendation on how to incorporate new version 5.06 of Metronic theme to my existing project. I am using the version 5.05 of Metronic. I really need to use the new wizard feature that they have provided with this version. What would be the most appropriate way to update to 5.06? I am using Full.Net Core + JQuery MPA. Many thanks!

Oops! Only now I have seen it:<ins>_contactRepository.InsertAndGetIdAsync</ins> Thanks again. Have a good day!

Hello Aaron, Thank you very much for your suggestion. It has solved my problem. However, I am facing a next problem: As you can see from above image, the id returned after insert is not the real one. I tried using a synchronous call to insert record but without any success as i get same result. Any suggestions on how to get the real id (primary key) right after inserting a record using a repository insert or insertasync? Many thanks!

Hello, I have seen that this is possible by using abp.ajax, as you describe at <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Javascript-API/AJAX">https://aspnetboilerplate.com/Pages/Doc ... t-API/AJAX</a> .. however, i am just wondering if there is any other way. Many thanks.

Hello, Is there a way to get the primary key (id) of the just inserted record, from java-script side? Let's say I have a database table Contact, and below is the java-script code of the modal that i use to create a new contact record. After I click the save button, I use _contactService.createContact to create the new record in the database. Right after this step I need to get the value of the primary key of the new record. Thank you.

_CreateContactModal.js

(function ($) {
    app.modals.CreateContactModal = function () {

        var _modalManager;
        var _contactService = abp.services.app.contact;
        var _$form = null;

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

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

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

            var contact = _$form.serializeFormToObject();

            _modalManager.setBusy(true);
            _contactService.createContact(contact).done(function () {
                abp.notify.info(app.localize('SavedSuccessfully'));
                _modalManager.close();
                
                //Here I need to get the id of the newly inserted record

                abp.event.trigger('app.createOrEditUserModalSaved');
            }).always(function () {
                _modalManager.setBusy(false);
            });
        };
    };
})(jQuery);

Hello ismcagdas, Certaintly I will submit a support ticket to Stimulsoft to see from their side what they suggest. Thank you very much for your help. Good day.

Hello Aaron, Thank you for your suggestion. However, please note that the command to set cookie [ AbpAntiForgeryManager.SetCookie(Context); ] is already included in my _layout file, as you see in the code below. Are there any other options to set using the AbpAntiForgeryManager to confront this problem? Regards.

@using System.Globalization
@using System.Threading.Tasks
@using Abp.MultiTenancy
@using MyAssetMan.Features
@using MyAssetMan.Timing
@using MyAssetMan.Web.Areas.App.Views.Shared.Components.AppFooter
@using MyAssetMan.Web.Areas.App.Views.Shared.Components.AppHeader
@using MyAssetMan.Web.Areas.App.Views.Shared.Components.AppSideBar
@using MyAssetMan.Web.Resources
@using Abp.Web.Security.AntiForgery
@using MyAssetMan.Chat.SignalR
@using MyAssetMan.Url
@using MyAssetMan.Web.Session
@using CultureHelper = MyAssetMan.Localization.CultureHelper
@inject ScriptPaths ScriptPaths
@inject AppTimes AppTimes
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@inject IWebUrlService WebUrlService
@inject IPerRequestSessionCache SessionCache
@{
    AbpAntiForgeryManager.SetCookie(Context);

    var isChatEnabled = SignalRFeature.IsAvailable && (AbpSession.MultiTenancySide == MultiTenancySides.Host || IsFeatureEnabled(AppFeatures.ChatFeature));
}

<!DOCTYPE html>
<html lang="en" @(CultureHelper.IsRtl ? "dir=\"rtl\"" : "")>
<head>
    <title>MyAssetMan</title>
    <meta charset="utf-8" />

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <meta content="" name="description" />
    <meta content="" name="author" />

Hello ismcagdas, I have managed to overcome this error by decorating the controller action with [IgnoreAntiforgeryToken]. Can you confirm that this is the best approach or else do you recommend something else? Thank you.

[IgnoreAntiforgeryToken] – Disables the Antiforgery validation in a specific action or controller. For example, you might add the Antiforgery validation globally or to an entire controller class, but you might still want to ignore the validation in specific actions.
Showing 11 to 20 of 27 entries