Base solution for your next web application

Activities of "HCCNOV"

Version 8.1 Core MVC/JQuery

Is there an example for extending the TenantDashboardAppService so that I can call a Service within Asp.Net Zero (that i created) to generate/return data for the widget? All examples I have found rely solely on GetMemberActivityOutput or DashboardRandomDataGenerator.

I went ahead and crearted a constructor for TenantDashboardAppService and injected my service. This works but want to make sure this is the correct pattern.

Is there an example of how to provision the Audited Entity model for another db that is not the main asp.net Zero db? I've followed the instructions which show how to set up the tracked entities in the "Default" db within the {YourProjectName}EntityFrameworkCoreModule.cs

I've set the class up properly using [Audited] and FullAuditedEntity.

This of course will not track audit class because this class belongs to the 2nd dbContext (not ABP/Asp.Net Zero)

Do I need to create the "{YourProjectName}EntityFrameworkCoreModule.cs" type file for the other DB and if so, how?

Thank you

Here is my {YourProjectName}EntityFrameworkCoreModule.cs

 public override void PreInitialize()
        {
            if (!SkipDbContextRegistration)
            {
                //SAR
                Configuration.ReplaceService<IConnectionStringResolver, MyConnectionStringResolver>();

                Configuration.Modules.AbpEfCore().AddDbContext<NOVZERODbContext>(options =>
                {
                    if (options.ExistingConnection != null)
                    {
                        NOVZERODbContextConfigurer.Configure(options.DbContextOptions, options.ExistingConnection);
                    }
                    else
                    {
                        NOVZERODbContextConfigurer.Configure(options.DbContextOptions, options.ConnectionString);
                    }
                });

                // Configure second DbContext
                Configuration.Modules.AbpEfCore().AddDbContext<Data70DbContext>(options =>
                {
                    if (options.ExistingConnection != null)
                    {
                        Data70DbContextConfigurer.Configure(options.DbContextOptions, options.ExistingConnection);
                    }
                    else
                    {
                        Data70DbContextConfigurer.Configure(options.DbContextOptions, options.ConnectionString);
                    }
                });
            }

            // Set this setting to true for enabling entity history.
            Configuration.EntityHistory.IsEnabled = true;

            // Uncomment below line to write change logs for the entities below:
             Configuration.EntityHistory.Selectors.Add("NOVZEROEntities", EntityHistoryHelper.TrackedTypes);
             Configuration.CustomConfigProviders.Add(new EntityHistoryConfigProvider(Configuration));
        }

Here are my TrackedTypes (CustomersAndAcccount.Property is in the 2nd dbContext)

  public static readonly Type[] HostSideTrackedTypes =
        {
            typeof(OrganizationUnit),
            typeof(Role),
            typeof(Tenant)
        };

        public static readonly Type[] TenantSideTrackedTypes =
        {
            typeof(CustomersAndAccounts.Property),
            typeof(OrganizationUnit),
            typeof(Role)
        };

        public static readonly Type[] TrackedTypes =
            HostSideTrackedTypes
                .Concat(TenantSideTrackedTypes)
                .GroupBy(type => type.FullName)
                .Select(types => types.First())
                .ToArray();

And the Model I wish to track:

namespace NOVZERO.CustomersAndAccounts
{
    [Table("tblPropertyInformation")]
    [Audited]
    public class Property : Entity
    {

        [Key]
        public override int Id { get; set; }

I was also wondering, for the Change Tracking, does the class need to have "FullAuditedEntity" or "AuditedEntity" on it or will the [Audited] Property do the job?

I have a DataTables.Net results table (Table A) on a screen. There is a button on each row that launches a modal containing a DataTables.Net results table (Table B). The button on Table A runs JQuery in the JS file on that page which launches the modal. When I first come to the page containing Table A I can click and launch the modal containing Table B and the table populates and functions perfectly. When I close out of the modal and click on another button on Table A the modal containing Table B does launch, runs the Controller method to populate the Modal ViewModel and returns the PatialView, but Table B is not populating and doesn't ever call the AppService (specified in the listAction of the DataTable.Net table).

My attempt to troubleshoot this led me to placing a button on the Modal screen above Table B which calls the Ajax reload...which in turn dismisses the Modal and reloads the underlying page containing Table A. That "button" on the Modal DOES work on the first load above (it refreshes Table B perfectly) so I know it works.

Everything breaks down when I try to launch that Modal a second time.

Any suggestions?

In past versions of .Net Framework ASP.Net Zero implementations we have used Reporting Services to populate an RDL and push out to browser as PDF. We are implementing the .Net Core version of ASP.Net Zero and cannot find the proper method for implementing this feature to move our code forward.

Since MS is not moving Reporting into .Net Core I am left to assume their recent acquisition from Forerunner Software will be their path forward. That technology will likely take another year or so to mature.

My intuition is leading me to build a separate "service" that can run on the server and respond to requests to bind data to RDLs. This service could be told to emit a PDF back into our file system or document management system and create an abp "alert" for the original user that requested the report. They in turn would go into the "Document Management" portion of the Asp.Net Zero app and download it. In addition to that we could use the same tool to "bulk" process hundreds of RDLs (Invoices) offline and parallelize the app for performance leaving the Asp.Net Zero app free to service the users and UI.

Has anyone else tackled this ?

Using ASP.NET CORE MVC & jQuery and V 8.1.0

I'm creating a Modal that will allow the user to delete/add rows to a collection (List<classnamedto>) When the user clicks either delete or add I would like the JQuery to apply these changes to the Entity/database but keep the user within the Modal popup and refresh the data inside the modal (the table) to reflect those deletes/adds.

Building a site that contains a complex "Add" and "Edit" screen not suitable for a Modal. Is there an example somewhere in the framework of performing page(form) validation on a non-modal form ?

Using Asp.Net Zero Core MVC & JQUERY v8.1.0

When an AppService is called to return data my Datatables.Net table shows the "Loading..." text but there is no shade. I would expect this to be in front of everything and with perhaps a dark translucent "shade" to cover the screen elements behind it, much like JTables did.

This was like this "out of the box".

What is the fix for this?

I am displaying a clickable icon in a rowAction as seen below. I'd like for this "button" / icon to be hidden depending on a data property. I have been unable to put a conditional statement (If/else) in the rowAction (like i do in the render method). I have also tried binding a new "attr" for visibility to a data property without luck. Furthermore I have tried to simply use the column "Visible" property but when I attempt to set it to "false" conditionally the cell is merged with the next cell and nothing is hidden.

 {
                    targets: 1,
                    data: null,
                    orderable: false,
                    autoWidth: false,
                    defaultContent: '',
                    rowAction: {
                        element: $("<div/>")
                            .addClass("text-center")
                            .append($("<button/>")
                                .addClass("btn")
                                .attr("title", app.localize("Create"))
                                .append($("<i/>").addClass("la la-edit"))
                            ).click(function () {
                                showCreateInvoice($(this).data());
                            })
                    }
                },

I have posted this on StackOverflow as well: https://stackoverflow.com/questions/60309087/setting-visibility-on-a-asp-net-zero-rowaction

Using ASP.NET CORE MVC & jQuery and V 8.1.0

This product came with Datatables.Net installed.

I'm trying to simply launch a modal from button.click event in a cell on a row. I don't need the "rowAction" as I don't want a pop-up button. (unless there is a sample out there that uses rowAction and only contains one option/icon, I cannot find one and "rowAction" is not a Datatables.net API) My button has only one feature (Edit) so i have an Edit Icon that should pop open the modal. When I attempt this in a Render the Click Event doesn't fire.

Any help is appreciated.

This is my "render" cell code:

              render: function (status) {
                    var $span = $('<span/>');
                    if (status == null) {
                        $span.append(
                            $("<span/>")
                                .addClass("text-center")
                                .append($("<button/>")
                                    .addClass("btn")
                                    .attr("title", app.localize("Upudate Status"))
                                    .append($("<i/>").addClass("la la-edit"))
                                ).click(function (data) {
                                    showUpdateModal(data);
                                })
                        );
                    }
                    return $span[0].outerHTML;
                }

Would like to 'auto-navigate' to a detail page if only one result from the AppService is returned per Filter criteria. (no sense in user having to click the only result in the Datatables.net grid) For example, I have a page with a DataTables.Net result grid and some Filters. I type something in one of the filters such that only one result shows up in the DataTables.Net result grid. The user should not have to then click that result to navigate to the details page (not using Modal here). Instead, I would prefer that the user was sent directly to the detail page for that result. Would this be accomplished somehow by inspecting the result that is returned to the js file using JQuery? How is that done?

Showing 1 to 10 of 11 entries