SVN r821
SVN-Revision: r821
This commit is contained in:
@@ -340,7 +340,7 @@ namespace Lskj.Main.Control
|
||||
|
||||
ERPInfo.Instance.PageControl = this.tabMain;
|
||||
ERPInfo.Instance.ModuleForms = Manager.ModuleForms;
|
||||
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 || SystemInfo.Instance.DesktopFormatShowGallerys))
|
||||
{
|
||||
this.lblShortcutset.DoubleClick += OnShortCutDoubleClick;
|
||||
this.lblReportcutset.DoubleClick += OnShortCutDoubleClick;
|
||||
@@ -509,6 +509,13 @@ namespace Lskj.Main.Control
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SystemInfo.Instance.AccountSwitchingRestrictions>0&& SystemInfo.Instance.AccountSwitchingRestrictions<int.Parse(ERPInfo.Instance.UserId))
|
||||
{
|
||||
this.button4.Visible = false;
|
||||
this.label1.Visible = false;
|
||||
HiddenAccountSet = true;
|
||||
}
|
||||
|
||||
//添加子系统快捷窗口
|
||||
_accountsItemForm = new SubItemForm();
|
||||
//this.Controls.Add(this._accountsItemForm);
|
||||
@@ -4239,4 +4246,41 @@ namespace Lskj.Main.Control
|
||||
{
|
||||
bottomLayoutPanel.RowStyles[i].Height = 25;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断是不是数值
|
||||
/// </summary>
|
||||
/// <param name="oText"></param>
|
||||
/// <returns></returns>
|
||||
private bool IsNumberic(string oText)
|
||||
{
|
||||
try
|
||||
{
|
||||
int var1 = Convert.ToInt32(oText);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#region 加密狗验证
|
||||
/// <summary>
|
||||
/// 加密狗验证
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private void DogVerify()
|
||||
{
|
||||
int[] keyHandles = ERPInfo.Instance.keyHandles = new int[8];
|
||||
int[] keyNumber = ERPInfo.Instance.keyNumber = new int[8];
|
||||
int rtn = SmartX1Api.SmartX1Find("Ls_ERP", keyHandles, keyNumber);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1635,6 +1635,29 @@ namespace Lskj.Main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (SystemInfo.Instance.AccountSwitchingRestrictions > 0)
|
||||
{
|
||||
DataTable dataTable = this.lueUserName.DataSource as DataTable;
|
||||
DataRow[] array = dataTable.Select("UserName='" + UserName + "'");
|
||||
DataRow dataRow = array.Length > 0 ? array[0] : null;
|
||||
if (dataRow!=null)
|
||||
{
|
||||
int uid = int.Parse(dataRow["UserId"] + "");
|
||||
if (uid <= SystemInfo.Instance.AccountSwitchingRestrictions)
|
||||
{
|
||||
this.cbLedger.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.cbLedger.Enabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (isClear)
|
||||
{
|
||||
chkRemPwd.Checked = false;
|
||||
|
||||
@@ -50,6 +50,10 @@ namespace Lskj.Main
|
||||
{
|
||||
InitializeComponent();
|
||||
//lueUserName.AutoShowPopup = false;
|
||||
if (SystemInfo.Instance.AccountSwitchingRestrictions > 0 && SystemInfo.Instance.AccountSwitchingRestrictions < int.Parse(ERPInfo.Instance.UserId))
|
||||
{
|
||||
this.cbLedger.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -632,29 +636,4 @@ namespace Lskj.Main
|
||||
ADUtil.ADPwd = SystemInfo.Instance.ADPwd;
|
||||
if (string.IsNullOrEmpty(ADUtil.ADPath))
|
||||
{
|
||||
//responseinfo.msg = "AD域配置不正确,请检查!";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (ADUtil.ADLogin == true)
|
||||
{
|
||||
LoginResult result = ADUtil.LoginByAccount(LoginAccount, Pwd);
|
||||
responseinfo.success = true;
|
||||
if (result != LoginResult.LOGIN_USER_OK)
|
||||
{
|
||||
responseinfo.success = false;
|
||||
switch (result)
|
||||
{
|
||||
case LoginResult.LOGIN_USER_ACCOUNT_INACTIVE: responseinfo.msg = "登录失败,用户账号被禁用!"; break;
|
||||
case LoginResult.LOGIN_USER_PASSWORD_INCORRECT: responseinfo.msg = "登录失败,用户密码不正确!"; break;
|
||||
case LoginResult.LOGIN_USER_DOESNT_EXIST: responseinfo.msg = "登录失败,用户不存在!"; break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//responseinfo.msg = "AD域配置不正确,请检�
|
||||
Reference in New Issue
Block a user