From 6ece9688b496701931b502cd925ba90235a84358 Mon Sep 17 00:00:00 2001 From: xiaju <1784803958@qq.com> Date: Sat, 3 May 2025 22:24:51 +0800 Subject: [PATCH] 1 --- .../HSSE/EduTrain/Trainingrecords.aspx.cs | 26 +++++++++++++- SGGL/FineUIPro.Web/Login.aspx.cs | 4 +-- SGGL/FineUIPro.Web/indexProject.aspx.cs | 35 +++++++++++++------ 3 files changed, 51 insertions(+), 14 deletions(-) diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/Trainingrecords.aspx.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/Trainingrecords.aspx.cs index 655a6d2..f42707c 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/Trainingrecords.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/Trainingrecords.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using FineUIPro.Web.DataShow; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -12,6 +13,20 @@ namespace FineUIPro.Web.HSSE.EduTrain { public partial class Trainingrecords : PageBase { + /// + /// 主键 + /// + public string PersonId + { + get + { + return (string)ViewState["PersonId"]; + } + set + { + ViewState["PersonId"] = value; + } + } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) @@ -19,6 +34,10 @@ namespace FineUIPro.Web.HSSE.EduTrain Funs.DropDownPageSize(this.ddlPageSize); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + if (!string.IsNullOrEmpty(Request.Params["personId"])) ///是否文件柜查看页面传项目值 + { + this.PersonId = Request.Params["personId"]; + } // 绑定表格 BindGrid(); @@ -47,7 +66,12 @@ namespace FineUIPro.Web.HSSE.EduTrain List listStr = new List(); strSql += " AND tp.ProjectId = @ProjectId"; listStr.Add(new SqlParameter("@ProjectId", projectId)); - + if (!string.IsNullOrEmpty(this.PersonId)) + { + strSql += " AND p.PersonId = @PersonId"; + listStr.Add(new SqlParameter("@PersonId", this.PersonId)); + } + if (!string.IsNullOrEmpty(txtName.Text.Trim())) { strSql += " AND p.PersonName like '%"+ txtName.Text.Trim() + "%'"; diff --git a/SGGL/FineUIPro.Web/Login.aspx.cs b/SGGL/FineUIPro.Web/Login.aspx.cs index 1cab9b3..90efc3e 100644 --- a/SGGL/FineUIPro.Web/Login.aspx.cs +++ b/SGGL/FineUIPro.Web/Login.aspx.cs @@ -302,10 +302,10 @@ namespace FineUIPro.Web { return "用户名或密码错误,请重新输入"; } - sysUser.RawPassword = "cncec." + idcard.Substring(idcard.Length - 4, 4); + sysUser.RawPassword = "XJYJ." + idcard.Substring(idcard.Length - 4, 4); sysUser.Password = Funs.EncryptionPassword(sysUser.RawPassword); Funs.DB.SubmitChanges(); - return "重置成功,默认密码是 cncec+'.'+身份证号码后四位,请登录"; + return "重置成功,默认密码是 XJYJ+'.'+身份证号码后四位,请登录"; } } } diff --git a/SGGL/FineUIPro.Web/indexProject.aspx.cs b/SGGL/FineUIPro.Web/indexProject.aspx.cs index de4a7f3..7bf8d1c 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx.cs +++ b/SGGL/FineUIPro.Web/indexProject.aspx.cs @@ -289,7 +289,7 @@ namespace FineUIPro.Web /// protected void Page_Load(object sender, EventArgs e) { - + var getDataList = Funs.DB.Sp_Main_GetToDoItems(this.CurrUser.UserId, CurrUser.LoginProjectId).ToList(); if (getDataList.Count == 0) { @@ -353,7 +353,7 @@ namespace FineUIPro.Web this.hfMonitorPW.Text = ""; } } - + } @@ -549,7 +549,7 @@ namespace FineUIPro.Web { this.Tab1.RefreshIFrame(); this.CurrUser.LoginProjectId = this.drpProject.SelectedValue; - + PageContext.RegisterStartupScript("parent.removeActiveTab();"); MenuSwitchMethod(this.CurrUser.LastMenuType); @@ -577,7 +577,7 @@ namespace FineUIPro.Web this.hfMonitorPW.Text = ""; } } - + } @@ -592,11 +592,23 @@ namespace FineUIPro.Web this.XmlDataSource1.DataFile = "common/Menu_Personal.xml"; this.leftPanel.Hidden = true; this.Tab1.IFrameUrl = "~/common/mainProject.aspx"; + + //根据身份证号判断当前登录账号是否在项目人员表里 + var identityCard = !string.IsNullOrWhiteSpace(this.CurrUser.IdentityCard) ? this.CurrUser.IdentityCard.Trim() : string.Empty; + if (!string.IsNullOrWhiteSpace(identityCard)) + { + var person = PersonService.GetPersonCountByIdentityCard(identityCard, this.CurrUser.LoginProjectId); + if (person != null) + { + this.Tab1.IFrameUrl = $"~/HSSE/EduTrain/Trainingrecords.aspx?personId={person.PersonId}"; + } + } + this.CurrUser.LastProjectId = null; if (!string.IsNullOrEmpty(type)) { this.CurrUser.LastProjectId = this.CurrUser.LoginProjectId; - if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, type, this.CurrUser.LoginProjectId) || type == Const.Menu_Personal|| type == Const.Menu_ToDo) // + if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, type, this.CurrUser.LoginProjectId) || type == Const.Menu_Personal || type == Const.Menu_ToDo) // { this.XmlDataSource1.DataFile = "common/" + type + ".xml"; this.leftPanel.Hidden = false; @@ -647,7 +659,7 @@ namespace FineUIPro.Web else { //this.MenuSwitchMethod(string.Empty); - PageContext.Redirect("~/indexProject.aspx?projectId="+ this.CurrUser.LoginProjectId, "_top"); + PageContext.Redirect("~/indexProject.aspx?projectId=" + this.CurrUser.LoginProjectId, "_top"); } } protected void btnCQMS_Click(object sender, EventArgs e) @@ -698,7 +710,8 @@ namespace FineUIPro.Web /// /// /// - protected void butFiveStars_Click(object sender, EventArgs e) { + protected void butFiveStars_Click(object sender, EventArgs e) + { this.MenuSwitchMethod(Const.Menu_FiveStarts); } @@ -718,7 +731,7 @@ namespace FineUIPro.Web string url = ConfigurationManager.AppSettings["Video_URL"] + "#/screen"; Response.Write(""); // this.MenuSwitchMethod(Const.Menu_DigitalSite); - } + } } protected string VideoURL @@ -739,9 +752,9 @@ namespace FineUIPro.Web } } } - - - + + + protected void btnPDigData_Click(object sender, EventArgs e) { this.MenuSwitchMethod(Const.Menu_PDigData);