Default.aspx.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:3k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Collections;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Web;
- using System.Web.SessionState;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.HtmlControls;
- namespace OThinker.H3.Portal
- {
- /// <summary>
- /// Summary description for _Default.
- /// </summary>
- public partial class Default : PortalPage
- {
- protected void Page_Load(object sender, System.EventArgs e)
- {
- try
- {
- OThinker.H3.EngineState state = OThinker.H3.Server.Engine.State;
- }
- catch (System.Net.Sockets.SocketException ex)
- {
- this.Response.Write("<BR>");
- this.Response.Write(
- "出错了!" + "<BR>" +
- "请检查:" + "<BR>" +
- "1、工作流服务器是否启动。" + "<BR>" +
- ex.StackTrace.Replace("r", "<BR>"));
- return;
- }
- catch (System.Reflection.TargetInvocationException ex)
- {
- this.Response.Write("<BR>");
- this.Response.Write(
- "出错了!请检查:" + "<BR>" +
- "1、数据库是否启动;" + "<BR>" +
- "2、数据库连接设置是否正确;" + "<BR>" +
- "3、是否可以从本机连接到数据库上。" + "<BR>" +
- ex.StackTrace.Replace("r", "<BR>"));
- return;
- }
- try
- {
- this.Response.Write(this.UserValidator.UserName);
- }
- catch (Exception ex)
- {
- this.Response.Write("<BR>");
- this.Response.Write(
- "出错了!请检查:<BR>" +
- "1、活动目录设置是否正确,包括活动目录地址,登陆名和密码;" + "<BR>" +
- "2、该用户是否有权限访问活动目录;" + "<BR>" +
- "3、IIS是否设置为集成Windows身份验证,并禁止了匿名;" + "<BR>" +
- ex.StackTrace.Replace("r", "<BR>"));
- return;
- }
- try
- {
- if (OThinker.H3.Server.Engine.SettingManager.Initialized)
- {
- this.Response.Redirect("Main.htm");
- }
- else if (OThinker.H3.Server.Engine.Organization.IsAdministrator(this.UserValidator.UserID))
- {
- this.Response.Redirect(PageName_Settings);
- }
- else
- {
- this.Response.Redirect(PageName_Login);
- }
- }
- catch
- {
- }
- }
- #region Web Form Designer generated code
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: This call is required by the ASP.NET Web Form Designer.
- //
- InitializeComponent();
- base.OnInit(e);
- }
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- }
- #endregion
- }
- }