Base solution for your next web application

Activities of "williepieterse"

Thankyou I ended up implementing my own version of IEntityHistoryHelper and extending the EntityChange with a EmployeeId. Then in the CreateEntityChange added the following check:

Guid? employeeid = null;

IMustHaveEmployee testMustHaveEmployee = entityEntry.Entity as IMustHaveEmployee; if (testMustHaveEmployee != null) { employeeid = testMustHaveEmployee.EmployeeId; }

return new myEntityChange { ChangeType = entityChangeType, EntityEntry = entityEntry, EntityId = entityId, EntityTypeFullName = fullName, TenantId = base.AbpSession.TenantId, EmployeeId = employeeid

}

Perfect, sorry I missed the EntityHistory looking too deep into AuditingStore.

Hi, I think you misunderstood my question.

I understand that I might need to change from extending the entity to using IExtendableObject interface.

Where can I set the EmployeeId during Entity Change auditing process to also store the EmployeeId if the following is true:

var employeeRelatedEntity = thisAuditedEntity as IMustHaveEmployee; if (employeeRelatedEntity != null) { entityChangeSet.EmployeeId = employeeRelatedEntity.EmployeeId; }

and the interface:

public interface IMustHaveEmployee {
public Guid EmployeeId { get; set; } [ForeignKey("EmployeeId")] public Employee EmployeeFk { get; set; } }

Answer

How would you add an additional cost for the feature over and above the cost the Edition on the subcription page?

Thanks, I manged to implement this successfully, I had to add a new function to manage-dynamic-entity-property-values-modal-min.js

function savefor(entityId) {...

This allowed me to pass the EntityId for a newly Created entity. And also does not set the Busy and Succes Message otherwize it would dispay twice.

this.save = function () {
            if (!_$employeeInformationForm.valid()) {
                return;
            }
            var employee = _$employeeInformationForm.serializeFormToObject();
            _modalManager.setBusy(true);
            _employeesService.createOrEdit(
                employee
            ).done(function (Id) {
                //Save DynamicEntityPropertyValue after receiving ID from createOrEdit
                _manageDynamicEntityPropertyValueBase.savefor(Id);

                abp.notify.info(app.localize('SavedSuccessfully'));
                _modalManager.close();
                abp.event.trigger('app.createOrEditEmployeeModalSaved');
            }).always(function () {
                _modalManager.setBusy(false);
            });
        };
Showing 1 to 5 of 5 entries