feat(login): bridge restored login options
This commit is contained in:
@@ -64,6 +64,50 @@ namespace Lskj.Main.Hosting
|
|||||||
get { return !SystemInfo.Instance.DisableRememberPassword; }
|
get { return !SystemInfo.Instance.DisableRememberPassword; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool AutoUpdate
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return SystemInfo.Instance.AutomaticUpdates ||
|
||||||
|
DBConfig.Instance.UpdateSet;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AutoUpdateEnabled
|
||||||
|
{
|
||||||
|
get { return !SystemInfo.Instance.AutomaticUpdates; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool SmartClient
|
||||||
|
{
|
||||||
|
get { return DBConfig.Instance.SmallClient; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool SmartClientEnabled
|
||||||
|
{
|
||||||
|
get { return !SystemInfo.Instance.HiddenIntelligentClient; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool SmartClientVisible
|
||||||
|
{
|
||||||
|
get { return !SystemInfo.Instance.HiddenIntelligentClient; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Notice
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return SystemInfo.Instance.AutoCheckedNotice ||
|
||||||
|
SystemInfo.Instance.StartMessageBox ||
|
||||||
|
DBConfig.Instance.NoticeClient;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool NoticeEnabled
|
||||||
|
{
|
||||||
|
get { return !SystemInfo.Instance.StartMessageBox; }
|
||||||
|
}
|
||||||
|
|
||||||
public DataTable LoadLedgers()
|
public DataTable LoadLedgers()
|
||||||
{
|
{
|
||||||
_ledgerTable = MainImpl.GetLedgerList() ?? new DataTable("Ledgers");
|
_ledgerTable = MainImpl.GetLedgerList() ?? new DataTable("Ledgers");
|
||||||
@@ -195,7 +239,11 @@ namespace Lskj.Main.Hosting
|
|||||||
public string Login(
|
public string Login(
|
||||||
string loginName,
|
string loginName,
|
||||||
string password,
|
string password,
|
||||||
bool rememberPassword)
|
bool rememberPassword,
|
||||||
|
bool forceLogin,
|
||||||
|
bool autoUpdate,
|
||||||
|
bool smartClient,
|
||||||
|
bool notice)
|
||||||
{
|
{
|
||||||
ERPInfo.Instance.LoginResult = false;
|
ERPInfo.Instance.LoginResult = false;
|
||||||
if (string.IsNullOrWhiteSpace(loginName))
|
if (string.IsNullOrWhiteSpace(loginName))
|
||||||
@@ -252,7 +300,10 @@ namespace Lskj.Main.Hosting
|
|||||||
return ResourceKeys.MacAddressError +
|
return ResourceKeys.MacAddressError +
|
||||||
",当前地址:" + ERPInfo.Instance.MacAddress;
|
",当前地址:" + ERPInfo.Instance.MacAddress;
|
||||||
|
|
||||||
int loginResult = MainImpl.Login(userId, password, false);
|
int loginResult = MainImpl.Login(
|
||||||
|
userId,
|
||||||
|
password,
|
||||||
|
forceLogin);
|
||||||
if (loginResult != 0)
|
if (loginResult != 0)
|
||||||
return LoginError(loginResult);
|
return LoginError(loginResult);
|
||||||
|
|
||||||
@@ -262,7 +313,10 @@ namespace Lskj.Main.Hosting
|
|||||||
loginAccount,
|
loginAccount,
|
||||||
loginName,
|
loginName,
|
||||||
password,
|
password,
|
||||||
rememberPassword);
|
rememberPassword,
|
||||||
|
autoUpdate,
|
||||||
|
smartClient,
|
||||||
|
notice);
|
||||||
ERPInfo.Instance.LoginResult = true;
|
ERPInfo.Instance.LoginResult = true;
|
||||||
LogUtil.WriteDebug("", "登录软件", "进入操作", "系统登录");
|
LogUtil.WriteDebug("", "登录软件", "进入操作", "系统登录");
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
@@ -300,7 +354,10 @@ namespace Lskj.Main.Hosting
|
|||||||
string loginAccount,
|
string loginAccount,
|
||||||
string enteredLoginName,
|
string enteredLoginName,
|
||||||
string password,
|
string password,
|
||||||
bool rememberPassword)
|
bool rememberPassword,
|
||||||
|
bool autoUpdate,
|
||||||
|
bool smartClient,
|
||||||
|
bool notice)
|
||||||
{
|
{
|
||||||
if (!MainImpl.HasExistsColumn("p_employeetab", "MacAdress"))
|
if (!MainImpl.HasExistsColumn("p_employeetab", "MacAdress"))
|
||||||
BaseImpl.ExecSqlValue("alter table p_employeetab add MacAdress varchar(100)");
|
BaseImpl.ExecSqlValue("alter table p_employeetab add MacAdress varchar(100)");
|
||||||
@@ -349,6 +406,9 @@ namespace Lskj.Main.Hosting
|
|||||||
DBConfig.Instance.LoginName = enteredLoginName;
|
DBConfig.Instance.LoginName = enteredLoginName;
|
||||||
DBConfig.Instance.NoticeUserID = userId;
|
DBConfig.Instance.NoticeUserID = userId;
|
||||||
DBConfig.Instance.NoticeUserName = userName;
|
DBConfig.Instance.NoticeUserName = userName;
|
||||||
|
DBConfig.Instance.UpdateSet = autoUpdate;
|
||||||
|
DBConfig.Instance.SmallClient = smartClient;
|
||||||
|
DBConfig.Instance.NoticeClient = notice;
|
||||||
DBConfig.Instance.DataBook = accountBook;
|
DBConfig.Instance.DataBook = accountBook;
|
||||||
DBConfig.Instance.WriteConfig();
|
DBConfig.Instance.WriteConfig();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user