예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            bool _IsLogin = EyouSoft.Security.Membership.UserProvider.IsLogin(out SiteUserInfo);

            if (SiteUserInfo == null)
            {
                EyouSoft.Model.SysStructure.MSysDomain sysDomain = EyouSoft.Security.Membership.UserProvider.GetDomain();
                if (sysDomain != null)
                {
                    EyouSoft.BLL.SysStructure.BSys Customer = new EyouSoft.BLL.SysStructure.BSys();
                    CustomerConfig = new EyouSoft.BLL.ComStructure.BComSetting().GetModel(sysDomain.CompanyId);

                    if (CustomerConfig != null)
                    {
                        DepartStamp  = "http://" + Request.Url.Authority + CustomerConfig.CompanyChapter;
                        PageHeadFile = "http://" + Request.Url.Authority + CustomerConfig.PagePath;
                        PageFootFile = "http://" + Request.Url.Authority + CustomerConfig.FooterPath;
                    }
                }
            }
            else
            {
                CustomerConfig = new EyouSoft.BLL.ComStructure.BComSetting().GetModel(SiteUserInfo.CompanyId);

                if (CustomerConfig != null)
                {
                    DepartStamp  = "http://" + Request.Url.Authority + CustomerConfig.CompanyChapter;
                    PageHeadFile = "http://" + Request.Url.Authority + CustomerConfig.PagePath;
                    PageFootFile = "http://" + Request.Url.Authority + CustomerConfig.FooterPath;
                }
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            bool _IsLogin = EyouSoft.Security.Membership.UserProvider.IsLogin(out SiteUserInfo);

            if (SiteUserInfo == null)
            {
                EyouSoft.Model.SysStructure.MSysDomain sysDomain = EyouSoft.Security.Membership.UserProvider.GetDomain();
                if (sysDomain != null)
                {
                    EyouSoft.BLL.SysStructure.BSys Customer = new EyouSoft.BLL.SysStructure.BSys();

                    CustomerConfig = new EyouSoft.BLL.CrmStructure.BCrm().GetInfo(sysDomain.CompanyId);

                    if (CustomerConfig != null)
                    {
                        DepartStamp  = "http://" + Request.Url.Authority + CustomerConfig.Seal;
                        PageHeadFile = "http://" + Request.Url.Authority + CustomerConfig.PrintHeader;
                        PageFootFile = "http://" + Request.Url.Authority + CustomerConfig.PrintFooter;
                    }
                }
            }
            else
            {
                CustomerConfig = new EyouSoft.BLL.CrmStructure.BCrm().GetInfo(SiteUserInfo.TourCompanyInfo.CompanyId);
                if (CustomerConfig != null)
                {
                    DepartStamp  = "http://" + Request.Url.Authority + CustomerConfig.Seal;
                    PageHeadFile = "http://" + Request.Url.Authority + CustomerConfig.PrintHeader;
                    PageFootFile = "http://" + Request.Url.Authority + CustomerConfig.PrintFooter;
                }
            }
            this.ibtnWord.Attributes.Add("onclick", "ReplaceInput();");
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                string u           = Utils.GetFormValue("u");
                string p           = Utils.GetFormValue("p");
                string companyId   = string.Empty;
                int    isUserValid = 0;

                if (u.Trim() != "" && p.Trim() != "")
                {
                    EyouSoft.Model.SysStructure.MSysDomain sysDomain = EyouSoft.Security.Membership.UserProvider.GetDomain();
                    if (sysDomain != null)
                    {
                        companyId = sysDomain.CompanyId;
                    }

                    EyouSoft.Model.SSOStructure.MUserInfo userInfo = null;

                    EyouSoft.Model.ComStructure.MPasswordInfo pwdInfo = new EyouSoft.Model.ComStructure.MPasswordInfo();
                    pwdInfo.NoEncryptPassword = p;
                    isUserValid = EyouSoft.Security.Membership.UserProvider.Login(companyId, u, pwdInfo, out userInfo);

                    if (isUserValid == 1)
                    {
                        Response.Redirect("/m/Index.aspx?sl=" + ((int)EyouSoft.Model.EnumType.PrivsStructure.Privs.导游中心_导游报账_栏目).ToString());
                    }
                    else if (isUserValid == -4)
                    {
                        this.lblMsg.Text = "用户名或密码不正确";
                    }
                    else if (isUserValid == -7)
                    {
                        this.lblMsg.Text = "您的账户已停用或已过期,请联系管理员";
                    }
                    else
                    {
                        this.lblMsg.Text = "登录异常,请联系管理员";
                    }
                }
                else
                {
                    this.lblMsg.Text = "请输入用户名和密码!";
                }
            }
        }
예제 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         EyouSoft.Model.SysStructure.MSysDomain sysDomain = EyouSoft.Security.Membership.UserProvider.GetDomain();
         if (sysDomain != null)
         {
             EyouSoft.Model.ComStructure.MComSetting settingModel = new EyouSoft.BLL.ComStructure.BComSetting().GetModel(sysDomain.CompanyId);
             if (settingModel != null)
             {
                 this.LogoImgUrl = settingModel.MLogo;
             }
         }
         if (this.LogoImgUrl != "")
         {
             this.litLogo.Text = "<img src='" + this.LogoImgUrl + "' border='0' alt='' />";
         }
     }
 }
예제 #5
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        private void PageInit()
        {
            EyouSoft.Model.SysStructure.MSysDomain sysDomain = EyouSoft.Security.Membership.UserProvider.GetDomain();

            if (sysDomain != null)
            {
                var setting = new EyouSoft.BLL.ComStructure.BComSetting().GetModel(sysDomain.CompanyId);
                if (setting != null)
                {
                    litWelcome.Text = "<div class=\"login-welcome\">您好!" + setting.CompanyName + ", 现在是: " + DateTime.Now.GetDateTimeFormats('D')[3].ToString() + " 系统首页</div>";
                    this.Page.Title = "登录_旅游管理系统_" + setting.CompanyName;
                    if (!string.IsNullOrEmpty(setting.WLogo) && setting.WLogo.Trim() != "")
                    {
                        this.litLogo.Text = "<img src='" + setting.WLogo + "'>";
                    }
                    else
                    {
                        this.litLogo.Text = "<img src='/images/logo_e.gif'>";
                    }

                    setting = null;
                }

                if (sysDomain.Domain == "xz.gocn.cn" || sysDomain.Domain == "local.xz.com")
                {
                    ltrTiShi.Text = "<span style=\"color:#ffffff\">2013-03-01日起峡州国旅ERP系统正式启用,请大家录入实团信息,如录入中有疑问请电询18608601188.</span>";
                }
            }
            else
            {
                litWelcome.Text   = "<div class=\"login-welcome\">您好!, 现在是: " + DateTime.Now.GetDateTimeFormats('D')[3].ToString() + " 系统首页</div>";
                this.litLogo.Text = "<img src='/images/logo_e.gif'>";
            }

            #region 根据类型跳转相应登录页面
            string type = "";
            type = Utils.GetQueryStringValue("type");
            switch (type)
            {
            case "1":
                litLeft.Text = "<a href=\"/login.aspx?type=3\">"
                               + "<img border=\"0\" style=\"vertical-align: middle\" src=\"/images/login-xitong-cy.gif\"></a>";
                litRight.Text = "<a href=\"/login.aspx?type=2\">"
                                + "<img border=\"0\" style=\"vertical-align: middle\" src=\"/images/login-fenxiao-cy.gif\"></a>";
                break;

            case "2":
                litLeft.Text = "<a href=\"/login.aspx?type=1\">"
                               + "<img border=\"0\" style=\"vertical-align: middle\" src=\"/images/login-gongying-cy.gif\"></a>";
                litRight.Text = "<a href=\"/login.aspx?type=3\">"
                                + "<img border=\"0\" style=\"vertical-align: middle\" src=\"/images/login-xitong-cy.gif\"></a>";
                break;

            case "3":
                litLeft.Text = "<a href=\"/login.aspx?type=1\">"
                               + "<img border=\"0\" style=\"vertical-align: middle\" src=\"/images/login-gongying-cy.gif\"></a>";
                litRight.Text = "<a href=\"/login.aspx?type=2\">"
                                + "<img border=\"0\" style=\"vertical-align: middle\" src=\"/images/login-fenxiao-cy.gif\"></a>";
                break;

            default:
                litLeft.Text = "<a href=\"/login.aspx?type=1\">"
                               + "<img border=\"0\" style=\"vertical-align: middle\" src=\"/images/login-gongying-cy.gif\"></a>";
                litRight.Text = "<a href=\"/login.aspx?type=2\">"
                                + "<img border=\"0\" style=\"vertical-align: middle\" src=\"/images/login-fenxiao-cy.gif\"></a>";
                break;
            }
            #endregion
        }