This commit is contained in:
parent
2c1bb29be6
commit
6ece9688b4
|
@ -1,4 +1,5 @@
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using FineUIPro.Web.DataShow;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -12,6 +13,20 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
{
|
{
|
||||||
public partial class Trainingrecords : PageBase
|
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)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
|
@ -19,6 +34,10 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
Funs.DropDownPageSize(this.ddlPageSize);
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
|
|
||||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
|
if (!string.IsNullOrEmpty(Request.Params["personId"])) ///是否文件柜查看页面传项目值
|
||||||
|
{
|
||||||
|
this.PersonId = Request.Params["personId"];
|
||||||
|
}
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
BindGrid();
|
BindGrid();
|
||||||
|
|
||||||
|
@ -47,6 +66,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
strSql += " AND tp.ProjectId = @ProjectId";
|
strSql += " AND tp.ProjectId = @ProjectId";
|
||||||
listStr.Add(new SqlParameter("@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()))
|
if (!string.IsNullOrEmpty(txtName.Text.Trim()))
|
||||||
{
|
{
|
||||||
|
|
|
@ -302,10 +302,10 @@ namespace FineUIPro.Web
|
||||||
{
|
{
|
||||||
return "用户名或密码错误,请重新输入";
|
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);
|
sysUser.Password = Funs.EncryptionPassword(sysUser.RawPassword);
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
return "重置成功,默认密码是 cncec+'.'+身份证号码后四位,请登录";
|
return "重置成功,默认密码是 XJYJ+'.'+身份证号码后四位,请登录";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -592,6 +592,18 @@ namespace FineUIPro.Web
|
||||||
this.XmlDataSource1.DataFile = "common/Menu_Personal.xml";
|
this.XmlDataSource1.DataFile = "common/Menu_Personal.xml";
|
||||||
this.leftPanel.Hidden = true;
|
this.leftPanel.Hidden = true;
|
||||||
this.Tab1.IFrameUrl = "~/common/mainProject.aspx";
|
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;
|
this.CurrUser.LastProjectId = null;
|
||||||
if (!string.IsNullOrEmpty(type))
|
if (!string.IsNullOrEmpty(type))
|
||||||
{
|
{
|
||||||
|
@ -698,7 +710,8 @@ namespace FineUIPro.Web
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></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);
|
this.MenuSwitchMethod(Const.Menu_FiveStarts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue