0813
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Center" Width="90px" WindowID="WindowAtt" HeaderText="证书扫描件"
|
||||
Text="查看" ToolTip="附件上传查看" DataIFrameUrlFields="SafePersonQualityId" DataIFrameUrlFormatString="../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SafePersonQualityAttachUrl&menuId=750F5074-45B9-470E-AE1E-6204957421E6&type=-1"
|
||||
Text="查看" ToolTip="附件上传查看" DataIFrameUrlFields="SafePersonQualityId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SafePersonQualityAttachUrl&menuId=750F5074-45B9-470E-AE1E-6204957421E6&type=-1"
|
||||
HeaderTextAlign="Center" ColumnID="attWindow" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
|
||||
@@ -60,12 +60,9 @@
|
||||
<f:RenderField Width="220px" ColumnID="IdentityCard" DataField="IdentityCard" SortField="IdentityCard"
|
||||
FieldType="String" HeaderText="身份证号码" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="tfIntoOut" Width="150px" HeaderText="进/出" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblIntoOut" runat="server" Text='<%# ConvertIntoOut(Eval("IntoOut")) %>'
|
||||
ToolTip='<%#ConvertIntoOut(Eval("IntoOut")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="IntoOut" DataField="IntoOut" SortField="IntoOut"
|
||||
FieldType="String" HeaderText="进/出" HeaderTextAlign="Center" TextAlign="Center" RendererFunction="renderGender">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="240px" ColumnID="IntoOutTime" DataField="IntoOutTime" SortField="IntoOutTime"
|
||||
FieldType="String" HeaderText="时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
@@ -90,5 +87,10 @@
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
<script>
|
||||
function renderGender(value) {
|
||||
return value == '1' ? '进场' : '出场';
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -362,7 +362,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
checking.UnitName = col0;
|
||||
checking.PersonName = col1;
|
||||
checking.IdentityCard = col2;
|
||||
checking.IntoOut = (col3 == "进"? "1": "0");
|
||||
checking.IntoOut = col3 == "进" ? "1" : "0";
|
||||
checking.IntoOutTime = Convert.ToDateTime(col4);
|
||||
var person = BLL.PersonService.GetPersonByIdentityCard(this.CurrUser.LoginProjectId, checking.IdentityCard);
|
||||
if (person != null)
|
||||
@@ -403,15 +403,13 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
int a = viewCheckings.Count();
|
||||
for (int i = 0; i < a; i++)
|
||||
{
|
||||
Model.SitePerson_Checking newChecking = new Model.SitePerson_Checking
|
||||
{
|
||||
CheckingId = viewCheckings[i].CheckingId,
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
IdentityCard = viewCheckings[i].IdentityCard,
|
||||
IntoOutTime = viewCheckings[i].IntoOutTime,
|
||||
IntoOut = viewCheckings[i].IntoOut,
|
||||
PersonId = viewCheckings[i].PersonId
|
||||
};
|
||||
Model.SitePerson_Checking newChecking = new Model.SitePerson_Checking();
|
||||
newChecking.CheckingId = viewCheckings[i].CheckingId;
|
||||
newChecking.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newChecking.IdentityCard = viewCheckings[i].IdentityCard;
|
||||
newChecking.IntoOutTime = viewCheckings[i].IntoOutTime;
|
||||
newChecking.IntoOut = viewCheckings[i].IntoOut;
|
||||
newChecking.PersonId = viewCheckings[i].PersonId;
|
||||
BLL.SitePerson_CheckingService.AddPersonInfo(newChecking);
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
@@ -466,29 +464,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 转换字符串
|
||||
/// <summary>
|
||||
/// 把进出转换为字符串类型
|
||||
/// </summary>
|
||||
/// <param name="sex"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertIntoOut(object intoOut)
|
||||
{
|
||||
if (intoOut != null)
|
||||
{
|
||||
if (Convert.ToBoolean(intoOut) == true)
|
||||
{
|
||||
return "进场";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "出场";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -120,15 +120,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// lblIntoOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblIntoOut;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -240,6 +240,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
else
|
||||
{
|
||||
this.InitProjectDropDownList();
|
||||
var unit = BLL.UnitService.GetUnitByUnitId(this.UnitId);
|
||||
if (unit != null)
|
||||
{
|
||||
@@ -293,45 +294,48 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.txtPersonName.Text))
|
||||
if (string.IsNullOrEmpty(this.txtOutTime.Text.Trim()))
|
||||
{
|
||||
ShowNotify("人员姓名不能为空!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpIdcardType.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择证件类型!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.txtIdentityCard.Text))
|
||||
{
|
||||
ShowNotify("证件号码不能为空!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//if (string.IsNullOrEmpty(this.txtIdcardStartDate.Text))
|
||||
//{
|
||||
// ShowNotify("证件开始日期不能为空!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (this.txtIdcardEndDate.Enabled == true && string.IsNullOrEmpty(this.txtIdcardEndDate.Text.Trim()))
|
||||
//{
|
||||
// ShowNotify("证件有效日期不能为空!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
if (this.drpTeamGroup.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择所属班组!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpPost.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择所属岗位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.txtInTime.Text))
|
||||
{
|
||||
ShowNotify("入场时间不能为空!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
if (string.IsNullOrEmpty(this.txtPersonName.Text))
|
||||
{
|
||||
ShowNotify("人员姓名不能为空!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpIdcardType.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择证件类型!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.txtIdentityCard.Text))
|
||||
{
|
||||
ShowNotify("证件号码不能为空!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//if (string.IsNullOrEmpty(this.txtIdcardStartDate.Text))
|
||||
//{
|
||||
// ShowNotify("证件开始日期不能为空!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (this.txtIdcardEndDate.Enabled == true && string.IsNullOrEmpty(this.txtIdcardEndDate.Text.Trim()))
|
||||
//{
|
||||
// ShowNotify("证件有效日期不能为空!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
if (this.drpTeamGroup.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择所属班组!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpPost.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择所属岗位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.txtInTime.Text))
|
||||
{
|
||||
ShowNotify("入场时间不能为空!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
SaveData();
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
@@ -481,15 +485,18 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
person.Birthday = Convert.ToDateTime(this.txtBirthday.Text.Trim());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(imgPhoto.ImageUrl) && imgPhoto.ImageUrl != "~/res/images/blank_150.png")
|
||||
if (string.IsNullOrEmpty(this.txtOutTime.Text.Trim()))
|
||||
{
|
||||
person.PhotoUrl = imgPhoto.ImageUrl.Replace("~/", "");
|
||||
person.HeadImage = AttachFileService.SetImageToByteArray(Funs.RootPath + person.PhotoUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
person.PhotoUrl = null;
|
||||
person.HeadImage = null;
|
||||
if (!string.IsNullOrEmpty(imgPhoto.ImageUrl) && imgPhoto.ImageUrl != "~/res/images/blank_150.png")
|
||||
{
|
||||
person.PhotoUrl = imgPhoto.ImageUrl.Replace("~/", "");
|
||||
person.HeadImage = AttachFileService.SetImageToByteArray(Funs.RootPath + person.PhotoUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
person.PhotoUrl = null;
|
||||
person.HeadImage = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtAuditorDate.Text))
|
||||
@@ -590,12 +597,14 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
BLL.PersonQualityService.AddPersonQuality(newPersonQuality);
|
||||
}
|
||||
}
|
||||
|
||||
///上传人脸库
|
||||
var getProject = ProjectService.GetProjectByProjectId(person.ProjectId);
|
||||
if (!string.IsNullOrEmpty(person.PhotoUrl) && getProject != null && getProject.IsFace == true)
|
||||
{
|
||||
Alert.ShowInParent(APIPersonService.PersonFace(person), MessageBoxIcon.Warning);
|
||||
if (string.IsNullOrEmpty(this.txtOutTime.Text.Trim()))
|
||||
{
|
||||
///上传人脸库
|
||||
var getProject = ProjectService.GetProjectByProjectId(person.ProjectId);
|
||||
if (!string.IsNullOrEmpty(person.PhotoUrl) && getProject != null && getProject.IsFace == true)
|
||||
{
|
||||
Alert.ShowInParent(APIPersonService.PersonFace(person), MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user