SVN r1048
SVN-Revision: r1048
This commit is contained in:
+17
-32
@@ -444,6 +444,7 @@ namespace Lskj.Main
|
||||
string userName = lueUserName.Text.Trim();
|
||||
string password = txtPassword.Text.Trim();
|
||||
string LoginAccount = string.Empty;
|
||||
string ErrorLogText= string.Empty;//日志记录信息
|
||||
// 设置登录用户信息
|
||||
bool isConstraint = chkLogin.Checked;
|
||||
if (string.IsNullOrWhiteSpace(userName))
|
||||
@@ -677,7 +678,8 @@ namespace Lskj.Main
|
||||
|
||||
ERPInfo.Instance.LanguageName = this.language.Text;
|
||||
LanguageTranslation.GetLanguageComparisonTable();//获取翻译表数据
|
||||
Localizer.Active = new XtraLocalizer();
|
||||
if (!string.IsNullOrWhiteSpace(ERPInfo.Instance.LanguageName)&& !ERPInfo.Instance.LanguageName.Equals("中文"))Localizer.Active = new XtraLocalizer();
|
||||
|
||||
|
||||
this.SetDelphiDllParams(); // 设置调用delphi参数
|
||||
|
||||
@@ -725,6 +727,8 @@ namespace Lskj.Main
|
||||
}
|
||||
break;
|
||||
case 1: // 密码不正确
|
||||
ErrorLogText = string.Format("登录用户Id:{0}\r\n登录用户名称:{1}\r\n输入密码:{2}", userId, userName, password);
|
||||
LogUtil.WriteDebug("", "登录失败", ErrorLogText, "");
|
||||
MessageUtil.Show(ResourceKeys.NameOrPasswordError);
|
||||
break;
|
||||
case 2: // 已有此用户登录
|
||||
@@ -735,6 +739,8 @@ namespace Lskj.Main
|
||||
break;
|
||||
case -1: // 登录失败
|
||||
default:
|
||||
ErrorLogText = string.Format("登录用户Id:{0}\r\n登录用户名称:{1}\r\n输入密码:{2}", userId, userName, password);
|
||||
LogUtil.WriteDebug("", "登录失败", ErrorLogText, "");
|
||||
MessageUtil.Show(ResourceKeys.LoginFault);
|
||||
break;
|
||||
}
|
||||
@@ -1070,6 +1076,10 @@ namespace Lskj.Main
|
||||
this.chkUpdate.Checked = DBConfig.Instance.UpdateSet;
|
||||
this.chkClient.Checked = DBConfig.Instance.SmallClient;
|
||||
this.chkNotice.Checked = DBConfig.Instance.NoticeClient;
|
||||
if (SystemInfo.Instance.AllowForgetPwd)
|
||||
{
|
||||
this.forgetPwd.Visible = true;//允许修改密码
|
||||
}
|
||||
if (SystemInfo.Instance.AutomaticUpdates)
|
||||
{
|
||||
this.chkUpdate.Checked = true;
|
||||
@@ -1090,7 +1100,7 @@ namespace Lskj.Main
|
||||
this.chkRemPwd.Enabled = false;//记住密码禁止修改
|
||||
}
|
||||
|
||||
if (SystemInfo.Instance.HiddenIntelligentClient|| SystemInfo.Instance.HiddenNotification || SystemInfo.Instance.HiddenServerSetting)
|
||||
if (SystemInfo.Instance.HiddenIntelligentClient || SystemInfo.Instance.HiddenNotification || SystemInfo.Instance.HiddenServerSetting)
|
||||
{
|
||||
List<System.Windows.Forms.Control> controls = new List<System.Windows.Forms.Control>();
|
||||
//隐藏 智能客户端
|
||||
@@ -1117,15 +1127,15 @@ namespace Lskj.Main
|
||||
controls.Add(this.pictureBox1);
|
||||
foreach (System.Windows.Forms.Control item in controls)
|
||||
{
|
||||
if (item.Visible)
|
||||
if (item.Visible)
|
||||
{
|
||||
item.Location = new Point(X, item.Location.Y);
|
||||
X= item.Location.X + item.Width + 10;
|
||||
X = item.Location.X + item.Width + 10;
|
||||
if (item is PictureBox) this.btnSetConfig.Location = new Point(item.Location.X + item.Width, this.btnSetConfig.Location.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.BackgroundImage = BitMapHelper.getBitmap(BitMapEnum.loginbg);
|
||||
this.lblCopyright.Text = string.IsNullOrEmpty(SystemInfo.Instance.CopyRight) ? this.lblCopyright.Text : SystemInfo.Instance.CopyRight;
|
||||
@@ -1659,7 +1669,7 @@ namespace Lskj.Main
|
||||
if (chkRemPwd.Checked)
|
||||
{
|
||||
this.txtPassword.Text = PwdState[1];
|
||||
if(PwdState.Count() > 2) this.txtPassword.Text=string.Join("^", PwdState.Skip(1));
|
||||
if (PwdState.Count() > 2) this.txtPassword.Text = string.Join("^", PwdState.Skip(1));
|
||||
isClear = false;
|
||||
this.lueUserName.Text = UserName;
|
||||
this.txtPassword.Focus();
|
||||
@@ -1821,29 +1831,4 @@ namespace Lskj.Main
|
||||
/// <summary>
|
||||
/// 忘记密码点击时
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnForgetPwdClick(object sender, EventArgs e)
|
||||
{
|
||||
using (BaseForm baseForm = new BaseForm())
|
||||
{
|
||||
FrmWebBrowser frmWebBrowser = new FrmWebBrowser();
|
||||
frmWebBrowser.Dock = DockStyle.Fill;
|
||||
baseForm.Controls.Add(frmWebBrowser);
|
||||
baseForm.Text = "忘记密码";
|
||||
baseForm.Size = new Size(1000, 600);
|
||||
string forgetPwdUrl = "";
|
||||
if (SystemInfo.Instance.OAUrl.EndsWith("/"))
|
||||
{
|
||||
forgetPwdUrl = $"{SystemInfo.Instance.OAUrl}lserp_v8/index.html?verify=1";
|
||||
}
|
||||
else
|
||||
{
|
||||
forgetPwdUrl = $"{SystemInfo.Instance.OAUrl}/lserp_v8/index.html?verify=1";
|
||||
}
|
||||
frmWebBrowser.FrmLoad(forgetPwdUrl, 1, false);
|
||||
baseForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <param n
|
||||
Reference in New Issue
Block a user