Base solution for your next web application

Activities of "[email protected]"

Hi @sharadkpatil

I seem to be having a similar issue. I created an entity using Power Tools with a “file” property. Everything appears to work ok until the actual save of the file. The file doesn’t actually save anywhere.

I’m very new to the JS world, so I may be overlooking something. What I am expecting is that when selecting “file” as the data type, once saving the file it would save the file to the database.

Version:12.0.0 Project: MVC Core & jQuery ORM: EF Core DB: MSSQL

Hey Team,

The project template I'm working with is as follows:

  • ANZ 12.0.0
  • Template - MVC Core & jQuery
  • Database - MSSQL
  • ORM - EF Core

Per the attached image I'm trying to add an option to the "Actions" dropdown. This action should take the user to "/Mwx/Controller/Action" where it will pass an "id" parameter. I've tried to add an item to the Index.js file in the datatables section under "rowActions", however, that does not work. I've even tried to remove the "rowActions" itself and the action items still show up. I'm not the best at all with JS or jQuery so I'm quickly learning. Any help would be appreciated. Thank you in advance.

Hey Team,

The project template I'm working with is as follows:

  • ANZ 12.0.0*
  • Template - MVC Core & jQuery*
  • Database - MSSQL*
  • ORM - EF Core

I think I've completely misconstrued the "file" datatype option using Power Tools. I was expecting to be able to upload a file or image and that datatype be of varbinary(max) or something similar. When looking at the entity there is just a virtual property set to a Guid, Int or whatever option I select as the PK. Ultimately, what I'm needing is to figure out a way that I can have 4 images associated with a single animal. So, in other words, the user will select their animal and upload 1 - 4 images which will be stored in the database and associated with that animal. I hope I'm making sense in all this. Again, thank in advance for your help.

@ismcagdas

I tried that inside of the Index.js file. This did not work. I tried removing the entire rowActions to see if the Actions button would be gone and to my surprise it was still there. I double and triple checked the file(s) I was working with as well. Here is a portion of the code that I have with your suggestion implemented. This still is not working.

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) { _viewPigModal.open({ id: data.record.pig.id }); }, }, { text: app.localize('GoToMwxAction'), visible: function () { return true; }, action: function (data) { document.location.href = '/Mwx/Controller/Action?id=' + data.record.id }, }, { text: app.localize('Edit'), visible: function () { return _permissions.edit; }, action: function (data) { _createOrEditModal.open({ id: data.record.pig.id }); }, }, { text: app.localize('History'), iconStyle: 'fas fa-history mr-2', visible: function () { return entityHistoryIsEnabled(); }, action: function (data) { _entityTypeHistoryModal.open({ entityTypeFullName: _entityTypeFullName, entityId: data.record.pig.id, }); }, }, { text: app.localize('Delete'), visible: function () { return _permissions.delete; }, action: function (data) { deletePig(data.record.pig); }, }, ],

Thanks for your response. It seems that either I’m missing something or there’s a bug with Power Tools then. I create an entity property named Photo with the data type of “file” from Power Tools. I then complete the rest of the entity design and click the generate button. All goes well. Now, when I run the application, go to the new entity and chose a file to upload. All that happens is I’m prompted to select my file and then click open. I finish entering in all the rest of the fields and click save. The file is not saved anywhere. I checked the location you specified in your response as well. Now, if I select a new profile image and save it, it works. So I’m wondering if there’s a bug with Power Tools generation?

I will attempt to record for you, however, other than showing it isn’t working not sure of the benefit. I’ve followed instructions 100% to the letter. Am I to understand that you have no problems using Power Tools, creating an entity with a file data type and upload works?

I have ran everything prior to opening the solution in VS. I’m really struggling to understand what’s going on here.

Question

I was hoping someone would be able to offer some assistance with having base classes in AspNetZero. AspNetZero Version: latest Tech Stack: Asp .Net Core w\ MVC & jQuery

I need to have a base class “Animal” which will contain properties that are relevant to ALL species of animals. An example would be that I have a “PIGS” entity which must inherit from “AnimalBase”.

I’m not too sure how to accomplish this in AspNetZero. I would greatly appreciate a “dumbed-down” response. I have a learning disability which doesn’t make things impossible just takes me longer to catch on.

Thanks

I'm using AspNetZero 12.4.0, I've also tried this with the latest release and I get the same results. When I create an entity "GrowthRates" in the GrowthRatesController there are two errors. The first is with var hasFileProp = True;, this should be var hasFileProp = true;. The second is with var projectType = Angular;, this looks like it should be a string or enum and it is not. and therefore must be manually changed.

Hi,

Just to confirm, this happens when you genrate a new entity using Power Tools, is that right ? If so, could you share generated entity json file ?

Thanks,

This is in the controller that is built after creating the entity using Power Tools.

Showing 1 to 10 of 12 entries