升级
This commit is contained in:
@@ -15,6 +15,25 @@
|
||||
ov
|
||||
}
|
||||
</style>
|
||||
<style type="text/css">
|
||||
/*定义父容器*/
|
||||
.content{
|
||||
width: 550px;
|
||||
height: 30px;
|
||||
background: #E4F1FB;
|
||||
margin:0 auto;
|
||||
}
|
||||
/*定义进度条*/
|
||||
.box{
|
||||
width: 0px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
background: #3BAAE3;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -35,6 +54,7 @@
|
||||
</f:Button>--%>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click" Text="下载模板">
|
||||
</f:Button>
|
||||
<f:Button ID="btnRefresh" runat="server" ClientIDMode="Static" Text="关闭" Icon="SystemSave" OnClick="btnRefresh_Click" Hidden="true"></f:Button>
|
||||
<%--<f:Button ID="btnOut" Icon="Pencil" runat="server" Text="导出" ToolTip="导出错误列表" ValidateForms="SimpleForm1"
|
||||
OnClick="btnOut_Click" Hidden="true"></f:Button>--%>
|
||||
</Items>
|
||||
@@ -203,6 +223,60 @@
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window2_Close" IsModal="false"
|
||||
CloseAction="HidePostBack" Width="900px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window3" Hidden="true" runat="server" MinHeight="30px"
|
||||
Target="Parent" ShowHeader="false" BodyPadding="0" Margin="0"
|
||||
IsModal="true" Width="550px" Height="32px">
|
||||
<Items >
|
||||
<f:ContentPanel ShowBorder="false" Height="30px" ShowHeader="false" ID="ContentPanel3" runat="server">
|
||||
<div class="content" id="content">
|
||||
<div class="box" id="box"></div >
|
||||
</div >
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Window>
|
||||
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePageMethods="true">
|
||||
<Scripts>
|
||||
<asp:ScriptReference Path="~/res/DataInTable.js"/>
|
||||
</Scripts>
|
||||
</asp:ScriptManager>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
function parse(y) {
|
||||
var box = document.getElementById("box");
|
||||
//获取进度条div的宽度
|
||||
var x = box.style.width;
|
||||
x = parseInt(x) + 1;
|
||||
y = y + 1;
|
||||
//将y值加上百分号赋值给box的宽度。这样每次+1就可以实现进度条占父容器的100%;
|
||||
box.style.width = y + "%";
|
||||
//将y值加上百分号并赋值给显示下载百分比的div上
|
||||
document.getElementById("box").innerHTML = y + "%";
|
||||
//判断当y已经100的时候,也就是进度条的宽度和父容器的宽度一致的时候停止。
|
||||
if (y >= 100) {
|
||||
document.getElementById("box").innerHTML = "100%";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function printX() {
|
||||
var userid = '<%= CurrUser.UserId %>';
|
||||
F.ui.Window3.show();
|
||||
parse(0);
|
||||
var begin = setInterval(function () {
|
||||
PageMethods.getPercent(userid,function (result) {
|
||||
console.log(result);
|
||||
parse(result);
|
||||
if (result >= 100) {
|
||||
F.ui.Window3.hide();
|
||||
document.getElementById('btnRefresh').click();
|
||||
clearInterval(begin);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
y = 0;
|
||||
}
|
||||
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.SitePerson
|
||||
@@ -31,6 +32,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
public static Dictionary<string,int> percent { get; set; }
|
||||
[System.Web.Services.WebMethod]
|
||||
public static int getPercent(string id)
|
||||
{
|
||||
return percent[id];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
@@ -73,6 +80,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (percent == null)
|
||||
{
|
||||
percent = new Dictionary<string, int>();
|
||||
}
|
||||
|
||||
this.hdFileName.Text = string.Empty;
|
||||
this.hdCheckResult.Text = string.Empty;
|
||||
errorInfos = string.Empty;
|
||||
@@ -260,10 +272,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
result += "第" + (i + 2).ToString() + "行," + "身份证号码" + "," + "[" + col4 + "]错误!" + "|";
|
||||
}
|
||||
|
||||
if (PersonService.GetPersonCountByIdentityCard(col4, this.ProjectId) != null)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "身份证号码" + "," + "[" + col4 + "]已存在!" + "|";
|
||||
}
|
||||
// if (PersonService.GetPersonCountByIdentityCard(col4, this.ProjectId) != null)
|
||||
// {
|
||||
// result += "第" + (i + 2).ToString() + "行," + "身份证号码" + "," + "[" + col4 + "]已存在!" + "|";
|
||||
// }
|
||||
if ( !string.IsNullOrEmpty(basicDictCode)&& basicDictCode== "SHENFEN_ZHENGJIAN")
|
||||
{
|
||||
if (!IDCardValid.CheckIDCard(col4))
|
||||
@@ -654,8 +666,23 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
if (!string.IsNullOrEmpty(this.hdFileName.Text))
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
|
||||
Thread t = new Thread(new ThreadStart(() =>
|
||||
{
|
||||
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
|
||||
}));
|
||||
t.Start();
|
||||
if (percent.ContainsKey(this.CurrUser.UserId))
|
||||
{
|
||||
percent[CurrUser.UserId] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
percent.Add(CurrUser.UserId, 0);
|
||||
|
||||
}
|
||||
PageContext.RegisterStartupScript("printX()");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
|
||||
@@ -1046,28 +1073,37 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
personQualitys.Add(personQuality);
|
||||
}
|
||||
}
|
||||
if (persons.Count > 0)
|
||||
{
|
||||
this.Grid1.Hidden = false;
|
||||
this.Grid1.DataSource = persons;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
// if (persons.Count > 0)
|
||||
// {
|
||||
// this.Grid1.Hidden = false;
|
||||
// this.Grid1.DataSource = persons;
|
||||
// this.Grid1.DataBind();
|
||||
// }
|
||||
|
||||
var personList = new List<Model.SitePerson_Person>();
|
||||
|
||||
if (string.IsNullOrEmpty(errorInfos))
|
||||
{
|
||||
int ii = 0;
|
||||
int a = persons.Count();
|
||||
for (int i = 0; i < a; i++)
|
||||
{
|
||||
var getPerson = PersonService.GetPersonCountByIdentityCard(persons[i].IdentityCard, Request.Params["ProjectId"]);
|
||||
ii++;
|
||||
percent[this.CurrUser.UserId] = (int)(100 * ii / a);
|
||||
var isUser = persons[i].IsUsedName == "是" ? true : false;
|
||||
if (isUser)
|
||||
{
|
||||
//先根据身份证号码把这个人在非当前项目上且状态为在岗的改为离岗
|
||||
PersonService.UpdatePersonTypeByProjectIdAndIdentityCard(ProjectId,persons[i].IdentityCard);
|
||||
}
|
||||
var getPerson = PersonService.GetPersonCountByIdentityCard(persons[i].IdentityCard, ProjectId);
|
||||
//!BLL.PersonService.IsExistPersonByUnit(persons[i].UnitId, persons[i].IdentityCard, Request.Params["ProjectId"]) &&
|
||||
if (getPerson == null)
|
||||
{
|
||||
Model.SitePerson_Person newPerson = new Model.SitePerson_Person();
|
||||
string newKeyID = SQLHelper.GetNewID();
|
||||
newPerson.PersonId = newKeyID;
|
||||
newPerson.ProjectId = Request.Params["ProjectId"];
|
||||
newPerson.ProjectId = ProjectId;
|
||||
newPerson.CardNo = persons[i].CardNo;
|
||||
newPerson.PersonName = persons[i].PersonName;
|
||||
newPerson.Sex = persons[i].SexName == "男" ? "1" : "2";
|
||||
@@ -1160,7 +1196,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
System.IO.File.Delete(filePath);//删除上传的XLS文件
|
||||
}
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
// ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
if (!string.IsNullOrWhiteSpace(porject.SubjectUnit) && !string.IsNullOrWhiteSpace(porject.SubjectProject))
|
||||
{
|
||||
@@ -1174,7 +1210,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1190,6 +1226,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
protected void btnRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
|
||||
+86
-50
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.SitePerson
|
||||
@@ -15,138 +15,174 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// PageManager1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// SimpleForm1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// Toolbar2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// btnAudit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// btnImport control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// btnDownLoad control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// btnRefresh control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnRefresh;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// Grid1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// Label2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// hdFileName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// hdCheckResult control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// lblBottom 控件。
|
||||
/// lblBottom control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblBottom;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// Window1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// Window2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// Window3 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window3;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel3 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel3;
|
||||
|
||||
/// <summary>
|
||||
/// ScriptManager2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.ScriptManager ScriptManager2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
<f:TextBox runat="server" Label="姓名" ID="txtPersonName" EmptyText="输入查询条件"
|
||||
Width="200px" LabelWidth="70px" LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="身份证" ID="txtIdentityCard" EmptyText="输入查询条件"
|
||||
Width="200px" LabelWidth="70px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="卡号" ID="txtCardNo" EmptyText="输入查询条件"
|
||||
Width="200px" LabelWidth="50px" LabelAlign="right" Hidden="true">
|
||||
</f:TextBox>
|
||||
@@ -70,10 +74,10 @@
|
||||
<f:DropDownList ID="drpTreamGroup" runat="server" Label="班组" EnableEdit="true"
|
||||
Width="200px" LabelWidth="50px" LabelAlign="right" ForceSelection="false">
|
||||
</f:DropDownList>
|
||||
<f:TextBox runat="server" Label="身份证" ID="txtIdentityCard" EmptyText="输入查询条件"
|
||||
Width="200px" LabelWidth="70px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:Label runat="server" Text="提示:本项目如果人员档案存在,保存时请注意提示存在的所属单位"
|
||||
LabelWidth="50px" CssStyle="color:red; font-weight:bold;" LabelAlign="right">
|
||||
</f:Label>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -203,138 +203,148 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
{
|
||||
string unitId = string.Empty;
|
||||
string projectId = string.Empty;
|
||||
if (this.tvProjectAndUnit != null && !string.IsNullOrEmpty(this.tvProjectAndUnit.SelectedNodeID))
|
||||
{
|
||||
string id = this.tvProjectAndUnit.SelectedNodeID;
|
||||
string unitId = string.Empty;
|
||||
string projectId = string.Empty;
|
||||
var str = id.Split('|');
|
||||
if (str.Count() > 1)
|
||||
{
|
||||
unitId = str[0];
|
||||
projectId = str[1];
|
||||
}
|
||||
}
|
||||
|
||||
string strSql = "select * from View_SitePerson_Person Where ProjectId=@ProjectId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@ProjectId", this.ProjectId)
|
||||
};
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != "0")
|
||||
{
|
||||
strSql += " AND UnitId =@UnitId ";
|
||||
listStr.Add(new SqlParameter("@UnitId", unitId));
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " AND UnitId IS NULL";
|
||||
}
|
||||
if (drpIsUsedTypeName.SelectedValue == "待审核")
|
||||
{
|
||||
strSql += " AND IsUsedTypeName = @IsUsedTypeName";
|
||||
listStr.Add(new SqlParameter("@IsUsedTypeName", "待审核"));
|
||||
}
|
||||
else if (drpIsUsedTypeName.SelectedValue == "在岗")
|
||||
{
|
||||
strSql += " AND IsUsedTypeName = @IsUsedTypeName";
|
||||
listStr.Add(new SqlParameter("@IsUsedTypeName", "在岗"));
|
||||
}
|
||||
else if (drpIsUsedTypeName.SelectedValue == "离岗")
|
||||
{
|
||||
strSql += " AND IsUsedTypeName = @IsUsedTypeName";
|
||||
listStr.Add(new SqlParameter("@IsUsedTypeName", "离岗"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND PersonName LIKE @PersonName";
|
||||
listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtCardNo.Text.Trim()))
|
||||
{
|
||||
strSql += " AND CardNo LIKE @CardNo";
|
||||
listStr.Add(new SqlParameter("@CardNo", "%" + this.txtCardNo.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtIdentityCard.Text.Trim()))
|
||||
{
|
||||
strSql += " AND IdentityCard LIKE @IdentityCard";
|
||||
listStr.Add(new SqlParameter("@IdentityCard", "%" + this.txtIdentityCard.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpTreamGroup.SelectedValue) && this.drpTreamGroup.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND TeamGroupId = @TeamGroupId";
|
||||
listStr.Add(new SqlParameter("@TeamGroupId", this.drpTreamGroup.SelectedValue));
|
||||
}
|
||||
string strSql = "select * from View_SitePerson_Person Where ProjectId=@ProjectId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@ProjectId", this.ProjectId)
|
||||
};
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != "0")
|
||||
{
|
||||
strSql += " AND UnitId =@UnitId ";
|
||||
listStr.Add(new SqlParameter("@UnitId", unitId));
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// strSql += " AND UnitId IS NULL";
|
||||
// }
|
||||
|
||||
if (this.drpPost.SelectedItemArray.Count() > 1 || (this.drpPost.SelectedValue != BLL.Const._Null && this.drpPost.SelectedItemArray.Count() == 1))
|
||||
if (drpIsUsedTypeName.SelectedValue == "待审核")
|
||||
{
|
||||
strSql += " AND IsUsedTypeName = @IsUsedTypeName";
|
||||
listStr.Add(new SqlParameter("@IsUsedTypeName", "待审核"));
|
||||
}
|
||||
else if (drpIsUsedTypeName.SelectedValue == "在岗")
|
||||
{
|
||||
strSql += " AND IsUsedTypeName = @IsUsedTypeName";
|
||||
listStr.Add(new SqlParameter("@IsUsedTypeName", "在岗"));
|
||||
}
|
||||
else if (drpIsUsedTypeName.SelectedValue == "离岗")
|
||||
{
|
||||
strSql += " AND IsUsedTypeName = @IsUsedTypeName";
|
||||
listStr.Add(new SqlParameter("@IsUsedTypeName", "离岗"));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND PersonName LIKE @PersonName";
|
||||
listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtCardNo.Text.Trim()))
|
||||
{
|
||||
strSql += " AND CardNo LIKE @CardNo";
|
||||
listStr.Add(new SqlParameter("@CardNo", "%" + this.txtCardNo.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtIdentityCard.Text.Trim()))
|
||||
{
|
||||
strSql += " AND IdentityCard LIKE @IdentityCard";
|
||||
listStr.Add(new SqlParameter("@IdentityCard", "%" + this.txtIdentityCard.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpTreamGroup.SelectedValue) &&
|
||||
this.drpTreamGroup.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND TeamGroupId = @TeamGroupId";
|
||||
listStr.Add(new SqlParameter("@TeamGroupId", this.drpTreamGroup.SelectedValue));
|
||||
}
|
||||
|
||||
if (this.drpPost.SelectedItemArray.Count() > 1 || (this.drpPost.SelectedValue != BLL.Const._Null &&
|
||||
this.drpPost.SelectedItemArray.Count() == 1))
|
||||
{
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.drpPost.SelectedValueArray)
|
||||
{
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.drpPost.SelectedValueArray)
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
{
|
||||
strSql += " OR WorkPostId = @WorkPostId" + i.ToString();
|
||||
listStr.Add(new SqlParameter("@WorkPostId" + i.ToString(), item));
|
||||
}
|
||||
|
||||
i++;
|
||||
strSql += " OR WorkPostId = @WorkPostId" + i.ToString();
|
||||
listStr.Add(new SqlParameter("@WorkPostId" + i.ToString(), item));
|
||||
}
|
||||
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.ckTrain.Checked)
|
||||
{
|
||||
strSql += " AND TrainCount =0";
|
||||
}
|
||||
if (this.ckIdCardInfoNotOK.Checked)
|
||||
{
|
||||
strSql += " AND (IdcardType is null or IdentityCard is null or PhotoUrl is null or (select count(*) from AttachFile where ToKeyId=PersonId+'#1')=0 or (select count(*) from AttachFile where ToKeyId=PersonId+'#5')=0)";
|
||||
i++;
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
strSql += ")";
|
||||
}
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
if (this.ckTrain.Checked)
|
||||
{
|
||||
strSql += " AND TrainCount =0";
|
||||
}
|
||||
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
if (this.ckIdCardInfoNotOK.Checked)
|
||||
{
|
||||
strSql +=
|
||||
" AND (IdcardType is null or IdentityCard is null or PhotoUrl is null or (select count(*) from AttachFile where ToKeyId=PersonId+'#1')=0 or (select count(*) from AttachFile where ToKeyId=PersonId+'#5')=0)";
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
string personId = Grid1.Rows[i].DataKeys[0].ToString();
|
||||
var person = BLL.PersonService.GetPersonById(personId);
|
||||
var idCard = person.IdentityCard;
|
||||
//根据身份证号码获取出生日期
|
||||
if (!string.IsNullOrEmpty(idCard))
|
||||
{
|
||||
string personId = Grid1.Rows[i].DataKeys[0].ToString();
|
||||
var person = BLL.PersonService.GetPersonById(personId);
|
||||
var idCard = person.IdentityCard;
|
||||
//根据身份证号码获取出生日期
|
||||
if (!string.IsNullOrEmpty(idCard))
|
||||
string birthDateStr = string.Empty;
|
||||
if (idCard.Length == 18)
|
||||
{
|
||||
string birthDateStr = string.Empty;
|
||||
if (idCard.Length == 18)
|
||||
// 18位身份证号码,出生日期在第7位到第14位
|
||||
birthDateStr = idCard.Substring(6, 8);
|
||||
}
|
||||
else if (idCard.Length == 15)
|
||||
{
|
||||
// 15位身份证号码,出生日期在第7位到第12位,需要加上"19"前缀
|
||||
birthDateStr = "19" + idCard.Substring(6, 6);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(birthDateStr))
|
||||
{
|
||||
// 解析日期字符串为DateTime对象
|
||||
var birthDate = DateTime.ParseExact(birthDateStr, "yyyyMMdd", null);
|
||||
if (birthDate.AddYears(60) < DateTime.Now)
|
||||
{
|
||||
// 18位身份证号码,出生日期在第7位到第14位
|
||||
birthDateStr = idCard.Substring(6, 8);
|
||||
}
|
||||
else if (idCard.Length == 15)
|
||||
{
|
||||
// 15位身份证号码,出生日期在第7位到第12位,需要加上"19"前缀
|
||||
birthDateStr = "19" + idCard.Substring(6, 6);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(birthDateStr))
|
||||
{
|
||||
// 解析日期字符串为DateTime对象
|
||||
var birthDate = DateTime.ParseExact(birthDateStr, "yyyyMMdd", null);
|
||||
if (birthDate.AddYears(60) < DateTime.Now)
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "Yellow";
|
||||
}
|
||||
Grid1.Rows[i].RowCssClass = "Yellow";
|
||||
}
|
||||
}
|
||||
// if (person.IsUsedType=="2") //待审批
|
||||
// {
|
||||
// Grid1.Rows[i].RowCssClass = "Yellow";
|
||||
// }
|
||||
}
|
||||
|
||||
// if (person.IsUsedType=="2") //待审批
|
||||
// {
|
||||
// Grid1.Rows[i].RowCssClass = "Yellow";
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+152
-152
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.SitePerson
|
||||
@@ -15,389 +15,389 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// PageManager1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// Panel1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion1 控件。
|
||||
/// panelLeftRegion1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion1;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// ContentPanel1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// ucTree control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// panelLeftRegion control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// tvProjectAndUnit 控件。
|
||||
/// tvProjectAndUnit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree tvProjectAndUnit;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// Toolbar2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// btnPersonUnit 控件。
|
||||
/// btnPersonUnit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPersonUnit;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// panelCenterRegion control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// Grid1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar3 控件。
|
||||
/// Toolbar3 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// txtPersonName 控件。
|
||||
/// txtPersonName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPersonName;
|
||||
|
||||
/// <summary>
|
||||
/// txtCardNo 控件。
|
||||
/// txtIdentityCard control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCardNo;
|
||||
|
||||
/// <summary>
|
||||
/// drpPost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPost;
|
||||
|
||||
/// <summary>
|
||||
/// drpTreamGroup 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpTreamGroup;
|
||||
|
||||
/// <summary>
|
||||
/// txtIdentityCard 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtIdentityCard;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// txtCardNo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCardNo;
|
||||
|
||||
/// <summary>
|
||||
/// drpPost control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPost;
|
||||
|
||||
/// <summary>
|
||||
/// drpTreamGroup control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpTreamGroup;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpIsUsedTypeName 控件。
|
||||
/// drpIsUsedTypeName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpIsUsedTypeName;
|
||||
|
||||
/// <summary>
|
||||
/// ckIdCardInfoNotOK 控件。
|
||||
/// ckIdCardInfoNotOK control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckIdCardInfoNotOK;
|
||||
|
||||
/// <summary>
|
||||
/// ckTrain 控件。
|
||||
/// ckTrain control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckTrain;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// ToolbarFill1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btSearch 控件。
|
||||
/// btSearch control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btSearch;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// btnNew control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnApprove 控件。
|
||||
/// btnApprove control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnApprove;
|
||||
|
||||
/// <summary>
|
||||
/// btnPersonOut 控件。
|
||||
/// btnPersonOut control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPersonOut;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// btnImport control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// btnOut control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// btnQR 控件。
|
||||
/// btnQR control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQR;
|
||||
|
||||
/// <summary>
|
||||
/// lblAge 控件。
|
||||
/// lblAge control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblAge;
|
||||
|
||||
/// <summary>
|
||||
/// lbI 控件。
|
||||
/// lbI control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbI;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// ToolbarSeparator1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// ToolbarText1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// ddlPageSize control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// Window1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// Window2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// Window3 控件。
|
||||
/// Window3 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window3;
|
||||
|
||||
/// <summary>
|
||||
/// WindowPunishRecord 控件。
|
||||
/// WindowPunishRecord control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowPunishRecord;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// Menu1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// btnMenuEdit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrinter 控件。
|
||||
/// btnPrinter control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnPrinter;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// btnMenuDelete control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
|
||||
@@ -577,9 +577,30 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
var identityCardCount = PersonService.GetPersonCountByIdentityCard(this.txtIdentityCard.Text.Trim(), this.CurrUser.LoginProjectId);
|
||||
if (identityCardCount != null)
|
||||
{
|
||||
ShowNotify("此身份证号已存在,不能重复!", MessageBoxIcon.Warning);
|
||||
var isUsed = string.Empty;
|
||||
if (person.IsUsed)
|
||||
{
|
||||
isUsed = "在岗";
|
||||
}
|
||||
else
|
||||
{
|
||||
isUsed = "离岗";
|
||||
}
|
||||
var unitName = UnitService.GetShortUnitNameByUnitId(identityCardCount.UnitId);
|
||||
Notify n = new Notify
|
||||
{
|
||||
Target = Target.Top,
|
||||
Message = "此身份证号已存在" + unitName + "单位下,不能重复,目前" + isUsed,
|
||||
MessageBoxIcon = MessageBoxIcon.Warning,
|
||||
PositionX = Position.Center,
|
||||
PositionY = Position.Top,
|
||||
DisplayMilliseconds = 10000,
|
||||
ShowHeader = false
|
||||
};
|
||||
n.Show();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//if (!BLL.PersonService.IsExistPersonByUnit(this.UnitId, this.txtPersonName.Text.Trim(), this.ProjectId))
|
||||
@@ -609,7 +630,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, person.PersonName, person.PersonId, BLL.Const.PersonListMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
|
||||
if (person.IsUsed)
|
||||
{
|
||||
//先根据身份证号码把这个人在非当前项目上且状态为在岗的改为离岗
|
||||
PersonService.UpdatePersonTypeByProjectIdAndIdentityCard(this.ProjectId,
|
||||
person.IdentityCard);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(person.PersonId))
|
||||
{
|
||||
////更新特岗人员资质
|
||||
@@ -705,7 +731,27 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
var q2 = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.IdentityCard == this.txtIdentityCard.Text.Trim() && (x.PersonId != this.PersonId || (this.PersonId == null && x.PersonId != null)));
|
||||
if (q2 != null)
|
||||
{
|
||||
ShowNotify("输入的身份证号码已存在!", MessageBoxIcon.Warning);
|
||||
var isUsed = string.Empty;
|
||||
if (q2.IsUsed)
|
||||
{
|
||||
isUsed = "在岗";
|
||||
}
|
||||
else
|
||||
{
|
||||
isUsed = "离岗";
|
||||
}
|
||||
var unitName = UnitService.GetShortUnitNameByUnitId(q2.UnitId);
|
||||
Notify n = new Notify
|
||||
{
|
||||
Target = Target.Top,
|
||||
Message = "此身份证号已存在" + unitName + "单位下,不能重复,目前" + isUsed,
|
||||
MessageBoxIcon = MessageBoxIcon.Warning,
|
||||
PositionX = Position.Center,
|
||||
PositionY = Position.Top,
|
||||
DisplayMilliseconds = 10000,
|
||||
ShowHeader = false
|
||||
};
|
||||
n.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -919,7 +965,28 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
if (q2 != null)
|
||||
{
|
||||
isok = false;
|
||||
ShowNotify("输入的身份证号码已存在!", MessageBoxIcon.Warning);
|
||||
var isUsed = string.Empty;
|
||||
if (q2.IsUsed)
|
||||
{
|
||||
isUsed = "在岗";
|
||||
}
|
||||
else
|
||||
{
|
||||
isUsed = "离岗";
|
||||
}
|
||||
var unitName = UnitService.GetShortUnitNameByUnitId(q2.UnitId);
|
||||
Notify n = new Notify
|
||||
{
|
||||
Target = Target.Top,
|
||||
Message = "此身份证号已存在" + unitName + "单位下,不能重复,目前" + isUsed,
|
||||
MessageBoxIcon = MessageBoxIcon.Warning,
|
||||
PositionX = Position.Center,
|
||||
PositionY = Position.Top,
|
||||
DisplayMilliseconds = 10000,
|
||||
ShowHeader = false
|
||||
};
|
||||
n.Show();
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
if (this.drpIdcardType.SelectedValue == "SHENFEN_ZHENGJIAN")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user