Login.aspx.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:2k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- namespace OThinker.H3.Portal
- {
- public partial class Login : OThinker.H3.Portal.PortalPage
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- }
- protected void lgLog_LoggingIn(object sender, LoginCancelEventArgs e)
- {
- string userAlias = this.lgLog.UserName;
- if (userAlias == null)
- {
- this.NotifyMessage("请输入用户名");
- }
- string userId = OThinker.H3.Server.Engine.Organization.GetUserIDByAlias(userAlias);
- OThinker.Organization.User user = (OThinker.Organization.User)OThinker.H3.Server.Engine.Organization.GetUnit(userId);
- if (user == null)
- {
- this.NotifyMessage("用户名不存在,请重新输入");
- }
- else if (user.Password != this.lgLog.Password)
- {
- this.NotifyMessage("用户名密码不匹配");
- }
- else
- {
- this.Session[OThinker.H3.WorkSheet.Sessions.GetUserValidator()] = UserValidatorFactory.GetValidator(userAlias);
- string q = HttpUtility.UrlDecode(this.Request.QueryString[Param_Q]);
- if (q == null || q == "")
- {
- this.Response.Redirect("Default.aspx");
- }
- else
- {
- this.Response.Redirect(q);
- }
- }
- }
- }
- }