Const.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Bowin.Common.Utility;
  6. namespace EMIS.Utility
  7. {
  8. public class Const
  9. {
  10. public const string UPLOAD_SESSION_NAME = "UploadedFiles";
  11. /// <summary>
  12. ///
  13. /// </summary>
  14. public static List<string> LOCAL_AUTH_EXCEPTURL
  15. {
  16. get {
  17. List<string> lurl = new List<string>();
  18. lurl.Add("Content/");
  19. lurl.Add("Doc/");
  20. lurl.Add("bundles/");
  21. lurl.Add("Scripts/");
  22. lurl.Add("/UserVerify");
  23. lurl.Add("/ForgotPassword");
  24. lurl.Add("/NewForgotPassword");
  25. lurl.Add("UploadFile/");
  26. lurl.Add("/MsgShow");
  27. lurl.Add("Account/SSOLogin");
  28. lurl.Add("Account/ChangePassword");
  29. return lurl;
  30. }
  31. }
  32. public static List<string> LOCAL_AUTH_INCLUDEURL
  33. {
  34. get
  35. {
  36. List<string> lurl = new List<string>();
  37. //lurl.Add("Content/DownFile");
  38. return lurl;
  39. }
  40. }
  41. /// <summary>
  42. ///
  43. /// </summary>
  44. public static string LOCAL_SETTING_LOGIN_COOKIENAME
  45. {
  46. get
  47. {
  48. try
  49. {
  50. return System.Configuration.ConfigurationManager.AppSettings["logincookieName"];
  51. }
  52. catch (Exception ex)
  53. {
  54. string e = ex.ToString();
  55. return "";
  56. }
  57. }
  58. }
  59. /// <summary>
  60. ///
  61. /// </summary>
  62. public static string LOCAL_SETTING_LOGIN_ACTION
  63. {
  64. get
  65. {
  66. try
  67. {
  68. return System.Configuration.ConfigurationManager.AppSettings["LoginAction"];
  69. }
  70. catch
  71. {
  72. return null;
  73. }
  74. }
  75. }
  76. /// <summary>
  77. ///
  78. /// </summary>
  79. public static int LOCAL_SETTING_LoginIDLength
  80. {
  81. get
  82. {
  83. try
  84. {
  85. return Convert.ToInt32(RSL.Get("LoginIDLength"));
  86. }
  87. catch
  88. {
  89. return 8;
  90. }
  91. }
  92. }
  93. /// <summary>
  94. ///
  95. /// </summary>
  96. public static string USER_INIT_PASSWORD
  97. {
  98. get { return ("123456").MD5(); }
  99. }
  100. /// <summary>
  101. ///
  102. /// </summary>
  103. public static bool LOCAL_SETTING_ISCLOSESCHEDULINGMANAGE
  104. {
  105. get { return System.Configuration.ConfigurationManager.AppSettings["IsCloseSchedulingManage"] == "1"; }
  106. }
  107. /// <summary>
  108. ///
  109. /// </summary>
  110. public static string LOCAL_SETTING_UPLOAD_FILEPATH
  111. {
  112. get
  113. {
  114. try
  115. {
  116. return System.Configuration.ConfigurationManager.AppSettings["FileUploadPath"];
  117. }
  118. catch (Exception ex)
  119. {
  120. string e = ex.ToString();
  121. return "";
  122. }
  123. }
  124. }
  125. /// <summary>
  126. ///
  127. /// </summary>
  128. public static string LOCAL_SETTING_PlanningGraduateDateSpringMonth
  129. {
  130. get
  131. {
  132. try
  133. {
  134. return System.Configuration.ConfigurationManager.AppSettings["PlanningGraduateDateSpringMonth"];
  135. }
  136. catch (Exception ex)
  137. {
  138. string e = ex.ToString();
  139. return "";
  140. }
  141. }
  142. }
  143. /// <summary>
  144. ///
  145. /// </summary>
  146. public static string LOCAL_SETTING_PlanningGraduateDateSpringDay
  147. {
  148. get
  149. {
  150. try
  151. {
  152. return System.Configuration.ConfigurationManager.AppSettings["PlanningGraduateDateSpringDay"];
  153. }
  154. catch (Exception ex)
  155. {
  156. string e = ex.ToString();
  157. return "";
  158. }
  159. }
  160. }
  161. /// <summary>
  162. ///
  163. /// </summary>
  164. public static string LOCAL_SETTING_PlanningGraduateDateAutumnMonth
  165. {
  166. get
  167. {
  168. try
  169. {
  170. return System.Configuration.ConfigurationManager.AppSettings["PlanningGraduateDateAutumnMonth"];
  171. }
  172. catch (Exception ex)
  173. {
  174. string e = ex.ToString();
  175. return "";
  176. }
  177. }
  178. }
  179. /// <summary>
  180. ///
  181. /// </summary>
  182. public static string LOCAL_SETTING_PlanningGraduateDateAutumnDay
  183. {
  184. get
  185. {
  186. try
  187. {
  188. return System.Configuration.ConfigurationManager.AppSettings["PlanningGraduateDateAutumnDay"];
  189. }
  190. catch (Exception ex)
  191. {
  192. string e = ex.ToString();
  193. return "";
  194. }
  195. }
  196. }
  197. /// <summary>
  198. /// 入学学期(1表示春季、上学期,2表示秋季、下学期)
  199. /// </summary>
  200. public static string LOCAL_SETTING_ENTRANCESEMESTERID
  201. {
  202. get
  203. {
  204. try
  205. {
  206. return System.Configuration.ConfigurationManager.AppSettings["EntranceSemesterID"];
  207. }
  208. catch (Exception ex)
  209. {
  210. string e = ex.ToString();
  211. return "";
  212. }
  213. }
  214. }
  215. /// <summary>
  216. /// 学号总位数
  217. /// </summary>
  218. public static string LOCAL_SETTING_LOGINIDTOTAL
  219. {
  220. get
  221. {
  222. try
  223. {
  224. return System.Configuration.ConfigurationManager.AppSettings["LoginIDTotal"];
  225. }
  226. catch (Exception ex)
  227. {
  228. string e = ex.ToString();
  229. return "";
  230. }
  231. }
  232. }
  233. /// <summary>
  234. ///
  235. /// </summary>
  236. public static bool LOCAL_SETTING_MISSIONCLASS_CAN_SUBMIT_NOTEACHER
  237. {
  238. get
  239. {
  240. try
  241. {
  242. return System.Configuration.ConfigurationManager.AppSettings["MissionClassCanSubmitNoTeacher"] == "1";
  243. }
  244. catch (Exception ex)
  245. {
  246. string e = ex.ToString();
  247. return false;
  248. }
  249. }
  250. }
  251. /// <summary>
  252. ///
  253. /// </summary>
  254. public static string LOCAL_SETTING_LOGOFF_PAGE
  255. {
  256. get
  257. {
  258. try
  259. {
  260. return System.Configuration.ConfigurationManager.AppSettings["LogOffUrl"];
  261. }
  262. catch (Exception ex)
  263. {
  264. string e = ex.ToString();
  265. return "~/Account/Login";
  266. }
  267. }
  268. }
  269. /// <summary>
  270. ///
  271. /// </summary>
  272. public static string LOCAL_SETTING_REPORT_URL
  273. {
  274. get
  275. {
  276. try
  277. {
  278. return System.Configuration.ConfigurationManager.AppSettings["ReportServerUrl"];
  279. }
  280. catch (Exception ex)
  281. {
  282. string e = ex.ToString();
  283. return "";
  284. }
  285. }
  286. }
  287. /// <summary>
  288. ///
  289. /// </summary>
  290. public static string LOCAL_SETTING_REPORT_USER_NAME
  291. {
  292. get
  293. {
  294. try
  295. {
  296. return System.Configuration.ConfigurationManager.AppSettings["ReportServerUser"];
  297. }
  298. catch (Exception ex)
  299. {
  300. string e = ex.ToString();
  301. return "";
  302. }
  303. }
  304. }
  305. /// <summary>
  306. ///
  307. /// </summary>
  308. public static string LOCAL_SETTING_REPORT_PASSWORD
  309. {
  310. get
  311. {
  312. try
  313. {
  314. return System.Configuration.ConfigurationManager.AppSettings["ReportServerPass"];
  315. }
  316. catch (Exception ex)
  317. {
  318. string e = ex.ToString();
  319. return "";
  320. }
  321. }
  322. }
  323. /// <summary>
  324. ///
  325. /// </summary>
  326. public static bool SSO_IS_SSO_LOGIN
  327. {
  328. get
  329. {
  330. try
  331. {
  332. return System.Configuration.ConfigurationManager.AppSettings["IsSSOLogin"] == "1";
  333. }
  334. catch (Exception ex)
  335. {
  336. string e = ex.ToString();
  337. return false;
  338. }
  339. }
  340. }
  341. /// <summary>
  342. ///
  343. /// </summary>
  344. public static string SSO_HOST
  345. {
  346. get
  347. {
  348. try
  349. {
  350. var ssoHost = System.Configuration.ConfigurationManager.AppSettings["SSOHost"];
  351. if (!ssoHost.EndsWith("/"))
  352. {
  353. ssoHost += "/";
  354. }
  355. return ssoHost;
  356. }
  357. catch (Exception ex)
  358. {
  359. string e = ex.ToString();
  360. throw new Exception("单点登录配置错误。");
  361. }
  362. }
  363. }
  364. /// <summary>
  365. ///
  366. /// </summary>
  367. public static int ES_DEFAULT_COURSETIMEHOURS
  368. {
  369. get { return 7; }
  370. }
  371. /// <summary>
  372. ///
  373. /// </summary>
  374. public static string CF_GRADEMAJOR_NO_PREFIX
  375. {
  376. get { return "GradeNo"; }
  377. }
  378. /// <summary>
  379. ///
  380. /// </summary>
  381. public static string CF_CLASSMAJOR_NO_PREFIX
  382. {
  383. get { return "ClassNo"; }
  384. }
  385. /// <summary>
  386. ///
  387. /// </summary>
  388. public static string CF_STUDENTCHANGE_COLLEGEAPPROVE_FLAG
  389. {
  390. get { return "[College]"; }
  391. }
  392. /// <summary>
  393. ///
  394. /// </summary>
  395. public static string CF_STUDENTCHANGE_ADMINAPPROVE_FLAG
  396. {
  397. get { return "[Admin]"; }
  398. }
  399. /// <summary>
  400. ///
  401. /// </summary>
  402. public static string ER_SCORECONVERT_BYREPLACE_SCOREREMARK
  403. {
  404. get { return "由成绩认定产生"; }
  405. }
  406. }
  407. }