Codice autorichiamante



protected onSaveSuccess(response: Serenity.SaveResponse): void {

    // check that this is an insert
    if (this.isNew()) {
        Q.notifySuccess("Just inserted a category with ID: " + response.EntityId);
        this.loadById(response.EntityId);
        // you could also open a new dialog
        // new Northwind.CategoryDialog().loadByIdAndOpenDialog(response.EntityId);

        // but let's better load inserted record using Retrieve service
        //Default.TveRiepilogoFattureAgentiService.Retrieve(<any>{
        //    EntityId: response.EntityId
        //}, resp => {
        //    Q.notifyInfo("Creato con successo " + resp.Entity.CategoryName);
        //});
    }
}