From 87799090e3df9a34a2ec859db6387e1f2b86ad62 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Tue, 4 Jul 2023 14:47:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9oa=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/index.aspx.cs | 45 ++++++++++---------- SGGL/FineUIPro.Web/indexProject.aspx.cs | 55 +++++++++++++------------ 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/SGGL/FineUIPro.Web/index.aspx.cs b/SGGL/FineUIPro.Web/index.aspx.cs index 393ec45f..33838690 100644 --- a/SGGL/FineUIPro.Web/index.aspx.cs +++ b/SGGL/FineUIPro.Web/index.aspx.cs @@ -53,7 +53,7 @@ namespace FineUIPro.Web if (!IsPostBack) { - this.CurrUser.LoginProjectId = null; + //this.CurrUser.LoginProjectId = null; } } @@ -285,27 +285,6 @@ namespace FineUIPro.Web { if (!IsPostBack) { - this.MenuSwitchMethod(Request.Params["menuType"]); - this.InitMenuStyleButton(); - this.InitMenuModeButton(); - this.InitLangMenuButton(); - this.btnRetweet.Hidden = true; - if (this.CurrUser.PersonId == Const.hfnbdId) - { - this.btnRetweet.Hidden = false; - } - this.userName.InnerText = this.CurrUser.PersonName; - this.spDate.InnerText = DateTime.Now.ToLongDateString().ToString() + " " + WeekDayService.CaculateWeekDayT(DateTime.Now); - if (this.CurrUser.Password == Const.MD5pwd) - { - Alert.ShowInTop("当前密码不安全,请尽快更改!", MessageBoxIcon.Warning); - } - this.hdHomePage.Text = "1"; - if (this.CurrUser.HomePageType == "2") - { - this.Tab1.IFrameUrl = "~/common/main2.aspx"; - this.hdHomePage.Text = "2"; - } if (!string.IsNullOrEmpty(Request.Params["PHTUrl"])) { mainTabStrip.ShowTabHeader = true; @@ -330,6 +309,28 @@ namespace FineUIPro.Web this.MenuSwitchMethod(Request.Params["menuType"]); } + this.MenuSwitchMethod(Request.Params["menuType"]); + this.InitMenuStyleButton(); + this.InitMenuModeButton(); + this.InitLangMenuButton(); + this.btnRetweet.Hidden = true; + if (this.CurrUser.PersonId == Const.hfnbdId) + { + this.btnRetweet.Hidden = false; + } + this.userName.InnerText = this.CurrUser.PersonName; + this.spDate.InnerText = DateTime.Now.ToLongDateString().ToString() + " " + WeekDayService.CaculateWeekDayT(DateTime.Now); + if (this.CurrUser.Password == Const.MD5pwd) + { + Alert.ShowInTop("当前密码不安全,请尽快更改!", MessageBoxIcon.Warning); + } + this.hdHomePage.Text = "1"; + if (this.CurrUser.HomePageType == "2") + { + this.Tab1.IFrameUrl = "~/common/main2.aspx"; + this.hdHomePage.Text = "2"; + } + var getW = WeatherService.GetWeather(null); if (getW != null) { diff --git a/SGGL/FineUIPro.Web/indexProject.aspx.cs b/SGGL/FineUIPro.Web/indexProject.aspx.cs index dd8d5422..c88143e1 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx.cs +++ b/SGGL/FineUIPro.Web/indexProject.aspx.cs @@ -292,7 +292,33 @@ namespace FineUIPro.Web protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { + if (!string.IsNullOrEmpty(Request.Params["PHTUrl"])) + { + this.drpProject.SelectedValue = Request.Params["projectId"]; + + mainTabStrip.ShowTabHeader = true; + PageContext.RegisterStartupScript("parent.removeActiveTab();"); + //btnPHTGL_Click(null, null); + if (!string.IsNullOrEmpty(Request.Params["PHTUserid"])) + { + var model_user = BLL.Person_PersonsService.GetPerson_PersonsById(Request.Params["PHTUserid"]); + var q = BLL.Funs.DB.Person_Persons.FirstOrDefault(x => x.Account == model_user.Account && x.Password == model_user.Password); + if (q != null) + { + Session["CurrUser"] = q; + Session["u"] = model_user.Account; + Session["p"] = model_user.Password; + } + } + btnPHTGL_Click(null, null); + PageContext.RegisterStartupScript(mainTabStrip.GetAddTabReference("dynamic_tab4", Request.Params["PHTUrl"], "审批", IconHelper.GetIconUrl(Icon.ApplicationAdd), true)); + } + else + { + this.MenuSwitchMethod(Request.Params["menuType"]); + + } this.drpProject.DataValueField = "ProjectId"; this.drpProject.DataTextField = "ShortName"; var projectlist =ProjectService.GetSortIndexProjectByUserIdDropDownList(this.CurrUser.PersonId); @@ -328,32 +354,7 @@ namespace FineUIPro.Web this.drpProject.SelectedValue = this.CurrUser.LoginProjectId; } - if (!string.IsNullOrEmpty(Request.Params["PHTUrl"])) - { - this.drpProject.SelectedValue = Request.Params["projectId"]; - - mainTabStrip.ShowTabHeader = true; - PageContext.RegisterStartupScript("parent.removeActiveTab();"); - //btnPHTGL_Click(null, null); - if (!string.IsNullOrEmpty(Request.Params["PHTUserid"])) - { - var model_user = BLL.Person_PersonsService.GetPerson_PersonsById(Request.Params["PHTUserid"]); - var q = BLL.Funs.DB.Person_Persons.FirstOrDefault(x => x.Account == model_user.Account && x.Password == model_user.Password); - if (q != null) - { - Session["CurrUser"] = q; - Session["u"] = model_user.Account; - Session["p"] = model_user.Password; - } - } - btnPHTGL_Click(null, null); - PageContext.RegisterStartupScript(mainTabStrip.GetAddTabReference("dynamic_tab4", Request.Params["PHTUrl"], "审批", IconHelper.GetIconUrl(Icon.ApplicationAdd), true)); - } - else - { - this.MenuSwitchMethod(Request.Params["menuType"]); - - } + this.InitMenuStyleButton(); this.InitMenuModeButton(); this.InitLangMenuButton();