数据穿透新增页面
This commit is contained in:
@@ -40,7 +40,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT S.SuperviseCheckReportId,S.SuperviseCheckReportCode,S.CheckDate,S.ProjectId,P.ProjectName,S.UnitId,u.UnitName,S.CheckTeam,S.EvaluationResult,S.AttachUrl,S.IsIssued"
|
||||
string strSql = @"SELECT S.SuperviseCheckReportId,S.SuperviseCheckReportCode,S.CheckDate,S.ProjectId,P.ProjectName,S.UnitId,u.UnitName,S.CheckTeam,S.EvaluationResult,S.AttachUrl,S.IsIssued,case S.CheckType when '1' then '企业负责人带班检查' when '2' then '企业综合检查' when '3' then '企业专项检查' else '' end as CheckTypeName"
|
||||
+ @" FROM dbo.Supervise_SuperviseCheckReport AS S"
|
||||
+ @" LEFT JOIN dbo.Base_Project AS P ON P.ProjectId=S.ProjectId"
|
||||
+ @" LEFT JOIN dbo.Base_Unit AS U ON U.UnitId=S.UnitId"
|
||||
@@ -51,6 +51,12 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
strSql += " AND (S.SuperviseCheckReportCode like @name OR P.ProjectName like @name OR u.UnitName like @name OR S.CheckTeam like @name OR S.EvaluationResult like @name)";
|
||||
listStr.Add(new SqlParameter("@name", "%" + this.txtName.Text.Trim() + "%"));
|
||||
}
|
||||
var thisUnit = BLL.CommonService.GetIsThisUnit();
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && thisUnit.UnitId != this.CurrUser.UnitId)
|
||||
{
|
||||
strSql += " AND P.UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user