提交代码

This commit is contained in:
2024-11-27 15:21:14 +08:00
parent ef607782ee
commit 22809fa59f
23 changed files with 757 additions and 70 deletions
@@ -98,6 +98,21 @@ namespace FineUIPro.Web.HSSE.Hazard
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.hdId.Text))
{
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
return;
}
if (this.rbRectification.Hidden == false && string.IsNullOrEmpty(this.rbRectification.SelectedValue))
{
Alert.ShowInTop("请选择整改情况!", MessageBoxIcon.Warning);
return;
}
if (this.txtRectification.Hidden == false && string.IsNullOrEmpty(this.txtRectification.Text.Trim()))
{
Alert.ShowInTop("请输入整改情况!", MessageBoxIcon.Warning);
return;
}
this.SaveData(BLL.Const.BtnSave);
}
#endregion
@@ -116,8 +131,15 @@ namespace FineUIPro.Web.HSSE.Hazard
string str = string.Empty;
if (this.rbCheckResult.SelectedValue == "不符合")
{
check.Rectification = rbRectification.SelectedValue;
str = rbRectification.SelectedValue;
if (this.rbRectification.Hidden == false)
{
check.Rectification = rbRectification.SelectedValue;
str = rbRectification.SelectedValue;
}
else
{
check.Rectification = txtRectification.Text.Trim();
}
}
if (!string.IsNullOrEmpty(this.ConstructionRiskCheckId))
{
@@ -127,7 +149,7 @@ namespace FineUIPro.Web.HSSE.Hazard
}
else
{
check.ConstructionRiskCheckId = SQLHelper.GetNewID();
check.ConstructionRiskCheckId = this.hdId.Text;
BLL.ConstructionRiskCheckService.AddConstructionRiskCheck(check);
str += "|" + check.ConstructionRiskCheckId;
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(str) + ActiveWindow.GetHidePostBackReference());
@@ -144,11 +166,37 @@ namespace FineUIPro.Web.HSSE.Hazard
if (this.rbCheckResult.SelectedValue == "符合")
{
this.rbRectification.Hidden = true;
this.txtRectification.Hidden = true;
}
else
{
this.rbRectification.Hidden = false;
var projectUnit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.CurrUser.LoginProjectId,this.CurrUser.UnitId);
if (projectUnit != null && projectUnit.UnitType == BLL.Const.ProjectUnitType_2)
{
this.txtRectification.Hidden = false;
}
else
{
this.rbRectification.Hidden = false;
}
}
}
#region
/// <summary>
/// 上传附件资源
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
string edit = "0";
if (string.IsNullOrEmpty(this.hdId.Text))
{
this.hdId.Text = SQLHelper.GetNewID();
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ConstructionRiskControlCheck&menuId={1}&edit={2}", this.hdId.Text, BLL.Const.ConstructionRiskMenuId, edit)));
}
#endregion
}
}