void IDataUpdateTrigger.OnPrepareSave(EditDataObject entity, DataOperatorType operatorType)
 {
     if (!GlobalContext.Current.IsSystemMode &&
         GlobalContext.Current.User.UserId != LoginUserInfo.SystemUserId &&
         entity is IOrganizationData organizationData)
     {
         organizationData.OrganizationId = GlobalContext.Current.User.OrganizationId;
     }
 }
 /// <summary>
 ///     保存完成后期处理
 /// </summary>
 /// <param name="entity">保存的对象</param>
 /// <param name="operatorType">操作类型</param>
 internal static void OnDataSaved(EditDataObject entity, DataOperatorType operatorType)
 {
     if (Triggers.ContainsKey(entity.__Struct.EntityType))
     {
         foreach (var trigger in Triggers[entity.__Struct.EntityType])
         {
             trigger.OnDataSaved(entity, operatorType);
         }
     }
     if (Triggers.ContainsKey(0))
     {
         foreach (var trigger in Triggers[0])
         {
             trigger.OnDataSaved(entity, operatorType);
         }
     }
 }
Beispiel #3
0
 void IDataUpdateTrigger.OnPrepareSave(EditDataObject entity, DataOperatorType operatorType)
 {
 }
Beispiel #4
0
 void IDataUpdateTrigger.OnDataSaved(EditDataObject entity, DataOperatorType operatorType)
 {
 }
Beispiel #5
0
 /// <summary>
 /// 构造
 /// </summary>
 /// <param name="data"></param>
 public FormConvert(EditDataObject data)
 {
     Data = data;
 }