diff --git a/插件库/Lskj.Main/FrmConfig.cs b/插件库/Lskj.Main/FrmConfig.cs
index f33d18b..e334ebb 100644
--- a/插件库/Lskj.Main/FrmConfig.cs
+++ b/插件库/Lskj.Main/FrmConfig.cs
@@ -65,7 +65,7 @@ namespace Lskj.Main
try
{
DBConfig.Instance.ReadConfig(true);
- this.txtServerName.Text = string.IsNullOrWhiteSpace(DBConfig.Instance.ExternalNetworkAddress)? DBConfig.Instance.ServerName: DBConfig.Instance.ExternalNetworkAddress;
+ this.txtServerName.Text = DBConfig.Instance.ServerName;
this.txtServerNameInternal.Text = DBConfig.Instance.InternalNetworkAddress;
this.txtDBName.Text = DBConfig.Instance.DataBase;
@@ -197,32 +197,4 @@ namespace Lskj.Main
{
if (DBConfig.Instance.CreateConnection())
{
- if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection())) == 0)
- {
- MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
- return;
- }
- if (isSave)
- {
- DBConfig.Instance.WriteConfig();
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- else
- {
- MessageUtil.Show(ResourceKeys.ConnectSuccess);
- }
- }
- else
- {
- MessageUtil.Show(ResourceKeys.ConnectFault);
- }
- //IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "0");
- }
- catch (Exception)
- {
- MessageUtil.Show(ResourceKeys.ConnectFault);
- }
- }
- }
-}
+ if (Del
\ No newline at end of file
diff --git a/插件库/Lskj.Main/FrmConfig.resx b/插件库/Lskj.Main/FrmConfig.resx
index 92b9481..d3e8272 100644
--- a/插件库/Lskj.Main/FrmConfig.resx
+++ b/插件库/Lskj.Main/FrmConfig.resx
@@ -117,33 +117,9 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
True
-
- True
-
-
- True
-
-
- True
-
diff --git a/插件库/Lskj.Main/FrmLogin.cs b/插件库/Lskj.Main/FrmLogin.cs
index e4e8a11..2b05a16 100644
--- a/插件库/Lskj.Main/FrmLogin.cs
+++ b/插件库/Lskj.Main/FrmLogin.cs
@@ -268,7 +268,7 @@ namespace Lskj.Main
if (SystemInfo.Instance.DisplayUserCode)
{
- lueUserName.SourceSQL = string.Format("select EmployeeId UserId,LoginAccount UserCode,EmployeeName UserName, LoginAccount remark {0} from P_EmployeeTab WHERE sign=0 and UseFlag=1", arg);
+ lueUserName.SourceSQL = string.Format("select EmployeeId UserId,LoginAccount UserCode,EmployeeName UserName, LoginAccount 工号 {0} from P_EmployeeTab WHERE sign=0 and UseFlag=1", arg);
_userTable = MainImpl.GetEmployeeListNew();
}
else
@@ -278,17 +278,19 @@ namespace Lskj.Main
lueUserName.DataSource = _userTable;
- if (SystemInfo.Instance.DisplayUserCode)
- {
- GridColumn gridColumn = this.lueUserName._popup.GridViewObj.Columns.First(x => x.FieldName.Equals("remark"));
- if (gridColumn != null) gridColumn.Caption = "工号";
- }
+
lueUserName.AutoShowPopup = "1".Equals(BaseImpl.GetResult("SELECT LoginPopupFlag FROM P_SystemTab") + "");
DataRow[] rowItems = _userTable.Select(" UserName = '" + DBConfig.Instance.LoginName + "'");
+ DataRow[] rowItemsUserCode = _userTable.Select(" UserCode = '" + DBConfig.Instance.LoginName + "'");
if (rowItems != null && rowItems.Length > 0)
{
lueUserName.EditValue = rowItems[0][lueUserName.ValueField] + "";
StateFlushed();
+ }
+ else if (rowItemsUserCode != null && rowItemsUserCode.Length > 0)
+ {
+ lueUserName.Text = DBConfig.Instance.LoginName;
+ StateFlushed();
}
else if (_userTable.Columns.Contains("AD_Id") && !string.IsNullOrEmpty(DBConfig.Instance.LoginName))
{
@@ -644,7 +646,8 @@ namespace Lskj.Main
UserLookAndFeel.Default.SetSkinStyle(skinName);
if (!isAd)
{
- IniHelper.Write(DBConfig.Instance.ServerName + userName, AESUtil.Encrypt(chkRemPwd.Checked + "^" + password));
+ //2025-02-20 改成存输入的名字(工号),避免重名的问题
+ IniHelper.Write(DBConfig.Instance.ServerName + lueUserName.Text, AESUtil.Encrypt(chkRemPwd.Checked + "^" + password));
}
//设置登录人电话
string phone = MainImpl.GetUserPhone(userId);
@@ -658,7 +661,7 @@ namespace Lskj.Main
ERPInfo.Instance.LoginAccount = LoginAccount;
ERPInfo.Instance.InPassWord = password;
ERPInfo.Instance.PrimitiveBrowser = SystemInfo.Instance.PrimitiveBrowser;
- DBConfig.Instance.LoginName = isLoginByAd ? lueUserName.Text.Trim() : userName;
+ DBConfig.Instance.LoginName = isLoginByAd ? lueUserName.Text.Trim() : lueUserName.Text;
DBConfig.Instance.NoticeUserID = userId;
DBConfig.Instance.NoticeUserName = userName;
DBConfig.Instance.NoticeClient = chkNotice.Checked;
@@ -1743,23 +1746,4 @@ namespace Lskj.Main
{
if ("强制登录".Equals(item["中文"] + "")) this.chkLogin.Text = item[this.language.Text] + "";
if ("记住密码".Equals(item["中文"] + "")) this.chkRemPwd.Text = item[this.language.Text] + "";
- if ("自动升级".Equals(item["中文"] + "")) this.chkUpdate.Text = item[this.language.Text] + "";
- if ("智能客户端".Equals(item["中文"] + "")) this.chkClient.Text = item[this.language.Text] + "";
- if ("消息通知".Equals(item["中文"] + "")) this.chkNotice.Text = item[this.language.Text] + "";
-
- if (btnSetConfigText.Equals(item["中文"] + "")) this.btnSetConfig.Text = item[this.language.Text] + "";
-
- if ("更新时间".Equals(item["中文"] + ""))
- {
- string updateTimeStr = IniHelper.Read("ApplicationUpdateTime");
- string updateTime = string.Format("{0}:{1}", item[this.language.Text] + "", updateTimeStr);
- this.upDateTimeLab.Text = string.Format("{0}", updateTime);
- }
-
- }
-
- }
- }
- }
- }
-}
\ No newline at end of file
+
\ No newline at end of file