init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
61
Framework/Entities/EntityReadOnlyException.cs
Normal file
61
Framework/Entities/EntityReadOnlyException.cs
Normal file
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using Kreta.Framework.Localization;
|
||||
using Kreta.Framework.Logging;
|
||||
|
||||
namespace Kreta.Framework.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Hivatkozás lejárt entitás verziója.
|
||||
/// </summary>
|
||||
[FriendlyName(1000076, "Az adott rekordra nincs írási joga! ({EntityName}: {EntityId})")]
|
||||
[ErrorCode(Events.ENTITY_READONLY)]
|
||||
[Serializable]
|
||||
public sealed class EntityReadOnlyException : EntityException
|
||||
{
|
||||
const string _errorMessage = "Az adott rekordra nincs írási joga! ({EntityName}: {EntityId})";
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="entityName">Az entitás neve</param>
|
||||
/// <param name="entityId">Az entitás adatbázisbeli azonosítója</param>
|
||||
public EntityReadOnlyException(string entityName, int entityId)
|
||||
: base(_errorMessage)
|
||||
{
|
||||
SetValue("EntityName", entityName);
|
||||
SetValue("EntityId", entityId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály alapértelmezett konstruktora.
|
||||
/// </summary>
|
||||
[Obsolete("Ezt a konstruktort ne használd!")]
|
||||
public EntityReadOnlyException() { }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="message">A kivétel üzenete</param>
|
||||
[Obsolete("Ezt a konstruktort ne használd!")]
|
||||
public EntityReadOnlyException(string message)
|
||||
: base(message) { }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="message">A kivétel üzenete</param>
|
||||
/// <param name="innerException">A belső kivétel</param>
|
||||
[Obsolete("Ezt a konstruktort ne használd!")]
|
||||
public EntityReadOnlyException(string message, Exception innerException)
|
||||
: base(message, innerException) { }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="info">Sorosítási adatok</param>
|
||||
/// <param name="context">Sorosítási adatfolyam</param>
|
||||
EntityReadOnlyException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context) { }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue