补充公司级别树
This commit is contained in:
@@ -54,23 +54,49 @@ namespace FineUIPro.Web.HSSE.Hazard
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.BindGrid();
|
||||
|
||||
this.GetButtonPower();
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string strSql = "select HazardList.HazardListId,HazardList.VersionNo,HazardList.WorkStage,Users.UserName,HazardList.CompileDate,CodeRecords.Code AS HazardListCode,HazardList.WorkAreaName,HazardList.IdentificationDate,ControllingPersonUsers.UserName AS ControllingPersonName "
|
||||
+ @" ,(CASE WHEN HazardList.States = " + BLL.Const.State_0 + " OR HazardList.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN HazardList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||
+ @" from Hazard_HazardList AS HazardList "
|
||||
@@ -85,11 +111,12 @@ namespace FineUIPro.Web.HSSE.Hazard
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
strSql += " AND HazardList.States = @States"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2)); }
|
||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtHazardListCode.Text.Trim()))
|
||||
{
|
||||
@@ -178,7 +205,7 @@ namespace FineUIPro.Web.HSSE.Hazard
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
int count = BLL.Hazard_HazardListService.GetHazardListCountByVersionNoIsNull( this.ProjectId);
|
||||
int count = BLL.Hazard_HazardListService.GetHazardListCountByVersionNoIsNull(this.ProjectId);
|
||||
if (count > 0)
|
||||
{
|
||||
Alert.ShowInTop("风险评估版本号还未生成,不能进行操作!", MessageBoxIcon.Warning);
|
||||
@@ -223,7 +250,7 @@ namespace FineUIPro.Web.HSSE.Hazard
|
||||
if (getV != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, getV.HazardListCode, getV.HazardListId, BLL.Const.ProjectHazardListMenuId, BLL.Const.BtnDelete);
|
||||
BLL.Hazard_HazardSelectedItemService.DeleteHazardSelectedItemByHazardListId(rowID);
|
||||
BLL.Hazard_HazardSelectedItemService.DeleteHazardSelectedItemByHazardListId(rowID);
|
||||
BLL.Hazard_HazardListService.DeleteHazardListByHazardListId(rowID);
|
||||
}
|
||||
}
|
||||
@@ -341,7 +368,7 @@ namespace FineUIPro.Web.HSSE.Hazard
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList( this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectHazardListMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectHazardListMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
||||
Reference in New Issue
Block a user