/// <summary> /// 初始化登陆窗体, 创建登录策略 /// </summary> private void InitLoginWindow() { rdUser.Checked = true; timer1.Interval = 2000; this.BindingOrganization(); //绑定组织机构 //this.BindingDataSet();//绑定帐套数据源 this.ReadLoginInfo(); //读取保存的登录信息 this.Text += " (后台连接:" + BridgeFactory.BridgeType.ToString() + ")"; SystemAuthentication.Current = null; LoginAuthType authType = (LoginAuthType)SystemConfig.CurrentConfig.LoginAuthType; //系统设置 if (authType == LoginAuthType.LocalSystemAuth) { _CurrentAuthorization = new LoginSystemAuth(); btnLogin.Text = "登录 (&L)"; this.Update();//自动显示窗体 } else if (authType == LoginAuthType.NovellUserAuth) { _CurrentAuthorization = new LoginNovellAuth(txtUser, lblLoadingInfo); btnLogin.Text = "Novell自动登录"; this.txtPwd.Enabled = false; this.txtUser.Enabled = false; this.Visible = true; this.Update(); //自动显示窗体 btnLogin.PerformClick(); //直接登录系统 } else if (authType == LoginAuthType.WindowsDomainAuth) { _CurrentAuthorization = new LoginWindowsDomainAuth(txtUser, lblLoadingInfo); btnLogin.Text = "域用户自动登录"; this.txtPwd.Enabled = false; this.txtUser.Enabled = false; this.Visible = true; this.Update(); //自动显示窗体 btnLogin.PerformClick(); //直接登录系统 } else //不明类型,禁止登录 { pcInputArea.Enabled = false; btnLogin.Enabled = false; } }
bool LoginAuthor(Common.LoginUser LoginUser, ILoginAuthorization login) { return(login.Login(LoginUser)); }
/// <summary> /// 初始化登陆窗体, 创建登录策略 /// </summary> private void InitLoginWindow() { rdUser.Checked = true; timer1.Interval = 2000; this.BindingOrganization(); //绑定组织机构 //this.BindingDataSet();//绑定帐套数据源 this.ReadLoginInfo(); //读取保存的登录信息 this.Text += " (后台连接:" + BridgeFactory.BridgeType.ToString() + ")"; SystemAuthentication.Current = null; LoginAuthType authType = (LoginAuthType)SystemConfig.CurrentConfig.LoginAuthType; //系统设置 if (authType == LoginAuthType.LocalSystemAuth) { _CurrentAuthorization = new LoginSystemAuth(); btnLogin.Text = "登录 (&L)"; this.Update();//自动显示窗体 } else if (authType == LoginAuthType.NovellUserAuth) { _CurrentAuthorization = new LoginNovellAuth(txtUser, lblLoadingInfo); btnLogin.Text = "Novell自动登录"; this.txtPwd.Enabled = false; this.txtUser.Enabled = false; this.Visible = true; this.Update();//自动显示窗体 btnLogin.PerformClick();//直接登录系统 } else if (authType == LoginAuthType.WindowsDomainAuth) { _CurrentAuthorization = new LoginWindowsDomainAuth(txtUser, lblLoadingInfo); btnLogin.Text = "域用户自动登录"; this.txtPwd.Enabled = false; this.txtUser.Enabled = false; this.Visible = true; this.Update();//自动显示窗体 btnLogin.PerformClick();//直接登录系统 } else //不明类型,禁止登录 { pcInputArea.Enabled = false; btnLogin.Enabled = false; } }