提交代码

This commit is contained in:
2025-02-18 15:12:04 +08:00
parent d8cd15555d
commit 1697e69054
12 changed files with 277 additions and 86 deletions
@@ -123,6 +123,14 @@ namespace FineUIPro.Web.HSSE.Hazard
{
this.drpLicenseDes.SelectedValueArray = constructionRisk.LicenseDes.Split(',');
}
if (constructionRisk.IsLarge == true)
{
this.cbIsLarge.Checked = true;
}
if (constructionRisk.IsSuperLarge == true)
{
this.cbIsSuperLarge.Checked = true;
}
this.hdCoordinate.Text = constructionRisk.Coordinate;
constructionRiskControls = (from x in Funs.DB.HSSE_ConstructionRiskControl where x.ConstructionRiskId == this.ConstructionRiskId orderby x.ShowIndex select x).ToList();
gvApprove.DataSource = BLL.ConstructionRiskApproveService.getListData(this.ConstructionRiskId);
@@ -199,11 +207,10 @@ namespace FineUIPro.Web.HSSE.Hazard
///区域下拉框
BLL.MainItemService.InitMainItemDownList(this.drpWorkArea, this.ProjectId, true);
drpRefLicense.DataValueField = "LicenseTypeName";
drpRefLicense.DataTextField = "LicenseTypeName";
drpRefLicense.DataSource = (from x in Funs.DB.Base_LicenseType orderby x.LicenseTypeCode select x).ToList();
drpRefLicense.DataValueField = "Value";
drpRefLicense.DataTextField = "Text";
drpRefLicense.DataSource = BLL.ConstructionRiskListService.RefLicenseList();
drpRefLicense.DataBind();
Funs.FineUIPleaseSelect(this.drpRefLicense);
this.drpRiskLevel.DataTextField = "Text";
this.drpRiskLevel.DataValueField = "Value";
this.drpRiskLevel.DataSource = BLL.ConstructionRiskListService.RiskLevelList();
@@ -388,6 +395,14 @@ namespace FineUIPro.Web.HSSE.Hazard
{
newConstructionRisk.SubUnitDutyPerson = this.drpSubUnitDutyPerson.SelectedValue;
}
if (this.cbIsLarge.Checked)
{
newConstructionRisk.IsLarge = true;
}
if (this.cbIsSuperLarge.Checked)
{
newConstructionRisk.IsSuperLarge = true;
}
newConstructionRisk.DateA = Funs.GetNewDateTime(this.dpDateA.Text.Trim());
newConstructionRisk.DateZ = Funs.GetNewDateTime(this.dpDateZ.Text.Trim());
if (this.drpLicenseDes.SelectedValueArray.Length == 1 && this.drpLicenseDes.SelectedValue == BLL.Const._Null)
@@ -627,7 +642,7 @@ namespace FineUIPro.Web.HSSE.Hazard
protected void btnAdd_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.ConstructionRiskId))
if (string.IsNullOrEmpty(this.hdConstructionRiskId.Text))
{
this.hdConstructionRiskId.Text = SQLHelper.GetNewID(typeof(Model.Hazard_EnvironmentalRiskList));
}
@@ -643,7 +658,7 @@ namespace FineUIPro.Web.HSSE.Hazard
protected void drpRefLicense_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.drpRefLicense.SelectedValueArray.Length == 1 && this.drpRefLicense.SelectedValue == BLL.Const._Null)
if (this.drpRefLicense.SelectedValueArray.Length == 1 && this.drpRefLicense.SelectedValue == "不涉及")
{
this.drpRiskLevel.DataSource = BLL.ConstructionRiskListService.RiskLevelList();
}
@@ -771,5 +786,27 @@ namespace FineUIPro.Web.HSSE.Hazard
this.drpMainUnitCheckPerson.SelectedValueArray = strs.ToArray();
}
}
protected void cbIsLarge_CheckedChanged(object sender, CheckedEventArgs e)
{
if (this.cbIsSuperLarge.Checked)
{
this.drpRiskLevel.DataSource = BLL.ConstructionRiskListService.RiskLevelList3();
}
else
{
if (this.cbIsLarge.Checked)
{
this.drpRiskLevel.DataSource = BLL.ConstructionRiskListService.RiskLevelList2();
}
else
{
this.drpRiskLevel.DataSource = BLL.ConstructionRiskListService.RiskLevelList();
}
}
this.drpRiskLevel.DataBind();
Funs.FineUIPleaseSelect(this.drpRiskLevel);
this.drpRiskLevel.SelectedValue = BLL.Const._Null;
}
}
}