20210709
This commit is contained in:
@@ -179,7 +179,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
unitId = str[0];
|
||||
}
|
||||
}
|
||||
|
||||
string strSql = "select * from View_SitePerson_Person Where ProjectId=@ProjectId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
@@ -190,17 +189,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
strSql += " AND UnitId =@UnitId ";
|
||||
listStr.Add(new SqlParameter("@UnitId", unitId));
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// strSql += " AND UnitId IS NULL";
|
||||
//}
|
||||
|
||||
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";
|
||||
@@ -238,9 +231,17 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
strSql += " AND TrainCount =0";
|
||||
}
|
||||
if (this.ckIspost.Checked)
|
||||
{
|
||||
strSql += " AND IsUsedName ='否'";
|
||||
}
|
||||
if (this.ckJT.Checked)
|
||||
{
|
||||
strSql += " AND RealNameAddTime IS NULL";
|
||||
}
|
||||
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)";
|
||||
strSql += " AND (IdcardType is null or IdentityCard is null or PhotoUrl is null or HeadImage IS NULL OR (LEN(IdentityCard) != 15 AND LEN(IdentityCard) != 18))";
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
@@ -250,20 +251,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
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 isNull = from x in db.EduTrain_TrainRecordDetail
|
||||
join y in db.EduTrain_TrainRecord on x.TrainingId equals y.TrainingId
|
||||
where y.ProjectId == this.ProjectId && x.PersonId == personId
|
||||
select x;
|
||||
if (isNull.Count() == 0) ////未参加过培训的人员
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "Red";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -594,7 +581,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员信息" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
//this.Grid1.PageSize = this.;
|
||||
this.Grid1.PageSize = this.Grid1.RecordCount;
|
||||
BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
@@ -734,11 +721,14 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
var getPersons = from x in Funs.DB.SitePerson_Person
|
||||
where x.ProjectId == this.ProjectId && x.HeadImage == null && x.PhotoUrl != null
|
||||
select x;
|
||||
int num = 0;
|
||||
foreach (var item in getPersons)
|
||||
{
|
||||
item.HeadImage = AttachFileService.SetImageToByteArray(Funs.RootPath + item.PhotoUrl);
|
||||
Funs.DB.SubmitChanges();
|
||||
num++;
|
||||
}
|
||||
ShowNotify("操作完成,新转二进制照片" + num.ToString() + "条", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user