安全检查,补充公司级树
This commit is contained in:
@@ -40,15 +40,21 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
|
||||
UserService.InitUserDropDownList(this.drpUser, this.ProjectId, true);
|
||||
this.drpUser.SelectedValue = this.CurrUser.UserId;
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
@@ -59,11 +65,32 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
private void InitDropDownList()
|
||||
{
|
||||
UserService.InitUserDropDownList(this.drpUser, this.ProjectId, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.InitDropDownList();
|
||||
this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string strSql = "SELECT H.HSEDiaryId,H.ProjectId,H.DiaryDate,H.UserId,U.UserName,Unit.UnitCode,Unit.UnitName,H.DailySummary,H.TomorrowPlan"
|
||||
+ @" FROM Project_HSEDiary AS H"
|
||||
+ @" LEFT JOIN Sys_User AS U ON H.UserId=U.UserId "
|
||||
@@ -71,7 +98,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
+ @" WHERE H.ProjectId= '" + this.ProjectId + "'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
if (this.drpUser.SelectedValue != Const._Null)
|
||||
if (this.drpUser.SelectedValue != null && this.drpUser.SelectedValue != Const._Null)
|
||||
{
|
||||
strSql += " AND H.UserId = @UserId";
|
||||
listStr.Add(new SqlParameter("@UserId", this.drpUser.SelectedValue));
|
||||
@@ -212,7 +239,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.ProjectHSEDiaryMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, Const.ProjectHSEDiaryMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
//if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
@@ -285,7 +312,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
{
|
||||
if (getHSEDiary.DiaryDate.HasValue && !string.IsNullOrEmpty(getHSEDiary.UserId))
|
||||
{
|
||||
|
||||
|
||||
Bookmark bookmarkDateTime = doc.Range.Bookmarks["DateTime"];
|
||||
if (bookmarkDateTime != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user