Const.cs 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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. public static List<string> LOCAL_AUTH_EXCEPTURL
  12. {
  13. get {
  14. List<string> lurl = new List<string>();
  15. lurl.Add("Content/");
  16. lurl.Add("Doc/");
  17. lurl.Add("bundles/");
  18. lurl.Add("Scripts/");
  19. lurl.Add("/UserVerify");
  20. lurl.Add("/ForgotPassword");
  21. lurl.Add("/NewForgotPassword");
  22. lurl.Add("UploadFile/");
  23. lurl.Add("/MsgShow");
  24. lurl.Add("Account/Regist");
  25. lurl.Add("Account/SSOLogin");
  26. lurl.Add("Account/ChangePassword");
  27. return lurl;
  28. }
  29. }
  30. public static string LOCAL_SETTING_LOGIN_COOKIENAME
  31. {
  32. get
  33. {
  34. try
  35. {
  36. return System.Configuration.ConfigurationManager.AppSettings["logincookieName"];
  37. }
  38. catch (Exception ex)
  39. {
  40. string e = ex.ToString();
  41. return "";
  42. }
  43. }
  44. }
  45. public static string LOCAL_SETTING_LOGIN_ACTION
  46. {
  47. get
  48. {
  49. try
  50. {
  51. return System.Configuration.ConfigurationManager.AppSettings["LoginAction"];
  52. }
  53. catch
  54. {
  55. return null;
  56. }
  57. }
  58. }
  59. public static int LOCAL_SETTING_LoginIDLength
  60. {
  61. get
  62. {
  63. try
  64. {
  65. return Convert.ToInt32(RSL.Get("LoginIDLength"));
  66. }
  67. catch
  68. {
  69. return 8;
  70. }
  71. }
  72. }
  73. public static string USER_INIT_PASSWORD
  74. {
  75. get { return ("123456").MD5(); }
  76. }
  77. public static bool LOCAL_SETTING_ISCLOSESCHEDULINGMANAGE
  78. {
  79. get { return System.Configuration.ConfigurationManager.AppSettings["IsCloseSchedulingManage"] == "1"; }
  80. }
  81. public static string LOCAL_SETTING_UPLOAD_FILEPATH
  82. {
  83. get
  84. {
  85. try
  86. {
  87. return System.Configuration.ConfigurationManager.AppSettings["FileUploadPath"];
  88. }
  89. catch (Exception ex)
  90. {
  91. string e = ex.ToString();
  92. return "";
  93. }
  94. }
  95. }
  96. public static string LOCAL_SETTING_PlanningGraduateDateSpringMonth
  97. {
  98. get
  99. {
  100. try
  101. {
  102. return System.Configuration.ConfigurationManager.AppSettings["PlanningGraduateDateSpringMonth"];
  103. }
  104. catch (Exception ex)
  105. {
  106. string e = ex.ToString();
  107. return "";
  108. }
  109. }
  110. }
  111. public static string LOCAL_SETTING_PlanningGraduateDateSpringDay
  112. {
  113. get
  114. {
  115. try
  116. {
  117. return System.Configuration.ConfigurationManager.AppSettings["PlanningGraduateDateSpringDay"];
  118. }
  119. catch (Exception ex)
  120. {
  121. string e = ex.ToString();
  122. return "";
  123. }
  124. }
  125. }
  126. public static string LOCAL_SETTING_PlanningGraduateDateAutumnMonth
  127. {
  128. get
  129. {
  130. try
  131. {
  132. return System.Configuration.ConfigurationManager.AppSettings["PlanningGraduateDateAutumnMonth"];
  133. }
  134. catch (Exception ex)
  135. {
  136. string e = ex.ToString();
  137. return "";
  138. }
  139. }
  140. }
  141. public static string LOCAL_SETTING_PlanningGraduateDateAutumnDay
  142. {
  143. get
  144. {
  145. try
  146. {
  147. return System.Configuration.ConfigurationManager.AppSettings["PlanningGraduateDateAutumnDay"];
  148. }
  149. catch (Exception ex)
  150. {
  151. string e = ex.ToString();
  152. return "";
  153. }
  154. }
  155. }
  156. public static string LOCAL_SETTING_GRADUATINGSEMESTER
  157. {
  158. get
  159. {
  160. try
  161. {
  162. return System.Configuration.ConfigurationManager.AppSettings["GraduatingSemester"];
  163. }
  164. catch (Exception ex)
  165. {
  166. string e = ex.ToString();
  167. return "";
  168. }
  169. }
  170. }
  171. public static string LOCAL_SETTING_LOGINIDTOTAL
  172. {
  173. get
  174. {
  175. try
  176. {
  177. return System.Configuration.ConfigurationManager.AppSettings["LoginIDTotal"];
  178. }
  179. catch (Exception ex)
  180. {
  181. string e = ex.ToString();
  182. return "";
  183. }
  184. }
  185. }
  186. public static bool LOCAL_SETTING_MISSIONCLASS_CAN_SUBMIT_NOTEACHER
  187. {
  188. get
  189. {
  190. try
  191. {
  192. return System.Configuration.ConfigurationManager.AppSettings["MissionClassCanSubmitNoTeacher"] == "1";
  193. }
  194. catch (Exception ex)
  195. {
  196. string e = ex.ToString();
  197. return false;
  198. }
  199. }
  200. }
  201. public static string LOCAL_SETTING_LOGOFF_PAGE
  202. {
  203. get
  204. {
  205. try
  206. {
  207. return System.Configuration.ConfigurationManager.AppSettings["LogOffUrl"];
  208. }
  209. catch (Exception ex)
  210. {
  211. string e = ex.ToString();
  212. return "~/Account/Login";
  213. }
  214. }
  215. }
  216. public static string LOCAL_SETTING_REPORT_URL
  217. {
  218. get
  219. {
  220. try
  221. {
  222. return System.Configuration.ConfigurationManager.AppSettings["ReportServerUrl"];
  223. }
  224. catch (Exception ex)
  225. {
  226. string e = ex.ToString();
  227. return "";
  228. }
  229. }
  230. }
  231. public static string LOCAL_SETTING_REPORT_USER_NAME
  232. {
  233. get
  234. {
  235. try
  236. {
  237. return System.Configuration.ConfigurationManager.AppSettings["ReportServerUser"];
  238. }
  239. catch (Exception ex)
  240. {
  241. string e = ex.ToString();
  242. return "";
  243. }
  244. }
  245. }
  246. public static string LOCAL_SETTING_REPORT_PASSWORD
  247. {
  248. get
  249. {
  250. try
  251. {
  252. return System.Configuration.ConfigurationManager.AppSettings["ReportServerPass"];
  253. }
  254. catch (Exception ex)
  255. {
  256. string e = ex.ToString();
  257. return "";
  258. }
  259. }
  260. }
  261. public static bool SSO_IS_SSO_LOGIN
  262. {
  263. get
  264. {
  265. try
  266. {
  267. return System.Configuration.ConfigurationManager.AppSettings["IsSSOLogin"] == "1";
  268. }
  269. catch (Exception ex)
  270. {
  271. string e = ex.ToString();
  272. return false;
  273. }
  274. }
  275. }
  276. public static string SSO_HOST
  277. {
  278. get
  279. {
  280. try
  281. {
  282. var ssoHost = System.Configuration.ConfigurationManager.AppSettings["SSOHost"];
  283. if (!ssoHost.EndsWith("/"))
  284. {
  285. ssoHost += "/";
  286. }
  287. return ssoHost;
  288. }
  289. catch (Exception ex)
  290. {
  291. string e = ex.ToString();
  292. throw new Exception("单点登录配置错误。");
  293. }
  294. }
  295. }
  296. public static int ES_DEFAULT_COURSETIMEHOURS
  297. {
  298. get { return 7; }
  299. }
  300. public static string CF_GRADEMAJOR_NO_PREFIX
  301. {
  302. get { return "GradeNo"; }
  303. }
  304. public static string CF_CLASSMAJOR_NO_PREFIX
  305. {
  306. get { return "ClassNo"; }
  307. }
  308. public static string CF_STUDENTCHANGE_COLLEGEAPPROVE_FLAG
  309. {
  310. get { return "[College]"; }
  311. }
  312. public static string CF_STUDENTCHANGE_ADMINAPPROVE_FLAG
  313. {
  314. get { return "[Admin]"; }
  315. }
  316. public static string ER_SCORECONVERT_BYREPLACE_SCOREREMARK
  317. {
  318. get { return "由成绩认定产生"; }
  319. }
  320. public static string EX_REGISTCONFIRM_NO_PREFIX
  321. {
  322. get { return "KSQRD"; }
  323. }
  324. public static string EX_CERTISFIERDISTRIBUTE_NO_PREFIX
  325. {
  326. get { return "LQ"; }
  327. }
  328. public static string LOCAL_SETTING_BARCODEPATH
  329. {
  330. get { return "BarCodeImages"; }
  331. }
  332. }
  333. }