SVN r280
SVN-Revision: r280
This commit is contained in:
@@ -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
|
||||
@@ -117,33 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="groupBox1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="txtDBName.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="txtServerName.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="labelControl2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="labelControl1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="btnConnect.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="btnSave.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="btnExit.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
+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