Base solution for your next web application

Activities of "hamberg"

Hello maliming,

I did check that and that is how I figured out that it is failing. The dynamically generated abp.services.app creates “jJComputerSystem”. I then went in and created an entity of all lower case prefix of jjComputerSystem and it dynamically generated abp.services.app creates “jjComputerSystem” which is correct and works. I then tried other two digit prefixes and they had the same problem if I made both of them CAPS like JJ{entity} or MM{entity}. It is dynamically creating them wrong so I was trying to find the file that creates the list of abp.services.app.{service} but I could not find that. I am just trying to add a prefix the way your tables are setup with a App prefix I was making “JJ” prefix so it is easy to find in the db.

I am new to AspNet Zero and this is my first project using it so I apologize if I am calling things by the wrong name. I have always put things in MVVM pattern using controllers with everything coded and not dynamically created. I like your way better than the way I used to do it!

Howie

Hi Javier,

Go to {your project name} \AspNetZeroRadTool\FileTemplates\Server\ExportAppServiceClass\ and copy the file MainTemplate.txt to the filename MainTemplate.custom.txt. Now open that file and make it refelect this:

using System.Collections.Generic; using Abp.Runtime.Session; using Abp.Timing.Timezone; using {{Namespace_Here}}.DataExporting.Excel.NPOI; using {{Namespace_Here}}.{{Namespace_Relative_Full_Here}}.Dtos; using {{Namespace_Here}}.Dto; using {{Namespace_Here}}.Storage;

namespace {{Namespace_Here}}.{{Namespace_Relative_Full_Here}}.Exporting { public class {{Entity_Name_Plural_Here}}ExcelExporter : NpoiExcelExporterBase, I{{Entity_Name_Plural_Here}}ExcelExporter {

    private readonly ITimeZoneConverter _timeZoneConverter;
    private readonly IAbpSession _abpSession;

    public {{Entity_Name_Plural_Here}}ExcelExporter(
        ITimeZoneConverter timeZoneConverter,
        IAbpSession abpSession,
		ITempFileCacheManager tempFileCacheManager) :  
base(tempFileCacheManager)
    {
        _timeZoneConverter = timeZoneConverter;
        _abpSession = abpSession;
    }

    public FileDto ExportToFile(List<Get{{Entity_Name_Here}}ForViewDto> {{entity_Name_Plural_Here}})
    {
        return CreateExcelPackage(
            "{{Entity_Name_Plural_Here}}.xlsx",
            excelPackage =>
            {
                var sheet = excelPackage.CreateSheet(L("{{Entity_Name_Plural_Here}}"));

                AddHeader(
                    sheet{{Property_Header_Here}}{{NP_Header_Here}}
                    );

                AddObjects(
                    sheet, 2, {{entity_Name_Plural_Here}}{{Property_Params_Here}}{{NP_Params_Here}}
                    );

				{{Property_DateTime_Formatter_Here}}

            });
    }
}

}

Save the file and to {your project name} \AspNetZeroRadTool\FileTemplates\Server\ExportAppServiceClass\MainTemplate.custom.txt and go back and regenerate your files and they will work.

For completeness I changed:

using {{Namespace_Here}}.DataExporting.Excel.EpPlus; Change to using {{Namespace_Here}}.DataExporting.Excel.NPOI;

var sheet = excelPackage.Workbook.Worksheets.Add(L("{{Entity_Name_Plural_Here}}")); changed to var sheet = excelPackage.CreateSheet(L("{{Entity_Name_Plural_Here}}"));

Then remove line sheet.OutLineApplyStyle = true;

The code above is the compled version.

Howie

Hello,

Project: MVC JQuery
Power Tool: 2.2.0.4

I found that if I generate an entity with a prefix like JJComputerSystem the power tools creates an Index.min.js that has

var _jjComputerSystemService = abp.services.app.jjComputerSystem;

This then fails because abp.services.app.jjComputerSystem is then undefined

I then debug to find that that generated service proxie is abp.services.app.jJComputerSystem. I make that change to the file and now it works. The issues is that is a generated service proxie and I can't find anywhere that has "jJComputerSystem" Everthing in code for the application and controller either has JJComputerSystem or jjComputerSystem. Where in my project can I find where abp.services.app.jJComputerSystem gets that name from?

Thanks

Hello @maliming,

I did see those, I was wondering if On the Roadmap it shows "User Sync/Link feature", will this be a Xamarin offline sync feature?. I don't know when that was put on the roadmap so I would just wait for that feature, however if the "User Sync/Link feature" is not a Xamarin local user sync but something else then I would just go down the path of the those other questions.

Thanks

Question

Hello,

On the Roadmap it shows "User Sync/Link feature", will this be a Xamarin offline sync feature? I am looking at the best way to sync user data to the Xamarin app that is part of the framework / methodology. Does anyone have an example that they have done in the past with asp.net zero or boilerplate to accomplish this?

Thanks, Howie

Thanks, It all works.

Hello,

How do I setup (or where do I) so each tenant has a url of tenant1.domain.com and so that each tenant gets a different sql database? Do you have an example I can go through?  I am trying to setup 1 host with multiple tenant databases.

Thank you

Showing 1 to 7 of 7 entries