From ae90319ee4544a615d6edb8e35969525ad049d71 Mon Sep 17 00:00:00 2001
From: xiaju <1784803958@qq.com>
Date: Thu, 10 Apr 2025 19:39:18 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=85=AC=E5=8F=B8=E7=BA=A7?=
=?UTF-8?q?=E6=A0=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.cs | 9 ++++-----
.../EquipmentAndMaterialInspection.aspx.cs | 12 ++++++++----
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.cs b/SUBQHSE/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.cs
index e8ee144..31c24ef 100644
--- a/SUBQHSE/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.cs
@@ -70,7 +70,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
{
this.ProjectId = Request.Params["projectId"];
}
-
+ this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
Funs.DropDownPageSize(this.ddlPageSize);
@@ -79,7 +79,6 @@ namespace FineUIPro.Web.HSSE.EduTrain
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的 行数据吗?", Grid1.GetSelectedCountReference());
- this.InitDropDownList();
//培训类型
BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true);
trainType = Request.Params["trainType"];
@@ -91,8 +90,6 @@ namespace FineUIPro.Web.HSSE.EduTrain
BLL.TrainLevelService.InitTrainLevelDropDownList(this.drpTrainLevel, true);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
- // 绑定表格
- BindGrid();
if (this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId)
{
this.btnRefresh.Hidden = false;
@@ -104,6 +101,8 @@ namespace FineUIPro.Web.HSSE.EduTrain
////权限按钮方法
this.GetButtonPower();
}
+ // 绑定表格
+ BindGrid();
}
}
protected void changeTree(object sender, EventArgs e)
@@ -117,12 +116,12 @@ namespace FineUIPro.Web.HSSE.EduTrain
{
this.UnitId = "";
}
- this.BindGrid();
this.GetButtonPower();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
+ this.BindGrid();
}
private void InitDropDownList()
diff --git a/SUBQHSE/FineUIPro.Web/ThreeYearAction/FireGasSafety/EquipmentAndMaterialInspection.aspx.cs b/SUBQHSE/FineUIPro.Web/ThreeYearAction/FireGasSafety/EquipmentAndMaterialInspection.aspx.cs
index 3056cb7..23daa1d 100644
--- a/SUBQHSE/FineUIPro.Web/ThreeYearAction/FireGasSafety/EquipmentAndMaterialInspection.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/ThreeYearAction/FireGasSafety/EquipmentAndMaterialInspection.aspx.cs
@@ -47,6 +47,7 @@ namespace FineUIPro.Web.ThreeYearAction.FireGasSafety
{
this.ProjectId = Request.Params["projectId"];
}
+ this.InitDropDownList();
////权限按钮方法
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
@@ -57,7 +58,6 @@ namespace FineUIPro.Web.ThreeYearAction.FireGasSafety
this.GetButtonPower();
}
this.btnNew.OnClientClick = Window1.GetShowReference("EquipmentAndMaterialInspectionEdit.aspx") + "return false;";
- BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true);
// 绑定表格
this.BindGrid();
}
@@ -68,16 +68,20 @@ namespace FineUIPro.Web.ThreeYearAction.FireGasSafety
// BindGrid();
//}
}
-
+ private void InitDropDownList()
+ {
+ BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.ProjectId, true);
+ }
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
- this.BindGrid();
+ this.InitDropDownList();
this.GetButtonPower();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
+ this.BindGrid();
}
///
@@ -98,7 +102,7 @@ namespace FineUIPro.Web.ThreeYearAction.FireGasSafety
where C.ProjectId = @ProjectId";
List listStr = new List();
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
- if (sdrpUnitId.SelectedValue != BLL.Const._Null)
+ if (this.sdrpUnitId.SelectedValue != null && this.sdrpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND C.UnitId=@UnitId";
listStr.Add(new SqlParameter("@UnitId", sdrpUnitId.SelectedValue));