提交首页修改
This commit is contained in:
@@ -7,6 +7,109 @@
|
||||
|
||||
public static class SysConstSetService
|
||||
{
|
||||
private static string _CNCECPath;
|
||||
private static string _CNCECToken;
|
||||
private static string _CNCECTokenExTime;
|
||||
|
||||
public static string CNCECPath
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet5 = (from x in Funs.DB.Sys_Set where x.SetName == "集团接口地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet5 != null)
|
||||
{
|
||||
_CNCECPath = sysSet5.SetValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_CNCECPath = "";
|
||||
}
|
||||
return _CNCECPath;
|
||||
}
|
||||
set
|
||||
{
|
||||
_CNCECPath = value;
|
||||
}
|
||||
}
|
||||
public static string CNCECToken
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet5 = (from x in Funs.DB.Sys_Set where x.SetName == "token" select x).ToList().FirstOrDefault();
|
||||
if (sysSet5 != null)
|
||||
{
|
||||
_CNCECToken = sysSet5.SetValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_CNCECToken = "";
|
||||
}
|
||||
return _CNCECToken;
|
||||
}
|
||||
}
|
||||
public static string CNCECTTokenExTime
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet5 = (from x in Funs.DB.Sys_Set where x.SetName == "token失效时间" select x).ToList().FirstOrDefault();
|
||||
if (sysSet5 != null)
|
||||
{
|
||||
_CNCECTokenExTime = sysSet5.SetValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_CNCECTokenExTime = "";
|
||||
}
|
||||
return _CNCECTokenExTime;
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetToken(string token)
|
||||
{
|
||||
Model.Sys_Set sysSet = Funs.DB.Sys_Set.FirstOrDefault(x => x.SetName == "token");
|
||||
if (sysSet != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
{
|
||||
sysSet.SetValue = token;
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Sys_Set newSysSet5 = new Model.Sys_Set();
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
{
|
||||
newSysSet5.SetValue = token;
|
||||
}
|
||||
newSysSet5.SetName = "token";
|
||||
Funs.DB.Sys_Set.InsertOnSubmit(newSysSet5);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void SetTokenExpirationTime(string ExpirationTime)
|
||||
{
|
||||
Model.Sys_Set sysSet = Funs.DB.Sys_Set.FirstOrDefault(x => x.SetName == "token失效时间");
|
||||
if (sysSet != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ExpirationTime))
|
||||
{
|
||||
sysSet.SetValue = ExpirationTime;
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Sys_Set newSysSet5 = new Model.Sys_Set();
|
||||
if (!string.IsNullOrEmpty(ExpirationTime))
|
||||
{
|
||||
newSysSet5.SetValue = ExpirationTime;
|
||||
}
|
||||
newSysSet5.SetName = "token失效时间";
|
||||
Funs.DB.Sys_Set.InsertOnSubmit(newSysSet5);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取及格分数
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user