SVN r280
SVN-Revision: r280
This commit is contained in:
+12
-28
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user