You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

542 lines
9.9 KiB

2 years ago
  1. using Entity.Sugar;
  2. namespace Entity
  3. {
  4. public class EntityHelper
  5. {
  6. public const string CUSTOMERS = "customers";
  7. public const string CUSTOMERSTRANSFER = "customerstransfer";
  8. public const string CUSTOMERSTRANSFERBAK = "customerstransferbak";
  9. public const string IMPORTCUSTOMERS = "importcustomers";
  10. public const string ATTENDANCE = "attendance";
  11. public const string ATTENDANCEDIFF = "attendancediff";
  12. public const string BILLCHANGEAPPLY = "billchangeapply";
  13. public const string BUSINESSTRAVEL = "businesstravel";
  14. public const string CHECKFLOW = "checkflow";
  15. public const string INVOICEAPPLYINFO = "invoiceapplyinfo";
  16. public const string LEAVE = "leave";
  17. public const string LEAVESET = "leaveset";
  18. public const string OVERTIME = "overtime";
  19. public const string TRAVELEXPENSE = "travelexpense";
  20. public const string WENZHONG = "wenzhong";
  21. public const string BILLINFO = "billinfo";
  22. public const string BILLS = "bills";
  23. public const string BILLSBAK = "billsbak";
  24. public const string EXHIBITION = "exhibition";
  25. public const string EXHIBITIONSTRANSFER = "exhibitionstransfer";
  26. public const string EXHIBITIONSTRANSFERBAK = "exhibitionstransferbak";
  27. public const string EXPORTEXHIBITION = "exportexhibition";
  28. public const string IMPORTEXHIBITION = "importexhibition";
  29. public const string OTHEREXHIBITION = "otherexhibition";
  30. public const string OTHEREXHIBITIONTG = "otherexhibitiontg";
  31. public const string ANNOUNCEMENT = "announcement";
  32. public const string READ = "read";
  33. public const string ARGUMENTCLASS = "argumentclass";
  34. public const string ARGUMENTS = "arguments";
  35. public const string ARGUMENTSRELATED = "argumentsrelated";
  36. public const string AUTHORIZE = "authorize";
  37. public const string AUTHORIZEFORDEPT = "authorizefordept";
  38. public const string AUTHORIZEFORMEMBER = "authorizeformember";
  39. public const string CALENDAR = "calendar";
  40. public const string CLOCKTIPS = "clocktips";
  41. public const string CLOCKTIPSBAK = "clocktipsbak";
  42. public const string DEPARTMENTS = "departments";
  43. public const string DOCUMENT = "document";
  44. public const string EMAIL = "email";
  45. public const string FILES = "files";
  46. public const string FORGETPASSWORD = "forgetpassword";
  47. public const string HOLIDAYS = "holidays";
  48. public const string JOBTITLE = "jobtitle";
  49. public const string LANGUAGE = "language";
  50. public const string LOGINFO = "loginfo";
  51. public const string LOGINLOG = "loginlog";
  52. public const string MAXNUMBER = "maxnumber";
  53. public const string MEMBERS = "members";
  54. public const string MEMBERSTORULE = "memberstorule";
  55. public const string MODULEFORPROGRAM = "moduleforprogram";
  56. public const string MODULELIST = "modulelist";
  57. public const string OFFICETEMPLATE = "officetemplate";
  58. public const string ONLINEUSERS = "onlineusers";
  59. public const string ORGANIZATION = "organization";
  60. public const string OUTERUSERS = "outerusers";
  61. public const string PROFILES = "profiles";
  62. public const string PROGRAMLIST = "programlist";
  63. public const string RULES = "rules";
  64. public const string SYSTEMSETTING = "systemsetting";
  65. public const string TASK = "task";
  66. public const string TASKREPLY = "taskreply";
  67. public const string TICKETAUTH = "ticketauth";
  68. public const string TIPS = "tips";
  69. public const string TIPSBAK = "tipsbak";
  70. public const string EXHIBITIONRULES = "exhibitionrules";
  71. public const string NEWS = "news";
  72. public const string PACKINGORDER = "packingorder";
  73. public const string TRACKINGLOG = "trackinglog";
  74. public const string WEBSITEFILES = "websitefiles";
  75. public const string WEBSITEMAILLOG = "websitemaillog";
  76. public const string WEBSITESETTING = "websitesetting";
  77. public const string OVW_IMPORTCUSTOMERS = "ovw_importcustomers";
  78. public const string OVW_BILLINFO = "ovw_billinfo";
  79. public const string OVW_BILLS = "ovw_bills";
  80. /// <summary>
  81. /// get the entity object
  82. /// </summary>
  83. /// <param name="type"/>type{String}</param>
  84. /// <returns>entity{Object}entity</returns>
  85. public static object GetEntity(string type)
  86. {
  87. var entity = new object();
  88. entity = "";
  89. switch (type.ToLower())
  90. {
  91. case CUSTOMERS:
  92. entity = new OTB_CRM_Customers();
  93. break;
  94. case CUSTOMERSTRANSFER:
  95. entity = new OTB_CRM_CustomersTransfer();
  96. break;
  97. case CUSTOMERSTRANSFERBAK:
  98. entity = new OTB_CRM_CustomersTransferBak();
  99. break;
  100. case IMPORTCUSTOMERS:
  101. entity = new OTB_CRM_ImportCustomers();
  102. break;
  103. case ATTENDANCE:
  104. entity = new OTB_EIP_Attendance();
  105. break;
  106. case ATTENDANCEDIFF:
  107. entity = new OTB_EIP_AttendanceDiff();
  108. break;
  109. case BILLCHANGEAPPLY:
  110. entity = new OTB_EIP_BillChangeApply();
  111. break;
  112. case BUSINESSTRAVEL:
  113. entity = new OTB_EIP_BusinessTravel();
  114. break;
  115. case CHECKFLOW:
  116. entity = new OTB_EIP_CheckFlow();
  117. break;
  118. case INVOICEAPPLYINFO:
  119. entity = new OTB_EIP_InvoiceApplyInfo();
  120. break;
  121. case LEAVE:
  122. entity = new OTB_EIP_Leave();
  123. break;
  124. case LEAVESET:
  125. entity = new OTB_EIP_LeaveSet();
  126. break;
  127. case OVERTIME:
  128. entity = new OTB_EIP_OverTime();
  129. break;
  130. case TRAVELEXPENSE:
  131. entity = new OTB_EIP_TravelExpense();
  132. break;
  133. case WENZHONG:
  134. entity = new OTB_EIP_WenZhong();
  135. break;
  136. case BILLINFO:
  137. entity = new OTB_OPM_BillInfo();
  138. break;
  139. case BILLS:
  140. entity = new OTB_OPM_Bills();
  141. break;
  142. case BILLSBAK:
  143. entity = new OTB_OPM_BillsBak();
  144. break;
  145. case EXHIBITION:
  146. entity = new OTB_OPM_Exhibition();
  147. break;
  148. case EXHIBITIONSTRANSFER:
  149. entity = new OTB_OPM_ExhibitionsTransfer();
  150. break;
  151. case EXHIBITIONSTRANSFERBAK:
  152. entity = new OTB_OPM_ExhibitionsTransferBak();
  153. break;
  154. case EXPORTEXHIBITION:
  155. entity = new OTB_OPM_ExportExhibition();
  156. break;
  157. case IMPORTEXHIBITION:
  158. entity = new OTB_OPM_ImportExhibition();
  159. break;
  160. case OTHEREXHIBITION:
  161. entity = new OTB_OPM_OtherExhibition();
  162. break;
  163. case OTHEREXHIBITIONTG:
  164. entity = new OTB_OPM_OtherExhibitionTG();
  165. break;
  166. case ANNOUNCEMENT:
  167. entity = new OTB_SYS_Announcement();
  168. break;
  169. case READ:
  170. entity = new OTB_SYS_Announcement_Read();
  171. break;
  172. case ARGUMENTCLASS:
  173. entity = new OTB_SYS_ArgumentClass();
  174. break;
  175. case ARGUMENTS:
  176. entity = new OTB_SYS_Arguments();
  177. break;
  178. case ARGUMENTSRELATED:
  179. entity = new OTB_SYS_ArgumentsRelated();
  180. break;
  181. case AUTHORIZE:
  182. entity = new OTB_SYS_Authorize();
  183. break;
  184. case AUTHORIZEFORDEPT:
  185. entity = new OTB_SYS_AuthorizeForDept();
  186. break;
  187. case AUTHORIZEFORMEMBER:
  188. entity = new OTB_SYS_AuthorizeForMember();
  189. break;
  190. case CALENDAR:
  191. entity = new OTB_SYS_Calendar();
  192. break;
  193. case CLOCKTIPS:
  194. entity = new OTB_SYS_ClockTips();
  195. break;
  196. case CLOCKTIPSBAK:
  197. entity = new OTB_SYS_ClockTipsBak();
  198. break;
  199. case DEPARTMENTS:
  200. entity = new OTB_SYS_Departments();
  201. break;
  202. case DOCUMENT:
  203. entity = new OTB_SYS_Document();
  204. break;
  205. case EMAIL:
  206. entity = new OTB_SYS_Email();
  207. break;
  208. case FILES:
  209. entity = new OTB_SYS_Files();
  210. break;
  211. case FORGETPASSWORD:
  212. entity = new OTB_SYS_ForgetPassword();
  213. break;
  214. case HOLIDAYS:
  215. entity = new OTB_SYS_Holidays();
  216. break;
  217. case JOBTITLE:
  218. entity = new OTB_SYS_Jobtitle();
  219. break;
  220. case LANGUAGE:
  221. entity = new OTB_SYS_Language();
  222. break;
  223. case LOGINFO:
  224. entity = new OTB_SYS_LogInfo();
  225. break;
  226. case LOGINLOG:
  227. entity = new OTB_SYS_LoginLog();
  228. break;
  229. case MAXNUMBER:
  230. entity = new OTB_SYS_MaxNumber();
  231. break;
  232. case MEMBERS:
  233. entity = new OTB_SYS_Members();
  234. break;
  235. case MEMBERSTORULE:
  236. entity = new OTB_SYS_MembersToRule();
  237. break;
  238. case MODULEFORPROGRAM:
  239. entity = new OTB_SYS_ModuleForProgram();
  240. break;
  241. case MODULELIST:
  242. entity = new OTB_SYS_ModuleList();
  243. break;
  244. case OFFICETEMPLATE:
  245. entity = new OTB_SYS_OfficeTemplate();
  246. break;
  247. case ONLINEUSERS:
  248. entity = new OTB_SYS_OnlineUsers();
  249. break;
  250. case ORGANIZATION:
  251. entity = new OTB_SYS_Organization();
  252. break;
  253. case OUTERUSERS:
  254. entity = new OTB_SYS_OuterUsers();
  255. break;
  256. case PROFILES:
  257. entity = new OTB_SYS_Profiles();
  258. break;
  259. case PROGRAMLIST:
  260. entity = new OTB_SYS_ProgramList();
  261. break;
  262. case RULES:
  263. entity = new OTB_SYS_Rules();
  264. break;
  265. case SYSTEMSETTING:
  266. entity = new OTB_SYS_SystemSetting();
  267. break;
  268. case TASK:
  269. entity = new OTB_SYS_Task();
  270. break;
  271. case TASKREPLY:
  272. entity = new OTB_SYS_TaskReply();
  273. break;
  274. case TICKETAUTH:
  275. entity = new OTB_SYS_TicketAuth();
  276. break;
  277. case TIPS:
  278. entity = new OTB_SYS_Tips();
  279. break;
  280. case TIPSBAK:
  281. entity = new OTB_SYS_TipsBak();
  282. break;
  283. case EXHIBITIONRULES:
  284. entity = new OTB_WSM_ExhibitionRules();
  285. break;
  286. case NEWS:
  287. entity = new OTB_WSM_News();
  288. break;
  289. case PACKINGORDER:
  290. entity = new OTB_WSM_PackingOrder();
  291. break;
  292. case TRACKINGLOG:
  293. entity = new OTB_WSM_TrackingLog();
  294. break;
  295. case WEBSITEFILES:
  296. entity = new OTB_WSM_WebSiteFiles();
  297. break;
  298. case WEBSITEMAILLOG:
  299. entity = new OTB_WSM_WebSiteMailLog();
  300. break;
  301. case WEBSITESETTING:
  302. entity = new OTB_WSM_WebSiteSetting();
  303. break;
  304. case OVW_IMPORTCUSTOMERS:
  305. entity = new OVW_CRM_ImportCustomers();
  306. break;
  307. case OVW_BILLINFO:
  308. entity = new OVW_OPM_BillInfo();
  309. break;
  310. case OVW_BILLS:
  311. entity = new OVW_OPM_Bills();
  312. break;
  313. }
  314. return entity;
  315. }
  316. }
  317. }