补充公司级别树

This commit is contained in:
2025-04-09 19:14:54 +08:00
parent 8514fb0156
commit 023e3d33cf
86 changed files with 5694 additions and 3375 deletions
@@ -47,7 +47,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit
{
this.ProjectId = Request.Params["projectId"];
}
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
this.InitDropDownList();
//if (BLL.SubcontractLeasingProtocolService.GetSubcontractLeasingProtocolTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
//{
// this.drpUnit.SelectedValue = this.CurrUser.UnitId;
@@ -59,8 +59,6 @@ namespace FineUIPro.Web.HSSE.QualityAudit
Grid1.PageSize = this.CurrUser.PageSize.Value;
}
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
this.BindGrid();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
@@ -69,20 +67,24 @@ namespace FineUIPro.Web.HSSE.QualityAudit
////权限按钮方法
this.GetButtonPower();
}
// 绑定表格
this.BindGrid();
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDropDownList(this.drpUnit, 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))
if (string.IsNullOrEmpty(this.ProjectId))
{
btnNew.Hidden = true;
}
this.BindGrid();
}
/// <summary>
@@ -100,10 +102,10 @@ namespace FineUIPro.Web.HSSE.QualityAudit
left join Sys_User as z on z.UserId=x.CompileMan
where 1=1");
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
if (!string.IsNullOrEmpty(this.ProjectId))
{
sb.Append(" AND x.ProjectId = @ProjectId ");
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
}
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
@@ -133,33 +135,6 @@ namespace FineUIPro.Web.HSSE.QualityAudit
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
//string unitId = this.drpUnit.SelectedValue;
//var db = Funs.DB;
//var queryData = from x in db.QualityAudit_SubcontractLeasingProtocol
// join y in db.Sys_User on x.CompileMan equals y.UserId
// join z in db.Base_Unit on x.UnitId equals z.UnitId
// where x.ProjectId == this.ProjectId
// && (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim()))
// && (string.IsNullOrEmpty(txtName.Text.Trim()) || x.Name.Contains(txtName.Text.Trim()))
// && (string.IsNullOrEmpty(unitId) || x.UnitId == unitId)
// select new
// {
// x.Id,
// x.Code,
// x.Name,
// x.UnitId,
// UnitName = z.UnitName,
// x.Content,
// x.CompileMan,
// x.CompileDate,
// x.ValidStartDate,
// x.ValidEndDate,
// CompileManName = y.UserName
// };
//Grid1.RecordCount = queryData.Count();
//Grid1.DataSource = queryData;
//Grid1.DataBind();
}
/// <summary>