Base solution for your next web application

Activities of "rodrigosturm"

Hi..

I Downloaded a new 6.5v of aspcore + MVC, did the initial configuration ( run npm, config string,etc ), and run the debug in local, and thats works perfect.

But, I Create a new APP in Azure and publish this raw project, and its me get the error 502.5 when its starts

Can anyone help me?

Hello,

I'm creating buttons in real time with this code:

 $('#OpenCidadeVanLegalLookupTableButton').click(function () {
            _cidadeVanLegalLookupTableModal.open({ id: 0, displayName: $('#cidadeVanLegalDescricao').val() }, function (data) {
                $("#divCidades").append("<button type='button' name= 'btn_RemoverCidade' value='" + data.id + "' class='btn btn_RemoverCidade m-btn--pill ' m-btn m-btn--custom m-btn--bolder m-btn--uppercase '><i class='fa fa-close'></i>" + data.displayName + "</button>");               
                CidadesEscolhidas = CidadesEscolhidas + "," + data.id;
                $("#cidadeVanLegalId").val(CidadesEscolhidas);
            });
        });

And it's working!

But, i need to remove this buttons when its clicked. and I use this code above, but Its not work. I use this a lot in my codes, but it is the first time I use in a Modal page, there are any diference between regular page and modal page in this case?

 $('.btn_RemoverCidade').on("click", function () {
            var value = $(this).attr('value');
            RemoveCidade(value);
            $(this).remove();
        });

Att,

Hi,

I have a RowAction with 2 buttons, View and Delete.

After i used "scrollX": true, when I have one row, the action Deletar(Delete) hidden.

How Can I Fix this?


        var dataTable = _$titulosPagarPagamentosTable.DataTable({
            paging: true,
            serverSide: true,
            processing: true,
            responsive: false,
            "scrollX": true,
            listAction: {
                ajaxFunction: _titulosPagarPagamentosService.getAll,
                inputFilter: function () {
                    return {
                        filter: $('#TitulosPagarPagamentosTableFilter').val(),
                        tipoPagamentoFilter: $('#TipoPagamentoFilterId').val(),
                        minValorPrincipalFilter: $('#MinValorPrincipalFilterId').val(),
                        maxValorPrincipalFilter: $('#MaxValorPrincipalFilterId').val(),
                        minAcrescimoFilter: $('#MinAcrescimoFilterId').val(),
                        maxAcrescimoFilter: $('#MaxAcrescimoFilterId').val(),
                        minDescontoFilter: $('#MinDescontoFilterId').val(),
                        maxDescontoFilter: $('#MaxDescontoFilterId').val(),
                        minDataPagamentoFilter: getDateFilter($('#MinDataPagamentoFilterId')),
                        maxDataPagamentoFilter: getDateFilter($('#MaxDataPagamentoFilterId')),
                        contaObservacaoFilter: $('#ContaObservacaoFilterId').val(),
                        indiceDescricaoFilter: $('#IndiceDescricaoFilterId').val(),
                        tituloPagarTituloFilter: $('#TituloPagarTituloFilterId').val(),
                        tituloId: $('#tituloId').val(),
                    };
                }
            },
            columnDefs: [
                {
                    width: 120,
                    targets: 0,
                    data: null,
                    orderable: false,
                    autoWidth: false,
                    defaultContent: '',
                    rowAction: {
                        cssClass: 'btn btn-brand dropdown-toggle',
                        text: '<i class="fa fa-cog"></i> ' + app.localize('Actions') + ' <span class="caret"></span>',
                        items: [
                            {
                                text: app.localize('View'),
                                action: function (data) {
                                    _viewTituloPagarModal.open({ data: data.record });
                                }
                            },
                            {
                                text: app.localize('Delete'),
                                visible: function () {
                                    return _permissions.delete;
                                },
                                action: function (data) {
                                    deleteTituloPagarPagamento(data.record.tituloPagarPagamento);
                                }
                            }]
                    }
                },
                {
                    targets: 1,
                    data: "tituloPagarPagamento.tipoPagamento",
                    render: function (tipoPagamento) {
                        return app.localize('Enum_tipoPagamento_' + tipoPagamento);
                    }

                },
                {
                    targets: 2,
                    data: "tituloPagarPagamento.valorPrincipal",
                    render: function (valor) {
                        if (valor) {
                            return "R$ " + valor.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+\,)/g, "$1.");
                        }
                        return "R$ 0";
                    }
                },
                {
                    targets: 3,
                    data: "tituloPagarPagamento.acrescimo",
                    render: function (valor) {
                        if (valor) {
                            return "R$ " + valor.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+\,)/g, "$1.");
                        }
                        return "R$ 0";
                    }
                },
                {
                    targets: 4,
                    data: "tituloPagarPagamento.desconto",
                    render: function (valor) {
                        if (valor) {
                            return "R$ " + valor.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+\,)/g, "$1.");
                        }
                        return "R$ 0";
                    }
                },
                {
                    targets: 5,
                    data: "tituloPagarPagamento.dataPagamento",
                    render: function (dataPagamento) {
                        if (dataPagamento) {
                            return moment(dataPagamento).format('L');
                        }
                        return "";
                    }

                },
                {
                    targets: 6,
                    data: "contaObservacao"
                },
                {
                    targets: 7,
                    data: "indiceDescricao"
                }
            ]
        });
Question

I have a modal page, when i open twice the JS File does not load correctly. What can I do?

Code Index.js (Modal):

(function () {
    $(function () {

        var _$titulosPagarPagamentosTable = $('#TitulosPagarPagamentosTable');
        var _titulosPagarPagamentosService = abp.services.app.titulosPagarPagamentos;

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

        var _permissions = {
            create: abp.auth.hasPermission('Pages.TitulosPagarPagamentos.Create'),
            edit: abp.auth.hasPermission('Pages.TitulosPagarPagamentos.Edit'),
            'delete': abp.auth.hasPermission('Pages.TitulosPagarPagamentos.Delete')
        };

        var _createOrEditModal = new app.ModalManager({
            viewUrl: abp.appPath + 'App/TitulosPagarPagamentos/CreateOrEditModal',
            scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/TitulosPagarPagamentos/_CreateOrEditModal.js',
            modalClass: 'CreateOrEditTituloPagarPagamentoModal'
        });

        var _viewTituloPagarPagamentoModal = new app.ModalManager({
            viewUrl: abp.appPath + 'App/TitulosPagarPagamentos/ViewtituloPagarPagamentoModal',
            modalClass: 'ViewTituloPagarPagamentoModal'
        });

        var getDateFilter = function (element) {
            if (element.data("DateTimePicker").date() === null) {
                return null;
            }
            return element.data("DateTimePicker").date().format("YYYY-MM-DDT00:00:00Z");
        }

        var dataTable = _$titulosPagarPagamentosTable.DataTable({
            paging: true,
            serverSide: true,
            processing: true,
            listAction: {
                ajaxFunction: _titulosPagarPagamentosService.getAll,
                inputFilter: function () {
                    return {
                        filter: $('#TitulosPagarPagamentosTableFilter').val(),
                        tipoPagamentoFilter: $('#TipoPagamentoFilterId').val(),
                        minValorPrincipalFilter: $('#MinValorPrincipalFilterId').val(),
                        maxValorPrincipalFilter: $('#MaxValorPrincipalFilterId').val(),
                        minAcrescimoFilter: $('#MinAcrescimoFilterId').val(),
                        maxAcrescimoFilter: $('#MaxAcrescimoFilterId').val(),
                        minDescontoFilter: $('#MinDescontoFilterId').val(),
                        maxDescontoFilter: $('#MaxDescontoFilterId').val(),
                        minDataPagamentoFilter: getDateFilter($('#MinDataPagamentoFilterId')),
                        maxDataPagamentoFilter: getDateFilter($('#MaxDataPagamentoFilterId')),
                        contaObservacaoFilter: $('#ContaObservacaoFilterId').val(),
                        indiceDescricaoFilter: $('#IndiceDescricaoFilterId').val(),
                        tituloPagarTituloFilter: $('#TituloPagarTituloFilterId').val(),
                        tituloId: $('#tituloId').val(),
                    };
                }
            },
            columnDefs: [
                {
                    width: 120,
                    targets: 0,
                    data: null,
                    orderable: false,
                    autoWidth: false,
                    defaultContent: '',
                    rowAction: {
                        cssClass: 'btn btn-brand dropdown-toggle',
                        text: '<i class="fa fa-cog"></i> ' + app.localize('Actions') + ' <span class="caret"></span>',
                        items: [
                            {
                                text: app.localize('View'),
                                action: function (data) {
                                    _viewTituloPagarModal.open({ data: data.record });
                                }
                            },
                            {
                                text: app.localize('Delete'),
                                visible: function () {
                                    return _permissions.delete;
                                },
                                action: function (data) {
                                    deleteTituloPagarPagamento(data.record.tituloPagarPagamento);
                                }
                            }]
                    }
                },
                {
                    targets: 1,
                    data: "tituloPagarPagamento.tipoPagamento",
                    render: function (tipoPagamento) {
                        return app.localize('Enum_tipoPagamento_' + tipoPagamento);
                    }

                },
                {
                    targets: 2,
                    data: "tituloPagarPagamento.valorPrincipal",
                    render: function (valor) {
                        if (valor) {
                            return "R$ " + valor.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+\,)/g, "$1.");
                        }
                        return "R$ 0";
                    }
                },
                {
                    targets: 3,
                    data: "tituloPagarPagamento.acrescimo",
                    render: function (valor) {
                        if (valor) {
                            return "R$ " + valor.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+\,)/g, "$1.");
                        }
                        return "R$ 0";
                    }
                },
                {
                    targets: 4,
                    data: "tituloPagarPagamento.desconto",
                    render: function (valor) {
                        if (valor) {
                            return "R$ " + valor.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+\,)/g, "$1.");
                        }
                        return "R$ 0";
                    }
                },
                {
                    targets: 5,
                    data: "tituloPagarPagamento.dataPagamento",
                    render: function (dataPagamento) {
                        if (dataPagamento) {
                            return moment(dataPagamento).format('L');
                        }
                        return "";
                    }

                },
                {
                    targets: 6,
                    data: "contaObservacao"
                },
                {
                    targets: 7,
                    data: "indiceDescricao"
                }
            ]
        });


        function getTitulosPagarPagamentos() {
            dataTable.ajax.reload();
        }

        function deleteTituloPagarPagamento(tituloPagarPagamento) {
            abp.message.confirm(
                '',
                function (isConfirmed) {
                    if (isConfirmed) {
                        _titulosPagarPagamentosService.delete({
                            id: tituloPagarPagamento.id
                        }).done(function () {
                            getTitulosPagarPagamentos(true);
                            abp.notify.success(app.localize('SuccessfullyDeleted'));
                        });
                    }
                }
            );
        }

        $('#ShowAdvancedFiltersSpan').click(function () {
            $('#ShowAdvancedFiltersSpan').hide();
            $('#HideAdvancedFiltersSpan').show();
            $('#AdvacedAuditFiltersArea').slideDown();
        });

        $('#HideAdvancedFiltersSpan').click(function () {
            $('#HideAdvancedFiltersSpan').hide();
            $('#ShowAdvancedFiltersSpan').show();
            $('#AdvacedAuditFiltersArea').slideUp();
        });

        $('#CreateNewTituloPagarPagamentoButton').click(function () {
            _createOrEditModal.open({ TituloId: $('#tituloId').val() });
        });

        $('#ExportToExcelButton').click(function () {
            _titulosPagarPagamentosService
                .getTitulosPagarPagamentosToExcel({
                    filter: $('#TitulosPagarPagamentosTableFilter').val(),
                    tipoPagamentoFilter: $('#TipoPagamentoFilterId').val(),
                    minValorPrincipalFilter: $('#MinValorPrincipalFilterId').val(),
                    maxValorPrincipalFilter: $('#MaxValorPrincipalFilterId').val(),
                    minAcrescimoFilter: $('#MinAcrescimoFilterId').val(),
                    maxAcrescimoFilter: $('#MaxAcrescimoFilterId').val(),
                    minDescontoFilter: $('#MinDescontoFilterId').val(),
                    maxDescontoFilter: $('#MaxDescontoFilterId').val(),
                    minDataPagamentoFilter: getDateFilter($('#MinDataPagamentoFilterId')),
                    maxDataPagamentoFilter: getDateFilter($('#MaxDataPagamentoFilterId')),
                    contaObservacaoFilter: $('#ContaObservacaoFilterId').val(),
                    indiceDescricaoFilter: $('#IndiceDescricaoFilterId').val(),
                    tituloPagarTituloFilter: $('#TituloPagarTituloFilterId').val()
                })
                .done(function (result) {
                    app.downloadTempFile(result);
                });
        });

        abp.event.on('app.createOrEditTituloPagarPagamentoModalSaved', function () {
            getTitulosPagarPagamentos();
        });

        $('#GetTitulosPagarPagamentosButton').click(function (e) {
            e.preventDefault();
            getTitulosPagarPagamentos();
        });

        $(document).keypress(function (e) {
            if (e.which === 13) {
                getTitulosPagarPagamentos();
            }
        });

    });
})();
Question

Hello,

I Createad a index.cshtml page as partialview, and it have been working fine. since last week, when I open this table, the column Action Magically disapear.

Whats change?

Question

Hi Guys,

Does anyone has a example to how export to PDF using Apb or Asp zero ? since rotativa dosen't work in Azure?

Tks. :D

Question

Hi,

When I use a not null date property in Rad Tool, that create a "01/01/0001" , and its too hard to users select the current date for example.

If I select nullable , thats work just fine.

I'm using a Portuguese (Brasil) language, how can i correct that and bring current date for standard?

Thanks.

Hi,

I Need use an Id to Filter my datatable, I set it correct into the cshtml page. But when I get this value in appService.cs it is 0 and i don't know why.

Can you help me in this issue?

Hello,

I Created a Entity With navigation Propertys, The CRUD Works.

But in my page when a click in "Pick" > select a item > return to Modal Crud the mouse Scroll function stops working.

Can you help me?

Question

Hi,

I am developing a Portuguese/english app, and i'd like to insert a tag in Project-pt-BR.xml when I create a Entity. How can i do that?

Thanks.

Showing 1 to 10 of 10 entries