SVN r1048
SVN-Revision: r1048
This commit is contained in:
@@ -247,13 +247,13 @@ namespace Lskj.Main.Control
|
|||||||
ContextMenuStrip headMenuStrip = new ContextMenuStrip();
|
ContextMenuStrip headMenuStrip = new ContextMenuStrip();
|
||||||
headMenuStrip.Opening += HeadMenuStripOpening;
|
headMenuStrip.Opening += HeadMenuStripOpening;
|
||||||
ToolStripMenuItem removeOtherItem = new ToolStripMenuItem();
|
ToolStripMenuItem removeOtherItem = new ToolStripMenuItem();
|
||||||
removeOtherItem.Text = "关闭其他";
|
removeOtherItem.Text = LanguageTranslation.Translatable ? LanguageTranslation.GetTranslatedText("关闭其他") : "关闭其他";
|
||||||
removeOtherItem.Click += new EventHandler(RemoveItemClick);
|
removeOtherItem.Click += new EventHandler(RemoveItemClick);
|
||||||
ToolStripMenuItem removeLeftItem = new ToolStripMenuItem();
|
ToolStripMenuItem removeLeftItem = new ToolStripMenuItem();
|
||||||
removeLeftItem.Text = "关闭左侧";
|
removeLeftItem.Text = LanguageTranslation.Translatable ? LanguageTranslation.GetTranslatedText("关闭左侧") : "关闭左侧";
|
||||||
removeLeftItem.Click += new EventHandler(RemoveItemClick);
|
removeLeftItem.Click += new EventHandler(RemoveItemClick);
|
||||||
ToolStripMenuItem removeRightItem = new ToolStripMenuItem();
|
ToolStripMenuItem removeRightItem = new ToolStripMenuItem();
|
||||||
removeRightItem.Text = "关闭右侧";
|
removeRightItem.Text = LanguageTranslation.Translatable ? LanguageTranslation.GetTranslatedText("关闭右侧") : "关闭右侧";
|
||||||
removeRightItem.Click += new EventHandler(RemoveItemClick);
|
removeRightItem.Click += new EventHandler(RemoveItemClick);
|
||||||
headMenuStrip.Items.Add(removeOtherItem);
|
headMenuStrip.Items.Add(removeOtherItem);
|
||||||
headMenuStrip.Items.Add(removeLeftItem);
|
headMenuStrip.Items.Add(removeLeftItem);
|
||||||
@@ -292,7 +292,7 @@ namespace Lskj.Main.Control
|
|||||||
this.pl_top_left.Visible = false;
|
this.pl_top_left.Visible = false;
|
||||||
this.menuMain.Visible = false;
|
this.menuMain.Visible = false;
|
||||||
this.lblSubTitle.Visible = false;
|
this.lblSubTitle.Visible = false;
|
||||||
this.toolStripLabel1.Text = "版本号:" + SystemInfo.Instance.Version;
|
this.toolStripLabel1.Text = LanguageTranslation.Translatable ? LanguageTranslation.GetTranslatedText("版本号") + ":" + SystemInfo.Instance.Version : "版本号:" + SystemInfo.Instance.Version;
|
||||||
this.SetDesktop();
|
this.SetDesktop();
|
||||||
this.SetFormObject();
|
this.SetFormObject();
|
||||||
this.SetAccounts();//设置账套
|
this.SetAccounts();//设置账套
|
||||||
@@ -455,11 +455,12 @@ namespace Lskj.Main.Control
|
|||||||
private void SetFormObject()
|
private void SetFormObject()
|
||||||
{
|
{
|
||||||
this.lbUserName.Text = ERPInfo.Instance.UserName;
|
this.lbUserName.Text = ERPInfo.Instance.UserName;
|
||||||
this.tsmi_userName.Text = "用户名:" + ERPInfo.Instance.UserName;
|
|
||||||
this.tsmi_account_book.Text = "账套:" + ERPInfo.Instance.AccountBook;
|
this.tsmi_userName.Text = LanguageTranslation.Translatable ? LanguageTranslation.GetTranslatedText("用户名") + ":" + ERPInfo.Instance.UserName : "用户名:" + ERPInfo.Instance.UserName;
|
||||||
|
this.tsmi_account_book.Text = LanguageTranslation.Translatable ? LanguageTranslation.GetTranslatedText("账套") + ":" + ERPInfo.Instance.AccountBook : "账套:" + ERPInfo.Instance.AccountBook;
|
||||||
this.tsmi_version.Text = string.Format("Version:{0}", Assembly.GetExecutingAssembly().GetName().Version + "");
|
this.tsmi_version.Text = string.Format("Version:{0}", Assembly.GetExecutingAssembly().GetName().Version + "");
|
||||||
string updateTime = IniHelper.Read("ApplicationUpdateTime");
|
string updateTime = IniHelper.Read("ApplicationUpdateTime");
|
||||||
this.tsmi_upTime.Text = string.Format("更新时间:{0}", updateTime);
|
this.tsmi_upTime.Text = LanguageTranslation.Translatable ? LanguageTranslation.GetTranslatedText("更新时间") + ":" + updateTime : "更新时间:" + updateTime;
|
||||||
//this.lblSubTitle.Text = !string.IsNullOrEmpty(ERPInfo.Instance.SubSysName) ? SystemInfo.Instance.ClientName + "-" + ERPInfo.Instance.SubSysName : SystemInfo.Instance.ClientName;
|
//this.lblSubTitle.Text = !string.IsNullOrEmpty(ERPInfo.Instance.SubSysName) ? SystemInfo.Instance.ClientName + "-" + ERPInfo.Instance.SubSysName : SystemInfo.Instance.ClientName;
|
||||||
this.lblSubTitle.Text = (!string.IsNullOrEmpty(ERPInfo.Instance.SubSysName) && SystemInfo.Instance.ShowSubSysName) ? SystemInfo.Instance.ClientName + "-" + ERPInfo.Instance.SubSysName : SystemInfo.Instance.ClientName;
|
this.lblSubTitle.Text = (!string.IsNullOrEmpty(ERPInfo.Instance.SubSysName) && SystemInfo.Instance.ShowSubSysName) ? SystemInfo.Instance.ClientName + "-" + ERPInfo.Instance.SubSysName : SystemInfo.Instance.ClientName;
|
||||||
|
|
||||||
@@ -470,6 +471,16 @@ namespace Lskj.Main.Control
|
|||||||
this.menuMain.Visible = true;
|
this.menuMain.Visible = true;
|
||||||
this.lblSubTitle.Visible = SystemInfo.Instance.HideSubtitle ? false : true;
|
this.lblSubTitle.Visible = SystemInfo.Instance.HideSubtitle ? false : true;
|
||||||
this.ResetPanelWidth();
|
this.ResetPanelWidth();
|
||||||
|
|
||||||
|
if (LanguageTranslation.Translatable)
|
||||||
|
{
|
||||||
|
foreach (XtraTabPage page in tabMain.TabPages)
|
||||||
|
{
|
||||||
|
string text = page.Text;
|
||||||
|
text = LanguageTranslation.GetTranslatedText(text.Trim());
|
||||||
|
if (!text.Equals(page.Text.Trim())) page.Text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>说明:子系统快捷窗口</para>
|
/// <para>说明:子系统快捷窗口</para>
|
||||||
@@ -889,7 +900,7 @@ namespace Lskj.Main.Control
|
|||||||
string menuCaption = item["menucaption"] + "";
|
string menuCaption = item["menucaption"] + "";
|
||||||
string menuid = item["menuid"] + "";
|
string menuid = item["menuid"] + "";
|
||||||
string menuposition = item.Table.Columns.Contains("menuposition") ? item["menuposition"] + "" : "0";
|
string menuposition = item.Table.Columns.Contains("menuposition") ? item["menuposition"] + "" : "0";
|
||||||
if (menuCaption.Equals(SystemInfo.Instance.SplitBar)) continue;
|
if (!string.IsNullOrWhiteSpace(SystemInfo.Instance.SplitBar) && menuCaption.StartsWith(SystemInfo.Instance.SplitBar)) continue;
|
||||||
// 加载左侧菜单
|
// 加载左侧菜单
|
||||||
if (menuStruct.Length == 2)
|
if (menuStruct.Length == 2)
|
||||||
{
|
{
|
||||||
@@ -937,8 +948,8 @@ namespace Lskj.Main.Control
|
|||||||
#region 添加右侧菜单模块
|
#region 添加右侧菜单模块
|
||||||
if (this._allMenus.Columns.Contains("menuposition") && (SystemInfo.Instance.IsOpenWork || SystemInfo.Instance.ShowGallerysFromMenu) && !SystemInfo.Instance.HideGallerys)
|
if (this._allMenus.Columns.Contains("menuposition") && (SystemInfo.Instance.IsOpenWork || SystemInfo.Instance.ShowGallerysFromMenu) && !SystemInfo.Instance.HideGallerys)
|
||||||
{
|
{
|
||||||
List<DataRow> layoutTopDataRows = rows.Where(n => (n["menuposition"] + "").Equals("1") && (n["menustruct"] + "").Length == 4 && (n["menustruct"] + "").Substring(0, 2).Equals(menuStruct) && !(n["menucaption"] + "").Equals(SystemInfo.Instance.SplitBar)).ToList();
|
List<DataRow> layoutTopDataRows = rows.Where(n => (n["menuposition"] + "").Equals("1") && (n["menustruct"] + "").Length == 4 && (n["menustruct"] + "").Substring(0, 2).Equals(menuStruct) && !(!string.IsNullOrWhiteSpace(SystemInfo.Instance.SplitBar) && (n["menucaption"] + "").StartsWith(SystemInfo.Instance.SplitBar))).ToList();
|
||||||
List<DataRow> layoutBotDataRows = rows.Where(n => (n["menuposition"] + "").Equals("2") && (n["menustruct"] + "").Length == 4 && (n["menustruct"] + "").Substring(0, 2).Equals(menuStruct) && !(n["menucaption"] + "").Equals(SystemInfo.Instance.SplitBar)).ToList();
|
List<DataRow> layoutBotDataRows = rows.Where(n => (n["menuposition"] + "").Equals("2") && (n["menustruct"] + "").Length == 4 && (n["menustruct"] + "").Substring(0, 2).Equals(menuStruct) && !(!string.IsNullOrWhiteSpace(SystemInfo.Instance.SplitBar) && (n["menucaption"] + "").StartsWith(SystemInfo.Instance.SplitBar))).ToList();
|
||||||
TableLayoutPanel topLayoutPanel = new TableLayoutPanel();
|
TableLayoutPanel topLayoutPanel = new TableLayoutPanel();
|
||||||
topLayoutPanel.Dock = DockStyle.Fill;
|
topLayoutPanel.Dock = DockStyle.Fill;
|
||||||
topLayoutPanel.RowCount = layoutTopDataRows.Count() + 1;
|
topLayoutPanel.RowCount = layoutTopDataRows.Count() + 1;
|
||||||
@@ -1034,11 +1045,11 @@ namespace Lskj.Main.Control
|
|||||||
List<DataRow> groupDataRows = new List<DataRow>();
|
List<DataRow> groupDataRows = new List<DataRow>();
|
||||||
if (this._allMenus.Columns.Contains("menuposition"))
|
if (this._allMenus.Columns.Contains("menuposition"))
|
||||||
{
|
{
|
||||||
groupDataRows = rows.Where(n => (n["menuposition"] + "").Equals("0") && (n["menustruct"] + "").Length == 4 && (n["menustruct"] + "").Substring(0, 2).Equals(menuStruct) && !(n["menucaption"] + "").Equals(SystemInfo.Instance.SplitBar)).ToList();
|
groupDataRows = rows.Where(n => (n["menuposition"] + "").Equals("0") && (n["menustruct"] + "").Length == 4 && (n["menustruct"] + "").Substring(0, 2).Equals(menuStruct) && !(!string.IsNullOrEmpty(SystemInfo.Instance.SplitBar) && (n["menucaption"] + "").StartsWith(SystemInfo.Instance.SplitBar))).ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
groupDataRows = rows.Where(n => (n["menustruct"] + "").Length == 4 && (n["menustruct"] + "").Substring(0, 2).Equals(menuStruct) && !(n["menucaption"] + "").Equals(SystemInfo.Instance.SplitBar)).ToList();
|
groupDataRows = rows.Where(n => (n["menustruct"] + "").Length == 4 && (n["menustruct"] + "").Substring(0, 2).Equals(menuStruct) && !(!string.IsNullOrEmpty(SystemInfo.Instance.SplitBar) && (n["menucaption"] + "").StartsWith(SystemInfo.Instance.SplitBar))).ToList();
|
||||||
}
|
}
|
||||||
foreach (DataRow dataRow in groupDataRows)
|
foreach (DataRow dataRow in groupDataRows)
|
||||||
{
|
{
|
||||||
@@ -1697,7 +1708,7 @@ namespace Lskj.Main.Control
|
|||||||
string menuCaption = row["MenuCaption"] + "";
|
string menuCaption = row["MenuCaption"] + "";
|
||||||
ToolStripMenuItem subItem = new ToolStripMenuItem(menuCaption);
|
ToolStripMenuItem subItem = new ToolStripMenuItem(menuCaption);
|
||||||
subItem.Font = new Font("微软雅黑", 10);
|
subItem.Font = new Font("微软雅黑", 10);
|
||||||
if (menuCaption.Equals(SystemInfo.Instance.SplitBar)) subItem.Enabled = false;
|
if (!string.IsNullOrEmpty(SystemInfo.Instance.SplitBar) && menuCaption.StartsWith(SystemInfo.Instance.SplitBar)) subItem.Enabled = false;
|
||||||
// 功能模块
|
// 功能模块
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1718,7 +1729,7 @@ namespace Lskj.Main.Control
|
|||||||
childItem.Text = child["MenuCaption"] + "";
|
childItem.Text = child["MenuCaption"] + "";
|
||||||
childItem.Font = new Font("微软雅黑", 10);
|
childItem.Font = new Font("微软雅黑", 10);
|
||||||
childItem.Tag = new string[] { child["DllFileName"] + "", child["PurviewId"] + "", child["MenuId"] + "", child["UrlParams"] + "", subSysId + "", child["MenuCaption"] + "" };
|
childItem.Tag = new string[] { child["DllFileName"] + "", child["PurviewId"] + "", child["MenuId"] + "", child["UrlParams"] + "", subSysId + "", child["MenuCaption"] + "" };
|
||||||
if (!childItem.Text.Equals(SystemInfo.Instance.SplitBar))
|
if (!(!string.IsNullOrEmpty(SystemInfo.Instance.SplitBar) && childItem.Text.StartsWith(SystemInfo.Instance.SplitBar)))
|
||||||
{
|
{
|
||||||
childItem.Click += OnItemClick; ;
|
childItem.Click += OnItemClick; ;
|
||||||
}
|
}
|
||||||
@@ -3525,7 +3536,7 @@ namespace Lskj.Main.Control
|
|||||||
{
|
{
|
||||||
string menuId = lueUserName.EditValue;
|
string menuId = lueUserName.EditValue;
|
||||||
|
|
||||||
if (lueUserName._popup.GridViewObj.GetFocusedDataRow()==null)
|
if (lueUserName._popup.GridViewObj.GetFocusedDataRow() == null)
|
||||||
{
|
{
|
||||||
menuId = "";
|
menuId = "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,6 +233,11 @@ namespace Lskj.Main
|
|||||||
DBConfig.Instance.Connection = Connection;
|
DBConfig.Instance.Connection = Connection;
|
||||||
if (DBConfig.Instance.CreateConnection(Connection))
|
if (DBConfig.Instance.CreateConnection(Connection))
|
||||||
{
|
{
|
||||||
|
if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection(DBConfig.Instance.dephiConnection))) == 0)
|
||||||
|
{
|
||||||
|
MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isSave)
|
if (isSave)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(this.txtZTName.Text))
|
if (!string.IsNullOrEmpty(this.txtZTName.Text))
|
||||||
@@ -246,34 +251,4 @@ namespace Lskj.Main
|
|||||||
DBConfig.Instance.WriteConfig("LocalLastIP", this.txtIP.Text);
|
DBConfig.Instance.WriteConfig("LocalLastIP", this.txtIP.Text);
|
||||||
DBConfig.Instance.WriteConfig("LocalLastPort", this.txtPort.Text);
|
DBConfig.Instance.WriteConfig("LocalLastPort", this.txtPort.Text);
|
||||||
DBConfig.Instance.WriteConfig("LocalLastPortName", this.txtZTName.Text);
|
DBConfig.Instance.WriteConfig("LocalLastPortName", this.txtZTName.Text);
|
||||||
this.DialogResult = DialogResult.OK;
|
t
|
||||||
this.Close();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageUtil.Show("请设置账套名!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageUtil.Show(ResourceKeys.ConnectSuccess);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageUtil.Show(ResourceKeys.ConnectFault);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageUtil.Show(ResourceKeys.ConnectFault);
|
|
||||||
}
|
|
||||||
//IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "1");
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
MessageUtil.Show(ResourceKeys.ConnectFault);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -71,6 +71,13 @@ namespace Lskj.Main
|
|||||||
if (DBConfig.Instance.CreateConnection(Connection))
|
if (DBConfig.Instance.CreateConnection(Connection))
|
||||||
{
|
{
|
||||||
DBConfig.Instance.Connection = Connection;
|
DBConfig.Instance.Connection = Connection;
|
||||||
|
|
||||||
|
if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection(DBConfig.Instance.dephiConnection))) == 0)
|
||||||
|
{
|
||||||
|
MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "1");
|
IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "1");
|
||||||
this.Close();
|
this.Close();
|
||||||
|
|||||||
+15
-30
@@ -444,6 +444,7 @@ namespace Lskj.Main
|
|||||||
string userName = lueUserName.Text.Trim();
|
string userName = lueUserName.Text.Trim();
|
||||||
string password = txtPassword.Text.Trim();
|
string password = txtPassword.Text.Trim();
|
||||||
string LoginAccount = string.Empty;
|
string LoginAccount = string.Empty;
|
||||||
|
string ErrorLogText= string.Empty;//日志记录信息
|
||||||
// 设置登录用户信息
|
// 设置登录用户信息
|
||||||
bool isConstraint = chkLogin.Checked;
|
bool isConstraint = chkLogin.Checked;
|
||||||
if (string.IsNullOrWhiteSpace(userName))
|
if (string.IsNullOrWhiteSpace(userName))
|
||||||
@@ -677,7 +678,8 @@ namespace Lskj.Main
|
|||||||
|
|
||||||
ERPInfo.Instance.LanguageName = this.language.Text;
|
ERPInfo.Instance.LanguageName = this.language.Text;
|
||||||
LanguageTranslation.GetLanguageComparisonTable();//获取翻译表数据
|
LanguageTranslation.GetLanguageComparisonTable();//获取翻译表数据
|
||||||
Localizer.Active = new XtraLocalizer();
|
if (!string.IsNullOrWhiteSpace(ERPInfo.Instance.LanguageName)&& !ERPInfo.Instance.LanguageName.Equals("中文"))Localizer.Active = new XtraLocalizer();
|
||||||
|
|
||||||
|
|
||||||
this.SetDelphiDllParams(); // 设置调用delphi参数
|
this.SetDelphiDllParams(); // 设置调用delphi参数
|
||||||
|
|
||||||
@@ -725,6 +727,8 @@ namespace Lskj.Main
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1: // 密码不正确
|
case 1: // 密码不正确
|
||||||
|
ErrorLogText = string.Format("登录用户Id:{0}\r\n登录用户名称:{1}\r\n输入密码:{2}", userId, userName, password);
|
||||||
|
LogUtil.WriteDebug("", "登录失败", ErrorLogText, "");
|
||||||
MessageUtil.Show(ResourceKeys.NameOrPasswordError);
|
MessageUtil.Show(ResourceKeys.NameOrPasswordError);
|
||||||
break;
|
break;
|
||||||
case 2: // 已有此用户登录
|
case 2: // 已有此用户登录
|
||||||
@@ -735,6 +739,8 @@ namespace Lskj.Main
|
|||||||
break;
|
break;
|
||||||
case -1: // 登录失败
|
case -1: // 登录失败
|
||||||
default:
|
default:
|
||||||
|
ErrorLogText = string.Format("登录用户Id:{0}\r\n登录用户名称:{1}\r\n输入密码:{2}", userId, userName, password);
|
||||||
|
LogUtil.WriteDebug("", "登录失败", ErrorLogText, "");
|
||||||
MessageUtil.Show(ResourceKeys.LoginFault);
|
MessageUtil.Show(ResourceKeys.LoginFault);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1070,6 +1076,10 @@ namespace Lskj.Main
|
|||||||
this.chkUpdate.Checked = DBConfig.Instance.UpdateSet;
|
this.chkUpdate.Checked = DBConfig.Instance.UpdateSet;
|
||||||
this.chkClient.Checked = DBConfig.Instance.SmallClient;
|
this.chkClient.Checked = DBConfig.Instance.SmallClient;
|
||||||
this.chkNotice.Checked = DBConfig.Instance.NoticeClient;
|
this.chkNotice.Checked = DBConfig.Instance.NoticeClient;
|
||||||
|
if (SystemInfo.Instance.AllowForgetPwd)
|
||||||
|
{
|
||||||
|
this.forgetPwd.Visible = true;//允许修改密码
|
||||||
|
}
|
||||||
if (SystemInfo.Instance.AutomaticUpdates)
|
if (SystemInfo.Instance.AutomaticUpdates)
|
||||||
{
|
{
|
||||||
this.chkUpdate.Checked = true;
|
this.chkUpdate.Checked = true;
|
||||||
@@ -1090,7 +1100,7 @@ namespace Lskj.Main
|
|||||||
this.chkRemPwd.Enabled = false;//记住密码禁止修改
|
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>();
|
List<System.Windows.Forms.Control> controls = new List<System.Windows.Forms.Control>();
|
||||||
//隐藏 智能客户端
|
//隐藏 智能客户端
|
||||||
@@ -1120,7 +1130,7 @@ namespace Lskj.Main
|
|||||||
if (item.Visible)
|
if (item.Visible)
|
||||||
{
|
{
|
||||||
item.Location = new Point(X, item.Location.Y);
|
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);
|
if (item is PictureBox) this.btnSetConfig.Location = new Point(item.Location.X + item.Width, this.btnSetConfig.Location.Y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1659,7 +1669,7 @@ namespace Lskj.Main
|
|||||||
if (chkRemPwd.Checked)
|
if (chkRemPwd.Checked)
|
||||||
{
|
{
|
||||||
this.txtPassword.Text = PwdState[1];
|
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;
|
isClear = false;
|
||||||
this.lueUserName.Text = UserName;
|
this.lueUserName.Text = UserName;
|
||||||
this.txtPassword.Focus();
|
this.txtPassword.Focus();
|
||||||
@@ -1821,29 +1831,4 @@ namespace Lskj.Main
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 忘记密码点击时
|
/// 忘记密码点击时
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param n
|
||||||
/// <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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -101,41 +101,34 @@ namespace Lskj.Main
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int result = MainImpl.ForceUpdatePassword(UserId, pass_after);
|
if (BaseImpl.HasExistsStoredProcedure("pr_sytemchangepsw"))
|
||||||
switch (result)
|
|
||||||
{
|
{
|
||||||
case 0: // 用户不存在
|
string tipMsg = string.Empty;
|
||||||
MessageUtil.Show(ResourceKeys.UserNotFound);
|
int result = MainImpl.ChangePassword(UserId, pass_after, out tipMsg);
|
||||||
break;
|
switch (result)
|
||||||
case 1:
|
{
|
||||||
MessageUtil.Show(ResourceKeys.PasswordUpdateSuccess);
|
case 1: // 修改成功
|
||||||
ERPInfo.Instance.Password = SHAHelper.EncryptPassword(pass_after);
|
MessageUtil.Show(ResourceKeys.PasswordUpdateSuccess);
|
||||||
this.DialogResult = DialogResult.OK;
|
ERPInfo.Instance.Password = SHAHelper.EncryptPassword(pass_after);
|
||||||
break;
|
MainImpl.RecordPassword(pass_after);
|
||||||
|
this.DialogResult = DialogResult.OK;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
MessageUtil.Show("修改失败:" + tipMsg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
catch (Exception ex)
|
{
|
||||||
{
|
int result = MainImpl.ForceUpdatePassword(UserId, pass_after);
|
||||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
switch (result)
|
||||||
MessageUtil.Show("修改密码出错!" + Message);
|
{
|
||||||
}
|
case 0: // 用户不存在
|
||||||
|
MessageUtil.Show(ResourceKeys.UserNotFound);
|
||||||
}
|
break;
|
||||||
|
case 1:
|
||||||
/// <summary>
|
MessageUtil.Show(ResourceKeys.PasswordUpdateSuccess);
|
||||||
/// <para>说明:取消修改</para>
|
ERPInfo.Instance.Password = SHAHelper.EncryptPassword(pass_after);
|
||||||
/// <para>创建人:龚宇超</para>
|
ERPInfo.Instance.InPassWord = pass_after;
|
||||||
/// <para>创建日期:2017-08-12 </para>
|
MainImpl.RecordPassword(pass_after);
|
||||||
/// <para>修改人:</para>
|
this.
|
||||||
/// <para>修改日期:</para>
|
|
||||||
/// <para>修改备注:</para>
|
|
||||||
/// <para>版本:1.0</para>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender">The source of the event.</param>
|
|
||||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
|
||||||
private void btnExit_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
this.Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -86,54 +86,46 @@ namespace Lskj.Main
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int result = MainImpl.UpdatePassword(ERPInfo.Instance.UserId, beforePass, afterPass);
|
if (BaseImpl.HasExistsStoredProcedure("pr_sytemchangepsw"))
|
||||||
switch (result)
|
|
||||||
{
|
{
|
||||||
case 0: // 用户不存在
|
string tipMsg = string.Empty;
|
||||||
MessageUtil.Show(ResourceKeys.UserNotFound);
|
int result = MainImpl.ChangePassword(ERPInfo.Instance.UserId, afterPass, out tipMsg);
|
||||||
break;
|
switch (result)
|
||||||
case 1: // 修改成功
|
{
|
||||||
MessageUtil.Show(ResourceKeys.PasswordUpdateSuccess);
|
case 1: // 修改成功
|
||||||
if (SystemInfo.Instance.UpdPwdAllSystem)
|
MessageUtil.Show(ResourceKeys.PasswordUpdateSuccess);
|
||||||
{
|
MainImpl.RecordPassword(afterPass);
|
||||||
if (MainImpl.UpdatePasswordAllSubsystem(ERPInfo.Instance.UserId, afterPass))
|
Manager.ReLogin();
|
||||||
{
|
break;
|
||||||
MessageUtil.Show("用户对应账套密码修改成功");
|
default:
|
||||||
}
|
MessageUtil.Show("修改失败:"+ tipMsg);
|
||||||
else
|
break;
|
||||||
{
|
}
|
||||||
MessageUtil.Show("用户对应账套密码修改失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Manager.StartForm();
|
|
||||||
break;
|
|
||||||
case 2: // 旧密码不正确.
|
|
||||||
MessageUtil.Show(ResourceKeys.OldPasswordFault);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
catch (Exception ex)
|
{
|
||||||
{
|
int result = MainImpl.UpdatePassword(ERPInfo.Instance.UserId, beforePass, afterPass);
|
||||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
switch (result)
|
||||||
MessageUtil.Show("修改密码出错!" + Message);
|
{
|
||||||
}
|
case 0: // 用户不存在
|
||||||
|
MessageUtil.Show(ResourceKeys.UserNotFound);
|
||||||
}
|
break;
|
||||||
|
case 1: // 修改成功
|
||||||
/// <summary>
|
MessageUtil.Show(ResourceKeys.PasswordUpdateSuccess);
|
||||||
/// <para>说明:退出修改</para>
|
if (SystemInfo.Instance.UpdPwdAllSystem)
|
||||||
/// <para>创建人:龚宇超</para>
|
{
|
||||||
/// <para>创建日期:2017-08-15 </para>
|
if (MainImpl.UpdatePasswordAllSubsystem(ERPInfo.Instance.UserId, afterPass))
|
||||||
/// <para>修改人:</para>
|
{
|
||||||
/// <para>修改日期:</para>
|
MessageUtil.Show("用户对应账套密码修改成功");
|
||||||
/// <para>修改备注:</para>
|
}
|
||||||
/// <para>版本:1.0</para>
|
else
|
||||||
/// </summary>
|
{
|
||||||
/// <param name="sender">The source of the event.</param>
|
MessageUtil.Show("用户对应账套密码修改失败");
|
||||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
}
|
||||||
private void btnExit_Click(object sender, EventArgs e)
|
}
|
||||||
{
|
MainImpl.RecordPassword(afterPass);
|
||||||
this.Close();
|
Manager.ReLogin();
|
||||||
}
|
//Manager.ReStartMain(true);
|
||||||
}
|
break;
|
||||||
}
|
case 2: // 旧密码不正确.
|
||||||
|
Messag
|
||||||
@@ -1014,7 +1014,7 @@ namespace Lskj.Main.Model
|
|||||||
bool hasEn = false;
|
bool hasEn = false;
|
||||||
if (urlParams.Length > 1)
|
if (urlParams.Length > 1)
|
||||||
{
|
{
|
||||||
string[] queryParams = urlParams[1].Split('&');
|
string[] queryParams = string.Join("?", urlParams.Skip(1)).Split('&');
|
||||||
List<string> qpLS = new List<string>();
|
List<string> qpLS = new List<string>();
|
||||||
Hashtable pms = new Hashtable();
|
Hashtable pms = new Hashtable();
|
||||||
hasEn = queryParams.Any(str => str.Trim().StartsWith(enKey, StringComparison.OrdinalIgnoreCase));
|
hasEn = queryParams.Any(str => str.Trim().StartsWith(enKey, StringComparison.OrdinalIgnoreCase));
|
||||||
@@ -1025,9 +1025,24 @@ namespace Lskj.Main.Model
|
|||||||
{
|
{
|
||||||
if (hasEn && eqParams[0].ToLower() == enKey)
|
if (hasEn && eqParams[0].ToLower() == enKey)
|
||||||
{
|
{
|
||||||
enVal = eqParams[1];
|
enVal = string.Join("=", eqParams.Skip(1));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (hasEn || eqParams[0].ToLower() == "username" || eqParams[0].ToLower() == "password")
|
if (hasEn || eqParams[0].ToLower() == "username" || eqParams[0].ToLower() == "password")
|
||||||
{
|
{
|
||||||
pms.Add(eqParams[0
|
pms.Add(eqParams[0], string.Join("=", eqParams.Skip(1)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qpLS.Add(string.Format("{0}={1}", eqParams[0], HttpUtility.UrlEncode(HttpUtility.UrlDecode(string.Join("=", eqParams.Skip(1)))).Replace("%5c", "/").Replace("%2f", "/").Replace("//", "/")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pms.Count > 0)
|
||||||
|
{
|
||||||
|
DateTime dateTime = DateTime.Now.AddDays(1);
|
||||||
|
DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||||
|
|
||||||
Reference in New Issue
Block a user