namespace FineUIPro.Web { using BLL; using System; using System.Configuration; using System.Linq; using System.Web; using System.Web.Services; public partial class Login : PageBase { #region /// /// 是否本部 /// public string IsOffice { get { return (string)ViewState["IsOffice"]; } set { ViewState["IsOffice"] = value; } } /// /// 菜单类型 /// public string MenuType { get { return (string)ViewState["MenuType"]; } set { ViewState["MenuType"] = value; } } /// /// 项目ID /// public string ProjectId { get { return (string)ViewState["ProjectId"]; } set { ViewState["ProjectId"] = value; } } #endregion #region 页面加载 /// /// 页面加载 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { } } #endregion [WebMethod] public static string LoginPost(string user, string pwd) { return new Login().btnLogin_Click(user, pwd); } private string btnLogin_Click(string user, string pwd) { string url = ""; if (LoginService.UserLogOn(user, pwd, true, this.Page)) { this.CurrUser.RoleType = RoleService.GetRoleTypeByRoleId(this.CurrUser.RoleId); if (!this.CurrUser.LastIsOffice.HasValue) { this.CurrUser.LastIsOffice = this.CurrUser.IsOffice; } if (this.CurrUser.LastIsOffice == true) { this.CurrUser.LoginProjectId = null; ////本部菜单 url = "index.aspx"; } else { this.CurrUser.LoginProjectId = this.CurrUser.LastProjectId; //// 项目菜单 url = "indexProject.aspx?projectId=" + this.CurrUser.LastProjectId; } LogService.AddSys_Log(this.CurrUser, this.CurrUser.UserName, this.CurrUser.UserId, Const.UserMenuId, Const.BtnLogin); } return url; } } }