123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MTWorkHR.Core.Global
- {
- public static class AppExceptions
- {
- public static IDictionary<ExceptionEnum, Dictionary<string, string>> ExceptionMessages = new Dictionary<ExceptionEnum, Dictionary<string, string>>()
- {
- {ExceptionEnum.RecordNotExist, new Dictionary<string, string>
- {
- { "en", "Record Not Existed" },
- { "ar", "السجل غير موجود" }
- }},
- {ExceptionEnum.ModelNotValid, new Dictionary<string, string>
- {
- { "en", "Model is not valid" },
- { "ar", "النموذج غير صالح" }
- }},
- {ExceptionEnum.NotAuthorized, new Dictionary<string, string>
- {
- { "en", "Not Authorized" },
- { "ar", "غير مصرح" }
- }},
- {ExceptionEnum.PropertyNotAccess, new Dictionary<string, string>
- {
- { "en", "A property called {0} can't be accessed for type {1}." },
- { "ar", "الخاصية {0} لا يمكن الوصول إليها لنوع {1}." }
- } },
- {ExceptionEnum.WrongCredentials, new Dictionary<string, string>
- {
- { "en", "Username or password incorrect!" },
- { "ar", "اسم المستخدم أو كلمة المرور غير صحيحة!" }
- }},
- {ExceptionEnum.RecordCannotBeDelete, new Dictionary<string, string>
- {
- { "en", "Cannot delete the user" },
- { "ar", "لا يمكن حذف المستخدم" }
- }},
- {ExceptionEnum.RecordAlreadyExist, new Dictionary<string, string>
- {
- { "en", "Record is already existed!" },
- { "ar", "السجل موجود بالفعل!" }
- } },
- {ExceptionEnum.RecordCreationFailed, new Dictionary<string, string>
- {
- { "en", "Record creation failed! Please check the record details and try again." },
- { "ar", "خطأ اثناء الإضافة برجاء مراجعة البيانات" }
- } },
- {ExceptionEnum.RecordUpdateFailed, new Dictionary<string, string>
- {
- { "en", "Record update failed! Please check the record details and try again."},
- { "ar", "خطأ اثناء التعديل برجاء مراجعة البيانات" }
- } },
- {ExceptionEnum.RecordDeleteFailed, new Dictionary<string, string>
- {
- { "en", "Record delete failed!"},
- { "ar", "خطأ اثناء الحذف" }
- } },
- {ExceptionEnum.RecordNameAlreadyExist, new Dictionary<string, string>
- {
- { "en", "Record name already existed"},
- { "ar", "الاسم موجود مسبقا" }
- } },
- {ExceptionEnum.RecordEmailAlreadyExist, new Dictionary<string, string>
- {
- { "en", "Record email already existed"},
- { "ar", "البريد الإلكتروني موجود مسبقا" }
- } },
- {ExceptionEnum.AttachmentsRequired, new Dictionary<string, string>
- {
- { "en", "Attachment Required"},
- { "ar", "المرفقات مطلوبة" }
- } },
- {ExceptionEnum.CouldNotMoveFiles, new Dictionary<string, string>
- {
- { "en", "Could Not Move Files"},
- { "ar", "لا يمكن نقل الملفات" }
- } },
- {ExceptionEnum.MapperIssue, new Dictionary<string, string>
- {
- { "en", "Mapper Issue"},
- { "ar", "مشكلة فى المطابقة" }
- } },
- {ExceptionEnum.InCorrectFileLength, new Dictionary<string, string>
- {
- { "en", "InCorrect File Length"},
- { "ar", "حجم الملف غير مسموح به" }
- } },
- {ExceptionEnum.WrongOTP, new Dictionary<string, string>
- {
- { "en", "Wrong or expired OTP" },
- { "ar", "كلمة السر المؤقتة غير صحيحة او منتهية الصلاحية" }
- } },
- {ExceptionEnum.EmptyResponse, new Dictionary<string, string>
- {
- { "en", "Empty Response" },
- { "ar", "رد فارغ" }
- } },
- {ExceptionEnum.ErrorSendingSMS, new Dictionary<string, string>
- {
- { "en", "Error Sending SMS"},
- { "ar", "خطأ في ارسال الرسالة النصية" }
- } },
- {ExceptionEnum.InvalidCaptcha, new Dictionary<string, string>
- {
- { "en", "Invalid Captcha" },
- { "ar", "رمز خاطىء" }
- } },
- {ExceptionEnum.AccountLocked, new Dictionary<string, string>
- {
- { "en", "Account Locked"},
- { "ar", "الحساب موقوف" }
- } },
- {ExceptionEnum.InvalidFileType, new Dictionary<string, string>
- {
- { "en", "Invalid File Type" },
- { "ar", "نوع الملف خطأ" }
- } },
- {ExceptionEnum.NoVacationBalance, new Dictionary<string, string>
- {
- { "en", "No Vacation Balance" },
- { "ar", "لا يوجد رصيد أجازات" }
- } },
- {ExceptionEnum.EmailNotExist, new Dictionary<string, string>
- {
- { "en", "Email Not Exist" },
- { "ar", "البريد الالكتروني غير موجود" }
- } },
- {ExceptionEnum.RecordPhoneAlreadyExist, new Dictionary<string, string>
- {
- { "en", "Phone Already Exist" },
- { "ar", "رقم الهاتف موجود مسبقا" }
- } },
- {ExceptionEnum.UserNotExist, new Dictionary<string, string>
- {
- { "en", "User Not Exist" },
- { "ar", "المستخدم غير موجود" }
- } },
- {ExceptionEnum.UserAlreadyCheckedIn, new Dictionary<string, string>
- {
- { "en", "User already checked in"},
- { "ar", "تم تسجيل الحضور اليوم من قبل" }
- } },
- };
- }
- }
|