ErrorCodeHelper.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. using Prism.Mvvm;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace PDF_Master.Helper
  8. {
  9. public class ErrorCodeHelper : BindableBase
  10. {
  11. #region 文案
  12. private string _code301 = "";
  13. public string code301
  14. {
  15. get { return _code301; }
  16. set
  17. {
  18. SetProperty(ref _code301, value);
  19. }
  20. }
  21. private string _code302 = "";
  22. public string code302
  23. {
  24. get { return _code302; }
  25. set
  26. {
  27. SetProperty(ref _code302, value);
  28. }
  29. }
  30. private string _code304 = "";
  31. public string code304
  32. {
  33. get { return _code304; }
  34. set
  35. {
  36. SetProperty(ref _code304, value);
  37. }
  38. }
  39. private string _code305 = "";
  40. public string code305
  41. {
  42. get { return _code305; }
  43. set
  44. {
  45. SetProperty(ref _code305, value);
  46. }
  47. }
  48. private string _code306 = "";
  49. public string code306
  50. {
  51. get { return _code306; }
  52. set
  53. {
  54. SetProperty(ref _code306, value);
  55. }
  56. }
  57. private string _code307 = "";
  58. public string code307
  59. {
  60. get { return _code307; }
  61. set
  62. {
  63. SetProperty(ref _code307, value);
  64. }
  65. }
  66. private string _code308 = "";
  67. public string code308
  68. {
  69. get { return _code308; }
  70. set
  71. {
  72. SetProperty(ref _code308, value);
  73. }
  74. }
  75. private string _code309 = "";
  76. public string code309
  77. {
  78. get { return _code309; }
  79. set
  80. {
  81. SetProperty(ref _code309, value);
  82. }
  83. }
  84. private string _code310 = "";
  85. public string code310
  86. {
  87. get { return _code310; }
  88. set
  89. {
  90. SetProperty(ref _code310, value);
  91. }
  92. }
  93. private string _code311 = "";
  94. public string code311
  95. {
  96. get { return _code311; }
  97. set
  98. {
  99. SetProperty(ref _code311, value);
  100. }
  101. }
  102. private string _code312 = "";
  103. public string code312
  104. {
  105. get { return _code312; }
  106. set
  107. {
  108. SetProperty(ref _code312, value);
  109. }
  110. }
  111. private string _code313 = "";
  112. public string code313
  113. {
  114. get { return _code313; }
  115. set
  116. {
  117. SetProperty(ref _code313, value);
  118. }
  119. }
  120. private string _code314 = "";
  121. public string code314
  122. {
  123. get { return _code314; }
  124. set
  125. {
  126. SetProperty(ref _code314, value);
  127. }
  128. }
  129. private string _code315 = "";
  130. public string code315
  131. {
  132. get { return _code315; }
  133. set
  134. {
  135. SetProperty(ref _code315, value);
  136. }
  137. }
  138. private string _code316 = "";
  139. public string code316
  140. {
  141. get { return _code316; }
  142. set
  143. {
  144. SetProperty(ref _code316, value);
  145. }
  146. }
  147. private string _code317 = "";
  148. public string code317
  149. {
  150. get { return _code317; }
  151. set
  152. {
  153. SetProperty(ref _code317, value);
  154. }
  155. }
  156. private string _code318 = "";
  157. public string code318
  158. {
  159. get { return _code318; }
  160. set
  161. {
  162. SetProperty(ref _code318, value);
  163. }
  164. }
  165. private string _code319 = "";
  166. public string code319
  167. {
  168. get { return _code319; }
  169. set
  170. {
  171. SetProperty(ref _code319, value);
  172. }
  173. }
  174. private string _code320 = "";
  175. public string code320
  176. {
  177. get { return _code320; }
  178. set
  179. {
  180. SetProperty(ref _code320, value);
  181. }
  182. }
  183. private string _code321 = "";
  184. public string code321
  185. {
  186. get { return _code321; }
  187. set
  188. {
  189. SetProperty(ref _code321, value);
  190. }
  191. }
  192. private string _code322 = "";
  193. public string code322
  194. {
  195. get { return _code322; }
  196. set
  197. {
  198. SetProperty(ref _code322, value);
  199. }
  200. }
  201. private string _code323 = "";
  202. public string code323
  203. {
  204. get { return _code323; }
  205. set
  206. {
  207. SetProperty(ref _code323, value);
  208. }
  209. }
  210. private string _code324 = "";
  211. public string code324
  212. {
  213. get { return _code324; }
  214. set
  215. {
  216. SetProperty(ref _code324, value);
  217. }
  218. }
  219. private string _code325 = "";
  220. public string code325
  221. {
  222. get { return _code325; }
  223. set
  224. {
  225. SetProperty(ref _code325, value);
  226. }
  227. }
  228. private string _code326 = "";
  229. public string code326
  230. {
  231. get { return _code326; }
  232. set
  233. {
  234. SetProperty(ref _code326, value);
  235. }
  236. }
  237. private string _code327 = "";
  238. public string code327
  239. {
  240. get { return _code327; }
  241. set
  242. {
  243. SetProperty(ref _code327, value);
  244. }
  245. }
  246. private string _code328 = "";
  247. public string code328
  248. {
  249. get { return _code328; }
  250. set
  251. {
  252. SetProperty(ref _code328, value);
  253. }
  254. }
  255. private string _code329 = "";
  256. public string code329
  257. {
  258. get { return _code329; }
  259. set
  260. {
  261. SetProperty(ref _code329, value);
  262. }
  263. }
  264. private string _code330 = "";
  265. public string code330
  266. {
  267. get { return _code330; }
  268. set
  269. {
  270. SetProperty(ref _code330, value);
  271. }
  272. }
  273. private string _code331 = "";
  274. public string code331
  275. {
  276. get { return _code331; }
  277. set
  278. {
  279. SetProperty(ref _code331, value);
  280. }
  281. }
  282. private string _code332 = "";
  283. public string code332
  284. {
  285. get { return _code332; }
  286. set
  287. {
  288. SetProperty(ref _code332, value);
  289. }
  290. }
  291. private string _code333 = "";
  292. public string code333
  293. {
  294. get { return _code333; }
  295. set
  296. {
  297. SetProperty(ref _code333, value);
  298. }
  299. }
  300. private string _code334 = "";
  301. public string code334
  302. {
  303. get { return _code334; }
  304. set
  305. {
  306. SetProperty(ref _code334, value);
  307. }
  308. }
  309. private string _code300 = "";
  310. public string code300
  311. {
  312. get { return _code300; }
  313. set
  314. {
  315. SetProperty(ref _code300, value);
  316. }
  317. }
  318. private string _codehad = "";
  319. public string codehad
  320. {
  321. get { return _codehad; }
  322. set
  323. {
  324. SetProperty(ref _codehad, value);
  325. }
  326. }
  327. public void InitString()
  328. {
  329. code301 = App.ServiceLoader.GetString("code301");
  330. code302 = App.ServiceLoader.GetString("code302");
  331. code304 = App.ServiceLoader.GetString("code304");
  332. code305 = App.ServiceLoader.GetString("code305");
  333. code306 = App.ServiceLoader.GetString("code306");
  334. code307 = App.ServiceLoader.GetString("code307");
  335. code308 = App.ServiceLoader.GetString("code308");
  336. code309 = App.ServiceLoader.GetString("code309");
  337. code310 = App.ServiceLoader.GetString("code310");
  338. code311 = App.ServiceLoader.GetString("code311");
  339. code312 = App.ServiceLoader.GetString("code312");
  340. code313 = App.ServiceLoader.GetString("code313");
  341. code314 = App.ServiceLoader.GetString("code314");
  342. code315 = App.ServiceLoader.GetString("code315");
  343. code316 = App.ServiceLoader.GetString("code316");
  344. code317 = App.ServiceLoader.GetString("code317");
  345. code318 = App.ServiceLoader.GetString("code318");
  346. code319 = App.ServiceLoader.GetString("code319");
  347. code320 = App.ServiceLoader.GetString("code320");
  348. code321 = App.ServiceLoader.GetString("code321");
  349. code322 = App.ServiceLoader.GetString("code322");
  350. code323 = App.ServiceLoader.GetString("code323");
  351. code324 = App.ServiceLoader.GetString("code324");
  352. code325 = App.ServiceLoader.GetString("code325");
  353. code326 = App.ServiceLoader.GetString("code326");
  354. code327 = App.ServiceLoader.GetString("code327");
  355. code328 = App.ServiceLoader.GetString("code328");
  356. code329 = App.ServiceLoader.GetString("code329");
  357. code330 = App.ServiceLoader.GetString("code330");
  358. code331 = App.ServiceLoader.GetString("code331");
  359. code332 = App.ServiceLoader.GetString("code332");
  360. code333 = App.ServiceLoader.GetString("code333");
  361. code334 = App.ServiceLoader.GetString("code334");
  362. code300 = App.ServiceLoader.GetString("code300");
  363. codehad= App.ServiceLoader.GetString("codehad");
  364. }
  365. public string Ercode( string code)
  366. {
  367. InitString();
  368. if (code == "200")
  369. return "success";
  370. else if (code == "301")
  371. return code301;
  372. else if (code == "302")
  373. return code302;
  374. else if (code == "304")
  375. return code304;
  376. else if (code == "305")
  377. return code305;
  378. else if (code == "306")
  379. return code306;
  380. else if (code == "307")
  381. return code307;
  382. else if (code == "308")
  383. return code308;
  384. else if (code == "309")
  385. return code309;
  386. else if (code == "310")
  387. return code310;
  388. else if (code == "311")
  389. return code311;
  390. else if (code == "312")
  391. return code312;
  392. else if (code == "313")
  393. return code313;
  394. else if (code == "314")
  395. return code314;
  396. else if (code == "315")
  397. return code315;
  398. else if (code == "316")
  399. return code316;
  400. else if (code == "317")
  401. return code317;
  402. else if (code == "318")
  403. return code318;
  404. else if (code == "319")
  405. return code319;
  406. else if (code == "320")
  407. return code320;
  408. else if (code == "321")
  409. return code321;
  410. else if (code == "322")
  411. return code322;
  412. else if (code == "323")
  413. return code323;
  414. else if (code == "324")
  415. return code324;
  416. else if (code == "325")
  417. return code325;
  418. else if (code == "326")
  419. return code326;
  420. else if (code == "327")
  421. return code327;
  422. else if (code == "codehad")
  423. return codehad;
  424. else
  425. return code300;
  426. }
  427. #endregion
  428. }
  429. }