1234567891011121314151617181920212223242526272829 |
- using System;
- namespace InABox.Core
- {
- public delegate void DigitalFormUpdateHandler(IDigitalFormDataModel model);
- public delegate void DigitalFormBeforeUpdateHandler(IDigitalFormDataModel model);
- public interface IDigitalFormDataModel
- {
- public Entity Entity { get; set; }
- IDigitalFormInstance Instance { get; set; }
- event DigitalFormUpdateHandler OnModelSaved;
- event DigitalFormBeforeUpdateHandler BeforeModelSaved;
- void Load(Action<IDigitalFormDataModel> callback);
- /// <summary>
- /// Saves the datamodel to the database, including the form instance and parent entity.
- /// </summary>
- /// <param name="callback">The callback to call once the update is finished, or <c>null</c> for synchronous execution.</param>
- void Update(Action<IDigitalFormDataModel>? callback);
- object? GetEntityValue(string name);
- void SetEntityValue(string name, object? value);
- }
- }
|