public void ProcessRequestedUpdateFunction (ResultOfUpdateFunction ResFunction) { CommonSearchClass HandledEntry = null; switch (RequestedUpdateFunction) { case RequiredUpdateFunction.InsertNew: DataModell.UpdateWorkDataSet(RequiredUpdateFunction.InsertNew, ref HandledEntry); break; case RequiredUpdateFunction.Modify: DataModell.UpdateWorkDataSet(RequiredUpdateFunction.Modify, ref HandledEntry); break; case RequiredUpdateFunction.Delete: DataModell.UpdateWorkDataSet(RequiredUpdateFunction.Delete, ref HandledEntry); if ((LastDataChangeActionResultCall != null) && (ActiveInformationenID != null)) { LastDataChangeActionResultCall((Guid) ActiveInformationenID, RequestedUpdateFunction, ResFunction); } DataModell.CommonSearchClassCacheInstance.TransferSelectedCommonSearchClassEntriesToUI (); return; break; case RequiredUpdateFunction.Cancel: break; } if ((ActiveInformationenID != null) && ((DataModell.ActiveInformationen == null) || (DataModell.ActiveInformationen.ID != (Guid)ActiveInformationenID))) DataModell.CreateActiveInformationenEnvironment(ActiveInformationenID); if (ActiveInformationenID == null) ActiveInformationenID = UpdateDataModellInstance.ActiveInformationen.ID; if ((LastDataChangeActionResultCall != null) && (ActiveInformationenID != null)) switch (RequestedUpdateFunction) { case RequiredUpdateFunction.InsertNew: case RequiredUpdateFunction.Modify: case RequiredUpdateFunction.Cancel: if (DataModell.ActiveInformationen == null) { LastDataChangeActionResultCall ((Guid) ActiveInformationenID, RequestedUpdateFunction, ResFunction); } else { LastDataChangeActionResultCall(DataModell.ActiveInformationen.ID, RequestedUpdateFunction, ResFunction); } break; case RequiredUpdateFunction.Delete: LastDataChangeActionResultCall((Guid)ActiveInformationenID, RequestedUpdateFunction, ResFunction); break; } DataModell.CommonSearchClassCacheInstance.TransferSelectedCommonSearchClassEntriesToUI (); }
public void ProcessTheResultOfLastDataChangeActionResultCall(Guid InfoIDProcessed, RequiredUpdateFunction RequFunctions, ResultOfUpdateFunction Result) { switch (Result) { case ResultOfUpdateFunction.Correct: { break; } case ResultOfUpdateFunction.Cancel: { MessageBox.Show ("Der Vorgang wurde abgebrochen\r\nnichts wurde gespeichert"); return; break; } case ResultOfUpdateFunction.Errornous: { MessageBox.Show ("Beim geforderten Vorgang entstand ein Fehler"); return; break; } } DataModell.ActiveInformationen = null; ActiveInformationen = DataModell.ActiveInformationen; ActiveInformationenID = Guid.Empty; }
private void ResultFromDataChange_OnLastDataChangeActionResultCall(Guid InfoIDProcessed, RequiredUpdateFunction RequFunctions, ResultOfUpdateFunction Result) { if (RequFunctions != RequiredUpdateFunction.Delete) if ((DataModell.ActiveInformationen != null) && (InfoIDProcessed != DataModell.ActiveInformationen.ID)) throw new Exception("InfoIDProcessed != UpdateDataModellInstance.InformationenID"); AltErlaaInfoWorkListControlInstance.ProcessTheResultOfLastDataChangeActionResultCall (InfoIDProcessed, RequFunctions, Result); }