补充公司级树

This commit is contained in:
夏菊 2025-04-10 19:39:18 +08:00
parent f550c9c63c
commit ae90319ee4
2 changed files with 12 additions and 9 deletions

View File

@ -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("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;行数据吗?", 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()

View File

@ -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();
}
/// <summary>
@ -98,7 +102,7 @@ namespace FineUIPro.Web.ThreeYearAction.FireGasSafety
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
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));