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

Activities of "Bernard"

Question

Hi,

I would like to call an entity based on the Id value of another. For example: to create a quote, I need a Person entity of type Company "Amazon", once this company is selected I would like to be able to access a loopup control which will look for a Person entity of type Physical "Jeff Bezos" , the link is made via a ParentId The second combo (child) should be available only after selecting the first (parent). I hope to have been clear

Thank you so much

` [AbpAuthorize(AppPermissions.Pages_Conventions)] public async Task<PagedResultDto

   var totalCount = await query.CountAsync();

   var personList = await query
       .PageBy(input)
       .ToListAsync();

   var lookupTableDtoList = new List<ConventionPersonLookupTableDto>();
   foreach (var person in personList)
   {
       lookupTableDtoList.Add(new ConventionPersonLookupTableDto
       {
           Id = person.Id,
           DisplayName = string.Format("{0} {1} {2}", person.Intitule, person.CodePostal, person.Ville)
       });
   }

   return new PagedResultDto<ConventionPersonLookupTableDto>(
       totalCount,
       lookupTableDtoList
   );

} `

Question

Hi,

I wanted to know if the method below was correct and corresponded to the right way to do things given the framework : I have to update an entity named "Conventions" after adding a row of the "LigneConvention" entity in order to make the total on a field called TotalHT and update it in the Convention table

Here is the code :

` public virtual async Task CreateOrEdit(CreateOrEditLigneConventionDto input) {

 if (input.Id == null)
 {
     input.Intitule = input.FormationDisplayProperty;
     await Create(input);

     //Update Convention values
     var totalHTLg = _ligneConventionRepository.GetAll().Where(x => x.ConventionId == input.ConventionId).Sum(x => x.TotalHT);
     var conventionToUpdate = await _lookup_conventionRepository.FirstOrDefaultAsync((int)input.ConventionId);
     conventionToUpdate.TotalHT = totalHTLg + input.TotalHT;

     await _lookup_conventionRepository.UpdateAsync(conventionToUpdate);

 }
 else
 {
     await Update(input);
     
     //Update Convention values
     var ligneconvention = await _ligneConventionRepository.GetAllListAsync();
     var totalHTlg=ligneconvention.Where(x => x.ConventionId == input.ConventionId).Sum(x => x.TotalHT);
     var conventionToUpdate = await _lookup_conventionRepository.FirstOrDefaultAsync((int)input.ConventionId);
     conventionToUpdate.TotalHT = totalHTlg;

     await _lookup_conventionRepository.UpdateAsync(conventionToUpdate);
 }

}`

No Should I ? Besides I noticed that the version is old how to do / should we update it

Additional infos

Hi,

I've got this message. What does it mean please ?

Answer

Hi @Ismael

Great, thks !

Question

Hi,

Upon publication a webconfig file is created but overwrites the old one in which I added parameters how to avoid this file being overwritten because there are none in the project

`

  <handlers>
    <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
  </handlers>
  <aspNetCore processPath="dotnet" arguments=".\ERUDY.Web.Mvc.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
`

Hi @Bernard,

I found the source of the problem, thank you for sharing the JSON files with us and reporting this error.

This problem is caused by multiple reasons, so it may take time to resolve. Thank you for your patience.

What is the status of this ticket

Question

Hi I’m wondering how refresh master Datatable when save data from detail modal view The detail Datatable is refreshed but I want display total amount from detail rows in master

Thanks for your help

{ "IsRegenerate": true, "MenuPosition": "main", "RelativeNamespace": "Administratif", "EntityName": "LigneConvention", "EntityNamePlural": "LigneConventions", "TableName": "LigneConventions", "PrimaryKeyType": "int", "BaseClass": "Entity", "EntityHistory": false, "AutoMigration": true, "UpdateDatabase": true, "CreateUserInterface": true, "CreateViewOnly": true, "CreateExcelExport": true, "CreateExcelImport": true, "IsNonModalCRUDPage": false, "IsMasterDetailPage": false, "GenerateOverridableEntity": false, "GenerateUnitTest": false, "GenerateUiTest": false, "PagePermission": { "Host": true, "Tenant": true }, "Properties": [ { "Name": "Intitule", "Type": "string", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "ProduitsBPF", "Type": "ListeProduitsBPF", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": false, "List": false, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "AutresProduitsBPF", "Type": "ListeAutreProduitBPF", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": false, "List": false, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "PrixU", "Type": "decimal", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": true, "MinimumValue": 0.0, "MaximumValue": 500.0 }, "Required": false, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": false, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "Unite", "Type": "TypeUnite", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": false, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "Format", "Type": "TypeFormat", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": false, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "Reference", "Type": "string", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": false, "List": false, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} } ], "NavigationProperties": [ { "Namespace": "ERUDY.Administratif", "ForeignEntityName": "Convention", "ForeignEntityNamePlural": "Conventions", "IdType": "int", "IsNullable": true, "PropertyName": "ConventionId", "DuplicationNumber": 0, "RelationType": "single", "ViewType": "LookupTable", "DisplayPropertyNameInfos": { "MergeFormat": null, "DisplayPropertyNames": [] } } ], "NavigationPropertyOneToManyTables": [], "EnumDefinitions": [ { "Name": "ListeProduitsBPF", "Namespace": "ERUDY.Administratif", "EnumProperties": [ { "Name": "NA", "Value": 1 }, { "Name": "C1", "Value": 10 }, { "Name": "C1a", "Value": 20 }, { "Name": "C1b", "Value": 30 }, { "Name": "C1c", "Value": 40 }, { "Name": "C1d", "Value": 50 }, { "Name": "C1e", "Value": 60 }, { "Name": "C3", "Value": 70 }, { "Name": "C4", "Value": 80 }, { "Name": "C5", "Value": 90 }, { "Name": "C6", "Value": 100 }, { "Name": "C7", "Value": 110 }, { "Name": "C8", "Value": 120 }, { "Name": "C9", "Value": 130 }, { "Name": "C10", "Value": 140 }, { "Name": "C11", "Value": 150 } ] }, { "Name": "ListeAutreProduitBPF", "Namespace": "ERUDY.Administratif", "EnumProperties": [ { "Name": "NA", "Value": 1 }, { "Name": "C12", "Value": 10 }, { "Name": "C13", "Value": 14 } ] }, { "Name": "TypeUnite", "Namespace": "ERUDY.Administratif", "EnumProperties": [ { "Name": "Participant", "Value": 10 }, { "Name": "Groupe", "Value": 20 }, { "Name": "Produit", "Value": 30 } ] }, { "Name": "TypeFormat", "Namespace": "ERUDY.Administratif", "EnumProperties": [ { "Name": "Heure", "Value": 10 }, { "Name": "Jour", "Value": 20 }, { "Name": "Forfait", "Value": 30 }, { "Name": "Piece", "Value": 40 } ] } ], "DbContext": null }

Showing 111 to 120 of 136 entries