fix:项目树
This commit is contained in:
@@ -9,6 +9,33 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
public partial class JointCheckChartStatistics : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.AnalyseData();
|
||||
}
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
@@ -19,6 +46,17 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) )
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
}
|
||||
this.txtStartRectificationTime.Text = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd");
|
||||
this.txtEndRectificationTime.Text = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
}
|
||||
@@ -48,6 +86,10 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
/// </summary>
|
||||
private void AnalyseData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (this.rblState.SelectedValue == "0")
|
||||
{
|
||||
|
||||
@@ -68,7 +110,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
strSql += " group by UnitId,unitName ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
@@ -140,7 +182,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
strSql += " group by QuestionDef,QuestionTypeStr ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Reference in New Issue
Block a user