| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- using Quadarax.Foundation.Core.Exceptions;
- namespace Quadarax.Application.QLiberace.Common
- {
- public class ExceptionLibrary : ExceptionCodes
- {
- protected override void OnSetupCodes()
- {
- AddCode(ExceptionsCodes.ValidationErrorsCode, ExceptionsCodes.ValidationErrorsMsg);
- AddCode(ExceptionsCodes.SettingsNotFoundCode, ExceptionsCodes.SettingsNotFoundMsg);
- AddCode(ExceptionsCodes.SettingsNotFoundForModuleCode, ExceptionsCodes.SettingsNotFoundForModuleMsg);
- AddCode(ExceptionsCodes.SettingsHasNoPropertyCode, ExceptionsCodes.SettingsHasNoPropertyMsg);
- AddCode(ExceptionsCodes.SettingsAlreadyExistsCode, ExceptionsCodes.SettingsAlreadyExistsMsg);
- AddCode(ExceptionsCodes.TenantNotFoundCode, ExceptionsCodes.TenantNotFoundMsg);
- AddCode(ExceptionsCodes.TenantAlreadyExistsCode, ExceptionsCodes.TenantAlreadyExistsMsg);
- AddCode(ExceptionsCodes.TenantLockedCode, ExceptionsCodes.TenantLockedMsg);
- AddCode(ExceptionsCodes.TenantDifferentContextCode, ExceptionsCodes.TenantDifferentContextMsg);
- AddCode(ExceptionsCodes.UserNotFoundCode, ExceptionsCodes.UserNotFoundMsg);
- AddCode(ExceptionsCodes.UserAlreadyExistsCode, ExceptionsCodes.UserAlreadyExistsMsg);
- AddCode(ExceptionsCodes.CustomerNotFoundCode, ExceptionsCodes.CustomerNotFoundMsg);
- AddCode(ExceptionsCodes.CustomerUserAlreadyAssignedCode, ExceptionsCodes.CustomerUserAlreadyAssignedMsg);
- AddCode(ExceptionsCodes.CustomerUserNotFoundAssignedCode, ExceptionsCodes.CustomerUserNotFoundAssignedMsg);
- AddCode(ExceptionsCodes.CustomerMissingContactCode, ExceptionsCodes.CustomerMissingContactMsg);
- AddCode(ExceptionsCodes.CustomerMissingAddressCode, ExceptionsCodes.CustomerMissingAddressMsg);
- AddCode(ExceptionsCodes.CustomerMissingEmailCode, ExceptionsCodes.CustomerMissingEmailMsg);
- AddCode(ExceptionsCodes.CustomerMissingPhoneCode, ExceptionsCodes.CustomerMissingPhoneMsg);
- AddCode(ExceptionsCodes.ContactNotFoundCode, ExceptionsCodes.ContactNotFoundMsg);
- }
- public static class ExceptionsCodes
- {
- public const string ValidationErrorsMsg = "Validation errors follows:";
- public const int ValidationErrorsCode = 1000;
- public const string SettingsNotFoundMsg = "Setting '{0}' not found fo module '{1}'";
- public const int SettingsNotFoundCode = 10000;
- public const string SettingsNotFoundForModuleMsg = "Any setting not found for module '{0}'";
- public const int SettingsNotFoundForModuleCode = 10001;
- public const string SettingsHasNoPropertyMsg = "Setting '{0}' has no defined property in class '{1}'";
- public const int SettingsHasNoPropertyCode = 10002;
- public const string SettingsAlreadyExistsMsg = "Setting '{0}' for module '{1}' already exists.";
- public const int SettingsAlreadyExistsCode = 10003;
- public const string TenantNotFoundMsg = "Tenant with identifier {0}='{1}' not found";
- public const int TenantNotFoundCode = 10010;
- public const string TenantAlreadyExistsMsg = "Tenant with code '{0}' already exists";
- public const int TenantAlreadyExistsCode = 10011;
- public const string TenantLockedMsg = "Tenant with code '{0}' is LOCKED! Cannot access.";
- public const int TenantLockedCode = 10012;
- public const string TenantDifferentContextMsg = "Cannot update different Tenant with code '{0}' in tenant context '{1}'";
- public const int TenantDifferentContextCode = 10013;
- public const string UserNotFoundMsg = "User with identifier {0}='{1}' not found";
- public const int UserNotFoundCode = 10020;
- public const string UserAlreadyExistsMsg = "User with login name '{0}' already exists";
- public const int UserAlreadyExistsCode = 10021;
- public const string CustomerNotFoundMsg = "Customer with identifier {0}='{1}' not found";
- public const int CustomerNotFoundCode = 10030;
- public const string CustomerUserAlreadyAssignedMsg = "Customer with identifier {0}='{1}' has already user '{2}' assigned.";
- public const int CustomerUserAlreadyAssignedCode = 10031;
- public const string CustomerUserNotFoundAssignedMsg = "Customer with identifier {0}='{1}' has no user '{2}' assigned.";
- public const int CustomerUserNotFoundAssignedCode = 10032;
- public const string CustomerMissingContactMsg = "Customer with identifier {0}='{1}' has no any contact.";
- public const int CustomerMissingContactCode = 10033;
- public const string CustomerMissingAddressMsg = "Customer with identifier {0}='{1}' has no one preffered Address.";
- public const int CustomerMissingAddressCode = 10034;
- public const string CustomerMissingPhoneMsg = "Customer with identifier {0}='{1}' has no one preffered Phone.";
- public const int CustomerMissingPhoneCode = 10035;
- public const string CustomerMissingEmailMsg = "Customer with identifier {0}='{1}' has no one preffered Email.";
- public const int CustomerMissingEmailCode = 10036;
- public const string ContactNotFoundMsg = "Contact with identifier {0}='{1}' not found";
- public const int ContactNotFoundCode = 10040;
-
- }
- }
- }
|