人员管理-人员信息下菜单补充公司级树
This commit is contained in:
@@ -45,26 +45,62 @@ namespace FineUIPro.Web.HSSE.QualityAudit
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnitId.Enabled = false;
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
}
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <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();
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
private void InitDropDownList()
|
||||
{
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnitId.Enabled = false;
|
||||
}
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
}
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string strSql = @"SELECT DISTINCT InTime,PersonQuality.PersonQualityId,Person.PersonId,Person.ProjectId,Person.CardNo,Person.PersonName,Unit.UnitId,Unit.UnitCode,Unit.UnitName,WorkPost.WorkPostId,WorkPost.WorkPostName,WorkPost.WorkPostCode,"
|
||||
+ @" PersonQuality.CertificateNo,Certificate.CertificateName,PersonQuality.Grade,PersonQuality.SendUnit,PersonQuality.SendDate,PersonQuality.LimitDate,PersonQuality.LateCheckDate,"
|
||||
+ @" PersonQuality.ApprovalPerson,PersonQuality.Remark,PersonQuality.CompileMan,Users.UserName AS CompileManName,PersonQuality.CompileDate,Auditor.UserName AS AuditorName,AuditDate,"
|
||||
@@ -81,7 +117,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit
|
||||
strSql += " AND Person.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
|
||||
if (this.drpUnitId.SelectedValue != Const._Null)
|
||||
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != Const._Null)
|
||||
{
|
||||
strSql += " AND Person.UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
||||
@@ -219,7 +255,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PersonQualityMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.PersonQualityMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
|
||||
Reference in New Issue
Block a user