/// cascading count private static int CountByPrimaryKey(Int64 AConferenceKey, TDBTransaction ATransaction, bool AWithCascCount, out TVerificationResultCollection AVerificationResults, int ANestingDepth = 0, TResultSeverity AResultSeverity = TResultSeverity.Resv_Critical) { int ReturnValue; List <TRowReferenceInfo> References; Dictionary <string, object> PKInfo = null; ReturnValue = CountByPrimaryKey(AConferenceKey, ATransaction, AWithCascCount, out References, ANestingDepth); if (ReturnValue > 0) { PKInfo = new Dictionary <string, object>(1); PKInfo.Add("Partner Key", AConferenceKey); AVerificationResults = TTypedDataAccess.BuildVerificationResultCollectionFromRefTables("PcConference", "Conference", PKInfo, References, AResultSeverity); } else { AVerificationResults = null; } return(ReturnValue); }
/// <summary> /// checks if row has status "Added" or if field value is modified compared to original value /// </summary> /// <param name="ARow"></param> /// <param name="AFieldDbName">db name of field to be checked</param> /// <returns></returns> public static bool IsRowAddedOrFieldModified(DataRow ARow, string AFieldDbName) { if (ARow.RowState == DataRowState.Added) { return(true); } if ((ARow.RowState == DataRowState.Modified) && ARow.HasVersion(DataRowVersion.Original) && ((TTypedDataAccess.GetSafeValue(ARow, AFieldDbName, DataRowVersion.Original)).ToString() != (TTypedDataAccess.GetSafeValue(ARow, AFieldDbName, DataRowVersion.Current)).ToString())) { return(true); } return(false); }
/// <summary> /// Initializes a new instance of this Exception Class with a specified error message, a reference to the inner <see cref="Exception" /> that is the cause of this <see cref="Exception" /> and the Submit Operation. /// </summary> /// <param name="AMessage">The error message that explains the reason for the <see cref="Exception" />.</param> /// <param name="AInnerException">The <see cref="Exception" /> that is the cause of the current <see cref="Exception" />, or a null reference if no inner <see cref="Exception" /> is specified.</param> /// <param name="ASubmitOperation">The Submit Operation that was attempted to be executed.</param> public EDBSubmitException(string AMessage, Exception AInnerException, TTypedDataAccess.eSubmitChangesOperations ASubmitOperation) : base(AMessage, AInnerException) { FSubmitOperation = ASubmitOperation; }