20241012 Contractor Quality Punishment设置查看全部权限
This commit is contained in:
parent
7d5c5d55c5
commit
b7b87e2240
|
@ -1,7 +1,9 @@
|
||||||
using System;
|
using NPOI.SS.Formula.Atp;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Web.Security;
|
||||||
|
|
||||||
namespace BLL
|
namespace BLL
|
||||||
{
|
{
|
||||||
|
@ -45,7 +47,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
var bt = from x in Funs.DB.Sys_ButtonPower
|
var bt = from x in Funs.DB.Sys_ButtonPower
|
||||||
join y in Funs.DB.Sys_Menu on x.MenuId equals y.MenuId
|
join y in Funs.DB.Sys_Menu on x.MenuId equals y.MenuId
|
||||||
where x.RoleId == roleId
|
where x.RoleId == roleId
|
||||||
select x;
|
select x;
|
||||||
|
|
||||||
if (bt.Count() > 0)
|
if (bt.Count() > 0)
|
||||||
|
@ -104,8 +106,25 @@ namespace BLL
|
||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
return false;
|
return false;
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据用户id获取有ViewAll按钮权限用户
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.Sys_User GetButtonPowerByUserId(string userId)
|
||||||
|
{
|
||||||
|
var q = (from x in Funs.DB.Sys_User
|
||||||
|
join y in Funs.DB.Sys_Role on x.RoleId equals y.RoleId
|
||||||
|
join z in Funs.DB.Sys_ButtonPower on y.RoleId equals z.RoleId
|
||||||
|
join w in Funs.DB.Sys_ButtonToMenu on z.ButtonToMenuId equals w.ButtonToMenuId
|
||||||
|
where w.ButtonEnName == "ViewAll"
|
||||||
|
&& x.UserId == userId
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
return q;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -41,7 +41,8 @@ namespace FineUIPro.Web.SES
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
{
|
{
|
||||||
string strSql = string.Empty;
|
string strSql = string.Empty;
|
||||||
if (this.CurrUser.UserId == BLL.Const.GlyId)
|
var user = BLL.Sys_ButtonPowerService.GetButtonPowerByUserId(this.CurrUser.UserId);
|
||||||
|
if (this.CurrUser.UserId == BLL.Const.GlyId || user != null)
|
||||||
{
|
{
|
||||||
strSql = @"SELECT * FROM dbo.View_EMC_Que_Punishment WHERE Flag='2' ";
|
strSql = @"SELECT * FROM dbo.View_EMC_Que_Punishment WHERE Flag='2' ";
|
||||||
}
|
}
|
||||||
|
|
|
@ -391,7 +391,7 @@ namespace FineUIPro.Web.SES
|
||||||
{
|
{
|
||||||
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||||
//模板文件
|
//模板文件
|
||||||
string TempletFileName = rootPath + "Punishment.xlsx";
|
string TempletFileName = rootPath + "CSafePunish.xlsx";
|
||||||
//导出文件
|
//导出文件
|
||||||
string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
|
string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
|
||||||
if (!Directory.Exists(filePath))
|
if (!Directory.Exists(filePath))
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
||||||
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
|
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
|
||||||
</httpHandlers>
|
</httpHandlers>
|
||||||
<compilation debug="true" targetFramework="4.6.1">
|
<compilation debug="false" targetFramework="4.6.1">
|
||||||
<buildProviders>
|
<buildProviders>
|
||||||
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
|
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
|
||||||
</buildProviders>
|
</buildProviders>
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||||
|
|
Loading…
Reference in New Issue