This commit is contained in:
夏菊 2025-05-03 22:24:51 +08:00
parent 2c1bb29be6
commit 6ece9688b4
3 changed files with 51 additions and 14 deletions

View File

@ -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
{
/// <summary>
/// 主键
/// </summary>
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,6 +66,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
List<SqlParameter> listStr = new List<SqlParameter>();
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()))
{

View File

@ -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+'.'+身份证号码后四位,请登录";
}
}
}

View File

@ -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
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void butFiveStars_Click(object sender, EventArgs e) {
protected void butFiveStars_Click(object sender, EventArgs e)
{
this.MenuSwitchMethod(Const.Menu_FiveStarts);
}