安全检查补充公司级树
This commit is contained in:
parent
023e3d33cf
commit
3db3510a9d
|
@ -1,5 +1,7 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProblemNoticeManager.aspx.cs" Inherits="FineUIPro.Web.Customization.CNCCG.ZHGL.Problem.ProblemNoticeManager" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
@ -15,8 +17,20 @@
|
|||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="问题督导整改通知单" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProNoticeId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
|
@ -121,6 +135,8 @@
|
|||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="新增" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1300px" Height="660px" OnClose="Window1_Close">
|
||||
</f:Window>
|
||||
|
@ -140,12 +156,9 @@
|
|||
<f:MenuButton ID="btnMenuEdit" EnablePostBack="true" runat="server" Text="编辑" Icon="TableEdit"
|
||||
OnClick="btnMenuEdit_Click">
|
||||
</f:MenuButton>
|
||||
|
||||
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Hidden="true" Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除">
|
||||
</f:MenuButton>
|
||||
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/jscript">
|
||||
|
|
|
@ -48,14 +48,21 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
////权限按钮方法
|
||||
GetButtonPower();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
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.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("ProblemNoticeManagerEdit.aspx?Type=0") + "return false;";
|
||||
this.btnNew_Finalize.OnClientClick = Window1.GetShowReference("ProblemNoticeManagerEdit.aspx?Type=-1") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
|
@ -65,18 +72,24 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
Model.Problem_Notice model = Funs.DB.Problem_Notice.FirstOrDefault(x => x.ProNoticeId == Grid1.Rows[i].DataKeys[0].ToString());
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
|
||||
if (model.State == "-1" && string.IsNullOrEmpty(BLL.AttachFileService.getFileUrl(model.ProNoticeId + "-FinalizeRelpy")))
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "red";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
#region 获取按钮权限
|
||||
|
@ -91,7 +104,7 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProblemNoticeManagerMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProblemNoticeManagerMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
@ -151,6 +164,10 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
#region 加载数据
|
||||
protected void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
int unitType = CommonService.GetUnitTypeByUserId(this.CurrUser.UserId);
|
||||
|
||||
string strSql = @"select F.ProjectId,ProNoticeId,
|
||||
|
@ -168,15 +185,15 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
LEFT JOIN Base_unit e on b.UnitId=e.Unitid
|
||||
Where 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (unitType!=0 && string.IsNullOrEmpty(ProjectId)) //公司/分公司
|
||||
if (unitType != 0 && string.IsNullOrEmpty(this.ProjectId)) //公司/分公司
|
||||
{
|
||||
strSql += " AND ( F.ProjectId='" + CurrUser.UnitId + "' and proType='2') or ( proType='1' and F.Unitid='" + CurrUser.UnitId + "' ) or a.UnitId='" + CurrUser.UnitId + "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ProjectId))
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
strSql+= " and proType='1' And F.ProjectId='" + ProjectId + "' ";
|
||||
strSql += " and proType='1' And F.ProjectId='" + this.ProjectId + "' ";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtProCode.Text.Trim()))
|
||||
|
@ -212,6 +229,15 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
Model.Problem_Notice model = Funs.DB.Problem_Notice.FirstOrDefault(x => x.ProNoticeId == Grid1.Rows[i].DataKeys[0].ToString());
|
||||
|
||||
if (model.State == "-1" && string.IsNullOrEmpty(BLL.AttachFileService.getFileUrl(model.ProNoticeId + "-FinalizeRelpy")))
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "red";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -41,6 +41,42 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProblemReplyManager.aspx.cs" Inherits="FineUIPro.Web.Customization.CNCCG.ZHGL.Problem.ProblemReplyManager" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
@ -10,8 +12,20 @@
|
|||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全质量检查回复单" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProNoticeId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
|
@ -102,6 +116,8 @@
|
|||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="新增" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1300px" Height="660px" OnClose="Window1_Close">
|
||||
</f:Window>
|
||||
|
@ -122,7 +138,6 @@
|
|||
<%-- <f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Hidden="true" Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除">
|
||||
</f:MenuButton>--%>
|
||||
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/jscript">
|
||||
|
|
|
@ -32,15 +32,21 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
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.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
GetButtonPower();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.GetButtonPower();
|
||||
}
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
|
@ -51,6 +57,24 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
|
@ -63,7 +87,7 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProblemReplyManagerMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProblemReplyManagerMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
@ -122,16 +146,21 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
#region 加载数据
|
||||
protected void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
int unitType = CommonService.GetUnitTypeByUserId(this.CurrUser.UserId);
|
||||
|
||||
string strSql = @"select F.ProjectId,ProNoticeId,
|
||||
string strSql = @"SELECT F.ProjectId,ProNoticeId,
|
||||
case when F.ProType='1' then a.ProjectName
|
||||
else d.UnitName end as ProjectName
|
||||
,ProCode,CheckMans,
|
||||
case when F.ProType='1' then c.UnitName
|
||||
else d.UnitName end as UnitName
|
||||
,CheckStartTime
|
||||
,CheckEndTime,b.UserName as CreateUserName,F.CreateDate,CreateUser,State,ProType from Problem_Notice F
|
||||
,CheckEndTime,b.UserName as CreateUserName,F.CreateDate,CreateUser,State,ProType
|
||||
FROM Problem_Notice F
|
||||
LEFT JOIN Base_Project a on F.ProjectId=a.ProjectId
|
||||
LEFT JOIN Sys_User b on F.CreateUser=b.UserId
|
||||
LEFT JOIN Base_Unit c on F.Unitid=c.UnitId
|
||||
|
|
|
@ -41,6 +41,42 @@ namespace FineUIPro.Web.Customization.CNCCG.ZHGL.Problem
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SuperviseCheck.aspx.cs" Inherits="FineUIPro.Web.Customization.ZJ.HSSE.HiddenInspection.SuperviseCheck" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
@ -11,8 +12,20 @@
|
|||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全监督检查" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="SuperviseCheckId"
|
||||
|
@ -88,6 +101,8 @@
|
|||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="新增" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1300px" Height="660px" OnClose="Window1_Close">
|
||||
</f:Window>
|
||||
|
|
|
@ -7,7 +7,6 @@ using System.Web;
|
|||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using Microsoft.Office.Interop.Excel;
|
||||
|
||||
namespace FineUIPro.Web.Customization.ZJ.HSSE.HiddenInspection
|
||||
{
|
||||
|
@ -33,14 +32,21 @@ namespace FineUIPro.Web.Customization.ZJ.HSSE.HiddenInspection
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
////权限按钮方法
|
||||
GetButtonPower();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
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.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("SuperviseCheckEdit.aspx?Type=0") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
|
@ -52,6 +58,22 @@ namespace FineUIPro.Web.Customization.ZJ.HSSE.HiddenInspection
|
|||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
|
@ -64,7 +86,7 @@ namespace FineUIPro.Web.Customization.ZJ.HSSE.HiddenInspection
|
|||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SuperviseCheckMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.SuperviseCheckMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
@ -80,7 +102,7 @@ namespace FineUIPro.Web.Customization.ZJ.HSSE.HiddenInspection
|
|||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.btnNew.Hidden = true;
|
||||
}
|
||||
|
@ -127,6 +149,10 @@ namespace FineUIPro.Web.Customization.ZJ.HSSE.HiddenInspection
|
|||
#region 加载数据
|
||||
protected void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var result = (from supervise in Funs.DB.ZJ_SuperviseCheck
|
||||
join project in Funs.DB.Base_Project on supervise.ProjectId equals project.ProjectId
|
||||
join user in Funs.DB.Sys_User on supervise.RecUserId equals user.UserId
|
||||
|
@ -142,9 +168,9 @@ namespace FineUIPro.Web.Customization.ZJ.HSSE.HiddenInspection
|
|||
supervise.CheckTeam,
|
||||
|
||||
}).ToList();
|
||||
if (!string .IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
result=result.Where(p=>p.ProjectId==this.CurrUser.LoginProjectId).ToList();
|
||||
result = result.Where(p => p.ProjectId == this.ProjectId).ToList();
|
||||
}
|
||||
Grid1.RecordCount = result.Count;
|
||||
Grid1.DataSource = this.GetPagedDataTable(Grid1, Funs.LINQToDataTable(result));
|
||||
|
|
|
@ -41,6 +41,42 @@ namespace FineUIPro.Web.Customization.ZJ.HSSE.HiddenInspection
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RectifyNoticesStatistics.aspx.cs" Inherits="FineUIPro.Web.HSSE.Check.RectifyNoticesStatistics" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
@ -39,8 +41,20 @@
|
|||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="隐患整改单统计" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DataId" DataIDField="DataId" AllowSorting="true" SortField="DataAllName,DataName"
|
||||
|
@ -49,8 +63,8 @@
|
|||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" ID="drpProject" Label="项目" LabelWidth="50px" Width="320px" EnableEdit="true" Hidden="true">
|
||||
</f:DropDownList>
|
||||
<%-- <f:DropDownList runat="server" ID="drpProject" Label="项目" LabelWidth="50px" Width="320px" EnableEdit="true" Hidden="true">
|
||||
</f:DropDownList>--%>
|
||||
<f:DropDownList runat="server" ID="drpUnit" Label="单位" LabelWidth="50px" Width="280px" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="开始日期" ID="txtStartTime"
|
||||
|
@ -119,6 +133,8 @@
|
|||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -36,25 +36,63 @@ namespace FineUIPro.Web.HSSE.Check
|
|||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
ProjectService.InitProjectDropDownList(this.drpProject, false);
|
||||
this.drpProject.SelectedValue = this.ProjectId;
|
||||
this.drpProject.Enabled = false;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
//this.GetButtonPower();
|
||||
}
|
||||
//this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
//ProjectService.InitProjectDropDownList(this.drpProject, false);
|
||||
//this.drpProject.SelectedValue = this.ProjectId;
|
||||
//this.drpProject.Enabled = false;
|
||||
|
||||
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
//UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
private void InitDropDownList()
|
||||
{
|
||||
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.InitDropDownList();
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
//this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var getDatas = DataStatisticsService.RectifyNoticesStatistics(this.drpProject.SelectedValue, this.drpUnit.SelectedValue, Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text));
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var getDatas = DataStatisticsService.RectifyNoticesStatistics(this.ProjectId, this.drpUnit.SelectedValue, Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text));
|
||||
//var getDatas = DataStatisticsService.RectifyNoticesStatistics(this.drpProject.SelectedValue, this.drpUnit.SelectedValue, Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text));
|
||||
DataTable tb = this.GetPagedDataTable(Grid1, getDatas);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Check {
|
||||
namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
|
||||
|
||||
public partial class RectifyNoticesStatistics {
|
||||
public partial class RectifyNoticesStatistics
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
@ -39,6 +41,42 @@ namespace FineUIPro.Web.HSSE.Check {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
@ -57,15 +95,6 @@ namespace FineUIPro.Web.HSSE.Check {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpProject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProject;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConstructionRisk.aspx.cs" Inherits="FineUIPro.Web.HSSE.Hazard.ConstructionRisk" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
@ -13,6 +15,16 @@
|
|||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="280px" Title="施工作业风险" ShowBorder="true" Layout="VBox"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
|
||||
<Items>
|
||||
|
@ -20,13 +32,11 @@
|
|||
<f:Tree ID="tvControlItem" EnableCollapse="true" ShowHeader="false" Title="WBS"
|
||||
OnNodeCommand="tvControlItem_NodeCommand111" AutoLeafIdentification="true"
|
||||
runat="server" ShowBorder="false" EnableTextSelection="True">
|
||||
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="施工作业风险"
|
||||
TitleToolTip="施工作业风险" AutoScroll="true">
|
||||
<f:Panel runat="server" ID="panel4" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="危险源台账" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="Id" ForceFit="true" OnRowCommand="Grid1_RowCommand"
|
||||
|
@ -103,6 +113,18 @@
|
|||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
<%-- <f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="施工作业风险"
|
||||
TitleToolTip="施工作业风险" AutoScroll="true">
|
||||
<Items>
|
||||
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>--%>
|
||||
<f:Window ID="Window1" Title="施工作业风险" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1000px" Height="600px">
|
||||
|
|
|
@ -13,22 +13,73 @@ namespace FineUIPro.Web.HSSE.Hazard
|
|||
{
|
||||
public partial class ConstructionRisk : PageBase
|
||||
{
|
||||
|
||||
#region 项目主键
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();//权限设置
|
||||
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.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
this.InitTreeMenu();//加载树
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
this.GetButtonPower();
|
||||
this.InitTreeMenu();
|
||||
this.BindGrid();
|
||||
}
|
||||
#region 加载树施工单位
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.tvControlItem.Nodes.Clear();
|
||||
|
||||
List<Base_Unit> units = null;
|
||||
|
@ -36,12 +87,12 @@ namespace FineUIPro.Web.HSSE.Hazard
|
|||
var user = UserService.GetUserByUserId(this.CurrUser.UserId);
|
||||
if (!string.IsNullOrEmpty(user.UnitId))
|
||||
{
|
||||
var projectUnit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.CurrUser.LoginProjectId, user.UnitId);
|
||||
var projectUnit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.ProjectId, user.UnitId);
|
||||
if (projectUnit != null)
|
||||
{
|
||||
if (projectUnit.UnitType == BLL.Const.ProjectUnitType_1 || projectUnit.UnitType == BLL.Const.ProjectUnitType_3 || projectUnit.UnitType == BLL.Const.ProjectUnitType_4)
|
||||
{
|
||||
var ids = Funs.DB.HSSE_ConstructionRisk.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).Select(x => x.UnitId).Distinct().ToList();
|
||||
var ids = Funs.DB.HSSE_ConstructionRisk.Where(x => x.ProjectId == this.ProjectId).Select(x => x.UnitId).Distinct().ToList();
|
||||
units = (from x in Funs.DB.Base_Unit
|
||||
where ids.Contains(x.UnitId)
|
||||
select x).OrderBy(x => x.UnitCode).ToList();
|
||||
|
@ -56,7 +107,7 @@ namespace FineUIPro.Web.HSSE.Hazard
|
|||
}
|
||||
else if (user.UnitId == CommonService.GetThisUnitId() || user.UserId == Const.hfnbdId)
|
||||
{
|
||||
var ids = Funs.DB.HSSE_ConstructionRisk.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).Select(x => x.UnitId).Distinct().ToList();
|
||||
var ids = Funs.DB.HSSE_ConstructionRisk.Where(x => x.ProjectId == this.ProjectId).Select(x => x.UnitId).Distinct().ToList();
|
||||
units = (from x in Funs.DB.Base_Unit
|
||||
where ids.Contains(x.UnitId)
|
||||
select x).OrderBy(x => x.UnitCode).ToList();
|
||||
|
@ -122,6 +173,7 @@ namespace FineUIPro.Web.HSSE.Hazard
|
|||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 页索引改变事件
|
||||
/// <summary>
|
||||
/// 页索引改变事件
|
||||
|
@ -135,7 +187,6 @@ namespace FineUIPro.Web.HSSE.Hazard
|
|||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 删除
|
||||
/// <summary>
|
||||
/// 删除
|
||||
|
@ -177,10 +228,6 @@ namespace FineUIPro.Web.HSSE.Hazard
|
|||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
|
@ -223,7 +270,7 @@ namespace FineUIPro.Web.HSSE.Hazard
|
|||
{
|
||||
|
||||
var DateWeek = (from x in Funs.DB.HSSE_ConstructionRisk
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
where x.ProjectId == this.ProjectId
|
||||
&& x.UnitId == node.NodeID
|
||||
select x.DateWeek).Distinct().ToList().OrderByDescending(x => x);
|
||||
foreach (var d in DateWeek)
|
||||
|
@ -249,7 +296,7 @@ namespace FineUIPro.Web.HSSE.Hazard
|
|||
}
|
||||
|
||||
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ConstructionRiskMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ConstructionRiskMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
@ -317,7 +364,7 @@ namespace FineUIPro.Web.HSSE.Hazard
|
|||
// }
|
||||
// }
|
||||
//}
|
||||
var r = Funs.DB.HSSE_ConstructionRisk.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.States == "2");
|
||||
var r = Funs.DB.HSSE_ConstructionRisk.Where(x => x.ProjectId == this.ProjectId && x.States == "2");
|
||||
foreach (var item in r)
|
||||
{
|
||||
item.States = "3";
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Hazard {
|
||||
namespace FineUIPro.Web.HSSE.Hazard
|
||||
{
|
||||
|
||||
|
||||
public partial class ConstructionRisk {
|
||||
public partial class ConstructionRisk
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
@ -48,6 +50,33 @@ namespace FineUIPro.Web.HSSE.Hazard {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion2;
|
||||
|
||||
/// <summary>
|
||||
/// hdState 控件。
|
||||
/// </summary>
|
||||
|
@ -67,13 +96,13 @@ namespace FineUIPro.Web.HSSE.Hazard {
|
|||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// panel4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
protected global::FineUIPro.Panel panel4;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RishAnalysis.aspx.cs" Inherits="FineUIPro.Web.HSSE.HiddenInspection.RishAnalysis" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
@ -39,8 +41,20 @@
|
|||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="隐患整改单统计" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DataId" DataIDField="DataId" AllowSorting="true" SortField="DataAllName,DataName"
|
||||
|
@ -49,8 +63,8 @@
|
|||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" ID="drpProject" Label="项目" LabelWidth="50px" Width="320px" EnableEdit="true" Hidden="true">
|
||||
</f:DropDownList>
|
||||
<%--<f:DropDownList runat="server" ID="drpProject" Label="项目" LabelWidth="50px" Width="320px" EnableEdit="true" Hidden="true">
|
||||
</f:DropDownList>--%>
|
||||
<f:DropDownList runat="server" ID="drpUnit" Label="单位" LabelWidth="50px" Width="280px" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="开始日期" ID="txtStartTime"
|
||||
|
@ -117,6 +131,8 @@
|
|||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -36,33 +36,74 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
//////权限按钮方法
|
||||
//this.GetButtonPower();
|
||||
}
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
this.txtEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
this.txtStartTime.Text = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd");
|
||||
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
ProjectService.InitProjectDropDownList(this.drpProject, false);
|
||||
this.drpProject.SelectedValue = this.ProjectId;
|
||||
this.drpProject.Enabled = false;
|
||||
//this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
//ProjectService.InitProjectDropDownList(this.drpProject, false);
|
||||
//this.drpProject.SelectedValue = this.ProjectId;
|
||||
//this.drpProject.Enabled = false;
|
||||
|
||||
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
//UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
private void InitDropDownList()
|
||||
{
|
||||
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var getDatas = DataStatisticsService.HazardRegisterStatistics(this.drpProject.SelectedValue, this.drpUnit.SelectedValue, Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text));
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//var getDatas = DataStatisticsService.HazardRegisterStatistics(this.drpProject.SelectedValue, this.drpUnit.SelectedValue, Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text));
|
||||
var getDatas = DataStatisticsService.HazardRegisterStatistics(this.ProjectId, this.drpUnit.SelectedValue, Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text));
|
||||
DataTable tb = this.GetPagedDataTable(Grid1, getDatas);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.InitDropDownList();
|
||||
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
//this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
|
|
|
@ -41,6 +41,42 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
@ -59,15 +95,6 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpProject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProject;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RiskAnalysisChart.aspx.cs"
|
||||
Inherits="FineUIPro.Web.HSSE.HiddenInspection.RiskAnalysisChart" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<%@ Register Src="~/Controls/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc1" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
@ -12,8 +14,25 @@
|
|||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" AjaxAspnetControls="divAccidentUnit,divAccidentTime" />
|
||||
<f:Panel ID="Panel3" CssClass="blockpanel" runat="server" EnableCollapse="false"
|
||||
<%--<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" AjaxAspnetControls="divAccidentUnit,divAccidentTime" />--%>
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Panel ID="panelLeftRegion2" CssClass="blockpanel" runat="server" EnableCollapse="false"
|
||||
BodyPadding="10px" ShowBorder="true" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowHeader="false" ShowBorder="false" runat="server">
|
||||
|
@ -40,7 +59,7 @@
|
|||
</f:Form>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="Panel4" CssClass="blockpanel" runat="server" EnableCollapse="false" MarginTop="10px"
|
||||
<f:Panel ID="panelLeftRegion3" CssClass="blockpanel" runat="server" EnableCollapse="false" MarginTop="10px"
|
||||
BodyPadding="10px" ShowBorder="true" ShowHeader="false">
|
||||
<Items>
|
||||
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="400px" ShowBorder="true"
|
||||
|
@ -59,6 +78,11 @@
|
|||
</f:TabStrip>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
<script language="javascript">
|
||||
|
|
|
@ -9,6 +9,23 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
{
|
||||
public partial class RiskAnalysisChart : PageBase
|
||||
{
|
||||
|
||||
#region 项目主键
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
|
@ -17,10 +34,41 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
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.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
//////权限按钮方法
|
||||
//this.GetButtonPower();
|
||||
}
|
||||
|
||||
this.AnalyseData();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
//this.GetButtonPower();
|
||||
this.AnalyseData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 统计
|
||||
|
@ -44,10 +92,12 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
/// </summary>
|
||||
private void AnalyseData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (this.rblState.SelectedValue == "0")
|
||||
{
|
||||
|
||||
|
||||
string strSql = @" select u.UnitId,u.unitName,
|
||||
count(*) as allnum,
|
||||
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
|
||||
|
@ -65,7 +115,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
}
|
||||
strSql += " group by u.UnitId,u.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);
|
||||
|
@ -154,7 +204,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
}
|
||||
strSql += " group by u.UnitId,u.unitName ,r.RegisterTypesId,t.RegisterTypesName ";
|
||||
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);
|
||||
|
|
|
@ -33,13 +33,58 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel3 控件。
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel3;
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion2;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
|
@ -96,13 +141,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
protected global::FineUIPro.Button BtnAnalyse;
|
||||
|
||||
/// <summary>
|
||||
/// Panel4 控件。
|
||||
/// panelLeftRegion3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel4;
|
||||
protected global::FineUIPro.Panel panelLeftRegion3;
|
||||
|
||||
/// <summary>
|
||||
/// TabStrip1 控件。
|
||||
|
|
Loading…
Reference in New Issue