人员管理-人员信息下菜单补充公司级树
This commit is contained in:
@@ -33,21 +33,63 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
if (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.drpUnit.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnit.Enabled = false;
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
//////权限按钮方法
|
||||
//this.GetButtonPower();
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
if (project != null)
|
||||
{
|
||||
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", project.StartDate);
|
||||
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddDays(1));
|
||||
GetPersonStatistic();
|
||||
}
|
||||
/// <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.BindGrid();
|
||||
|
||||
//this.GetButtonPower();
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
private void InitDropDownList()
|
||||
{
|
||||
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnit.Enabled = false;
|
||||
}
|
||||
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
|
||||
}
|
||||
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
if (project != null)
|
||||
{
|
||||
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", project.StartDate);
|
||||
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddDays(1));
|
||||
this.GetPersonStatistic();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,12 +108,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
if (!string.IsNullOrEmpty(this.txtStartDate.Text.Trim()))
|
||||
{
|
||||
startTime = this.txtStartDate.Text.Trim();
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtEndDate.Text.Trim()))
|
||||
{
|
||||
endTime = this.txtEndDate.Text.Trim();
|
||||
}
|
||||
if (this.drpUnit.SelectedValue != Const._Null)
|
||||
if (this.drpUnit.SelectedValue != null && this.drpUnit.SelectedValue != Const._Null)
|
||||
{
|
||||
unitId = this.drpUnit.SelectedValue;
|
||||
}
|
||||
@@ -79,7 +121,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
unitId = null;
|
||||
}
|
||||
if (this.drpWorkPost.SelectedValue != Const._Null)
|
||||
if (this.drpWorkPost.SelectedValue != null && this.drpWorkPost.SelectedValue != Const._Null)
|
||||
{
|
||||
workPostId = this.drpWorkPost.SelectedValue;
|
||||
}
|
||||
@@ -172,7 +214,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
html = (row.FindControl("labNumber") as AspNet.Label).Text;
|
||||
}
|
||||
|
||||
|
||||
sb.AppendFormat("<td>{0}</td>", html);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user