补充公司级别树

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
@@ -1,6 +1,8 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionPlanList.aspx.cs"
Inherits="FineUIPro.Web.HSSE.ActionPlan.ActionPlanList" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" 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">
<head runat="server">
@@ -9,102 +11,115 @@
</head>
<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">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="实施计划" EnableCollapse="true"
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="ActionPlanListId"
DataIDField="ActionPlanListId" AllowSorting="true" ForceFit="true"
SortField="ActionPlanListCode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" Label="编号" ID="txtActionPlanListCode" EmptyText="输入查询条件"
Width="250px" LabelWidth="60px" LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="名称" ID="txtActionPlanListName" EmptyText="输入查询条件"
Width="250px" LabelWidth="60px" LabelAlign="right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Text="查询"
EnablePostBack="true" OnClick="TextBox_TextChanged" runat="server" >
</f:Button>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" Hidden="true" Text="新增"
runat="server">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="100px" ColumnID="ActionPlanListCode" DataField="ActionPlanListCode"
SortField="ActionPlanListCode" FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="ActionPlanListName" DataField="ActionPlanListName" ExpandUnusedSpace="True"
SortField="ActionPlanListName" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="VersionNo" DataField="VersionNo" SortField="VersionNo"
FieldType="String" HeaderText="版本号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="140px" ColumnID="ProjectType" DataField="ProjectType" SortField="ProjectType"
FieldType="String" HeaderText="项目类型" HeaderTextAlign="Center" TextAlign="Left"
RendererFunction="renderProjectType">
</f:RenderField>
<f:WindowField TextAlign="Left" Width="80px" WindowID="WindowAtt" HeaderText="附件"
Text="详细" ToolTip="附件上传查看" DataIFrameUrlFields="ActionPlanListId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ActionPlanListAttachUrl&menuId=CBC47C8B-141C-446B-90D9-CE8F5AE66CE4"
HeaderTextAlign="Center" />
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="实施计划" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1024px" Height="600px">
</f:Window>
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="Pencil" EnablePostBack="true"
Hidden="true" runat="server" Text="编辑" >
</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>
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel2" 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" EnableColumnLines="true" DataKeyNames="ActionPlanListId"
DataIDField="ActionPlanListId" AllowSorting="true" ForceFit="true"
SortField="ActionPlanListCode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" Label="编号" ID="txtActionPlanListCode" EmptyText="输入查询条件"
Width="250px" LabelWidth="60px" LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="名称" ID="txtActionPlanListName" EmptyText="输入查询条件"
Width="250px" LabelWidth="60px" LabelAlign="right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Text="查询"
EnablePostBack="true" OnClick="TextBox_TextChanged" runat="server">
</f:Button>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" Hidden="true" Text="新增"
runat="server">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="100px" ColumnID="ActionPlanListCode" DataField="ActionPlanListCode"
SortField="ActionPlanListCode" FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="ActionPlanListName" DataField="ActionPlanListName" ExpandUnusedSpace="True"
SortField="ActionPlanListName" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="VersionNo" DataField="VersionNo" SortField="VersionNo"
FieldType="String" HeaderText="版本号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="140px" ColumnID="ProjectType" DataField="ProjectType" SortField="ProjectType"
FieldType="String" HeaderText="项目类型" HeaderTextAlign="Center" TextAlign="Left"
RendererFunction="renderProjectType">
</f:RenderField>
<f:WindowField TextAlign="Left" Width="80px" WindowID="WindowAtt" HeaderText="附件"
Text="详细" ToolTip="附件上传查看" DataIFrameUrlFields="ActionPlanListId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ActionPlanListAttachUrl&menuId=CBC47C8B-141C-446B-90D9-CE8F5AE66CE4"
HeaderTextAlign="Center" />
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</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" OnClose="Window1_Close" IsModal="true"
Width="1024px" Height="600px">
</f:Window>
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="Pencil" EnablePostBack="true"
Hidden="true" runat="server" Text="编辑">
</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/javascript">
function renderProjectType(value) {
function renderProjectType(value) {
}
var menuID = '<%= Menu1.ClientID %>';
@@ -39,13 +39,19 @@ namespace FineUIPro.Web.HSSE.ActionPlan
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
////权限按钮方法
this.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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.btnNew.OnClientClick = Window1.GetShowReference("ActionPlanListEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
@@ -57,49 +63,66 @@ namespace FineUIPro.Web.HSSE.ActionPlan
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.BindGrid();
this.GetButtonPower();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (!string.IsNullOrEmpty(this.ProjectId))
if (string.IsNullOrEmpty(this.ProjectId))
{
string strSql = "SELECT ActionPlanList.ActionPlanListId,ActionPlanList.ProjectId,CodeRecords.Code AS ActionPlanListCode,ActionPlanList.ActionPlanListName,ActionPlanList.VersionNo,(CASE ProjectType WHEN '1' THEN '系统内项目' WHEN '2' THEN '系统外项目' WHEN '3' THEN '海外项目' END ) AS ProjectType,ActionPlanList.ActionPlanListContents,ActionPlanList.CompileMan,Users.UserName AS CompileManName, ActionPlanList.CompileDate,ActionPlanList.States"
+ @" ,(CASE WHEN ActionPlanList.States = " + BLL.Const.State_0 + " OR ActionPlanList.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN ActionPlanList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
+ @" FROM ActionPlan_ActionPlanList AS ActionPlanList "
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON ActionPlanList.ActionPlanListId=CodeRecords.DataId "
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON ActionPlanList.ActionPlanListId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
+ @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId "
+ @" LEFT JOIN Sys_User AS Users ON Users.UserId = ActionPlanList.CompileMan "
+ @" WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " AND ActionPlanList.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
{
strSql += " AND ActionPlanList.States = @States"; ///状态为已完成
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
}
if (!string.IsNullOrEmpty(this.txtActionPlanListCode.Text.Trim()))
{
strSql += " AND ActionPlanListCode LIKE @ActionPlanListCode";
listStr.Add(new SqlParameter("@ActionPlanListCode", "%" + this.txtActionPlanListCode.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtActionPlanListName.Text.Trim()))
{
strSql += " AND ActionPlanListName LIKE @ActionPlanListName";
listStr.Add(new SqlParameter("@ActionPlanListName", "%" + this.txtActionPlanListName.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
return;
}
string strSql = "SELECT ActionPlanList.ActionPlanListId,ActionPlanList.ProjectId,CodeRecords.Code AS ActionPlanListCode,ActionPlanList.ActionPlanListName,ActionPlanList.VersionNo,(CASE ProjectType WHEN '1' THEN '系统内项目' WHEN '2' THEN '系统外项目' WHEN '3' THEN '海外项目' END ) AS ProjectType,ActionPlanList.ActionPlanListContents,ActionPlanList.CompileMan,Users.UserName AS CompileManName, ActionPlanList.CompileDate,ActionPlanList.States"
+ @" ,(CASE WHEN ActionPlanList.States = " + BLL.Const.State_0 + " OR ActionPlanList.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN ActionPlanList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
+ @" FROM ActionPlan_ActionPlanList AS ActionPlanList "
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON ActionPlanList.ActionPlanListId=CodeRecords.DataId "
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON ActionPlanList.ActionPlanListId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
+ @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId "
+ @" LEFT JOIN Sys_User AS Users ON Users.UserId = ActionPlanList.CompileMan "
+ @" WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " AND ActionPlanList.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
{
strSql += " AND ActionPlanList.States = @States"; ///状态为已完成
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
}
if (!string.IsNullOrEmpty(this.txtActionPlanListCode.Text.Trim()))
{
strSql += " AND ActionPlanListCode LIKE @ActionPlanListCode";
listStr.Add(new SqlParameter("@ActionPlanListCode", "%" + this.txtActionPlanListCode.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtActionPlanListName.Text.Trim()))
{
strSql += " AND ActionPlanListName LIKE @ActionPlanListName";
listStr.Add(new SqlParameter("@ActionPlanListName", "%" + this.txtActionPlanListName.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
@@ -203,7 +226,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionPlanListEdit.aspx?ActionPlanListId={0}", id, "编辑 - ")));
}
}
}
}
#endregion
@@ -276,7 +299,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectActionPlanListMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectActionPlanListMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.ActionPlan {
public partial class ActionPlanList {
namespace FineUIPro.Web.HSSE.ActionPlan
{
public partial class ActionPlanList
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,16 +31,52 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// Panel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
protected global::FineUIPro.Panel Panel2;
/// <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>
@@ -47,7 +85,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -56,7 +94,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtActionPlanListCode 控件。
/// </summary>
@@ -65,7 +103,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtActionPlanListCode;
/// <summary>
/// txtActionPlanListName 控件。
/// </summary>
@@ -74,7 +112,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtActionPlanListName;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -83,7 +121,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnQuery 控件。
/// </summary>
@@ -92,7 +130,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnNew 控件。
/// </summary>
@@ -101,7 +139,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -110,7 +148,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// lblNumber 控件。
/// </summary>
@@ -119,7 +157,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNumber;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -128,7 +166,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -137,7 +175,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -146,7 +184,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -155,7 +193,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// WindowAtt 控件。
/// </summary>
@@ -164,7 +202,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -173,7 +211,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
@@ -182,7 +220,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -1,5 +1,6 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanyManageRule.aspx.cs" Inherits="FineUIPro.Web.HSSE.ActionPlan.CompanyManageRule" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -10,84 +11,98 @@
<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" Height="550px ">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="公司安全管理制度发布" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ManagerRuleId" DataIDField="ManagerRuleId" AllowSorting="true" SortField="IssueDate,CompileDate" SortDirection="DESC" EnableColumnLines="true"
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true"
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:CheckBoxList runat="server" ID="cbIssue" ShowLabel="false" Width="150px" LabelAlign="Right">
<f:CheckItem Text="未发布" Value="0" Selected="true" />
<f:CheckItem Text="已发布" Value="1" />
</f:CheckBoxList>
<f:TextBox runat="server" Label="编号" ID="txtManageRuleCode" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="名称" ID="txtManageRuleName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="分类" ID="txtManageRuleTypeName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" OnClick="TextBox_TextChanged" Text="查询" runat="server">
</f:Button>
<f:Button ID="btnCompile" ToolTip="新增" Icon="Add" Hidden="true" runat="server" OnClick="btnCompile_Click" Text="新增">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfManageRuleCode" Width="80px" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleCode">
<ItemTemplate>
<asp:Label ID="lblManageRuleCode" runat="server" Text='<%# Bind("ManageRuleCode") %>'
ToolTip='<%#Bind("ManageRuleCode") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfManageRuleName" Width="250px" HeaderText="文件名称" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleName">
<ItemTemplate>
<asp:Label ID="lblManageRuleName" runat="server" Text='<%# Bind("ManageRuleName") %>'
ToolTip='<%#Bind("ManageRuleName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="160px" ColumnID="ManageRuleTypeName" DataField="ManageRuleTypeName"
SortField="ManageRuleTypeName" FieldType="String" HeaderText="分类" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="IssueDate" DataField="IssueDate" SortField="IssueDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发布时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
<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="ManagerRuleId" DataIDField="ManagerRuleId" AllowSorting="true" SortField="IssueDate,CompileDate" SortDirection="DESC" EnableColumnLines="true"
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true"
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:CheckBoxList runat="server" ID="cbIssue" ShowLabel="false" Width="150px" LabelAlign="Right">
<f:CheckItem Text="未发布" Value="0" Selected="true" />
<f:CheckItem Text="已发布" Value="1" />
</f:CheckBoxList>
<f:TextBox runat="server" Label="编号" ID="txtManageRuleCode" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="名称" ID="txtManageRuleName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="分类" ID="txtManageRuleTypeName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" OnClick="TextBox_TextChanged" Text="查询" runat="server">
</f:Button>
<f:Button ID="btnCompile" ToolTip="新增" Icon="Add" Hidden="true" runat="server" OnClick="btnCompile_Click" Text="新增">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfManageRuleCode" Width="80px" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleCode">
<ItemTemplate>
<asp:Label ID="lblManageRuleCode" runat="server" Text='<%# Bind("ManageRuleCode") %>'
ToolTip='<%#Bind("ManageRuleCode") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfManageRuleName" Width="250px" HeaderText="文件名称" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleName">
<ItemTemplate>
<asp:Label ID="lblManageRuleName" runat="server" Text='<%# Bind("ManageRuleName") %>'
ToolTip='<%#Bind("ManageRuleName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="160px" ColumnID="ManageRuleTypeName" DataField="ManageRuleTypeName"
SortField="ManageRuleTypeName" FieldType="String" HeaderText="分类" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="IssueDate" DataField="IssueDate" SortField="IssueDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发布时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="管理规定选择" Hidden="true" EnableIFrame="true" EnableMaximize="true"
@@ -14,6 +14,21 @@ namespace FineUIPro.Web.HSSE.ActionPlan
{
public partial class CompanyManageRule : PageBase
{
#region 项目主键
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 页面
/// </summary>
@@ -28,6 +43,8 @@ namespace FineUIPro.Web.HSSE.ActionPlan
ViewState["PageSize"] = value;
}
}
#endregion
#region 加载页面
/// <summary>
/// 加载页面
@@ -39,7 +56,21 @@ namespace FineUIPro.Web.HSSE.ActionPlan
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
this.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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;行数据吗?", Grid1.GetSelectedCountReference());
// 绑定表格
@@ -47,11 +78,33 @@ namespace FineUIPro.Web.HSSE.ActionPlan
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.BindGrid();
this.GetButtonPower();
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
//{
// btnNew.Hidden = true;
//}
}
/// <summary>
/// 加载数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT ManagerRule.ManagerRuleId,CodeRecords.Code AS ManageRuleCode,ManagerRule.ProjectId,
ManagerRule.ManageRuleName,ManagerRule.ManageRuleTypeId,
ManagerRule.VersionNo,
@@ -82,7 +135,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
}
else
{
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
}
if (!string.IsNullOrEmpty(this.txtManageRuleCode.Text.Trim()))
{
@@ -472,7 +525,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ActionPlan_CompanyManagerRuleMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ActionPlan_CompanyManagerRuleMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.ActionPlan {
public partial class CompanyManageRule {
namespace FineUIPro.Web.HSSE.ActionPlan
{
public partial class CompanyManageRule
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,43 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </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>
@@ -47,7 +85,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -56,7 +94,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// cbIssue 控件。
/// </summary>
@@ -65,7 +103,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList cbIssue;
/// <summary>
/// txtManageRuleCode 控件。
/// </summary>
@@ -74,7 +112,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleCode;
/// <summary>
/// txtManageRuleName 控件。
/// </summary>
@@ -83,7 +121,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleName;
/// <summary>
/// txtManageRuleTypeName 控件。
/// </summary>
@@ -92,7 +130,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleTypeName;
/// <summary>
/// btnQuery 控件。
/// </summary>
@@ -101,7 +139,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnCompile 控件。
/// </summary>
@@ -110,7 +148,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnCompile;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -119,7 +157,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// lblManageRuleCode 控件。
/// </summary>
@@ -128,7 +166,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblManageRuleCode;
/// <summary>
/// lblManageRuleName 控件。
/// </summary>
@@ -137,7 +175,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblManageRuleName;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -146,7 +184,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -155,7 +193,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -164,7 +202,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -173,7 +211,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
@@ -182,7 +220,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -191,7 +229,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
@@ -200,7 +238,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuIssuance 控件。
/// </summary>
@@ -209,7 +247,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuIssuance;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -1,6 +1,9 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManagerRule.aspx.cs" MaintainScrollPositionOnPostback="true"
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManagerRule.aspx.cs" MaintainScrollPositionOnPostback="true"
Inherits="FineUIPro.Web.HSSE.ActionPlan.ManagerRule" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
@@ -9,128 +12,143 @@
</head>
<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" Height="550px ">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管理规定发布" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ManagerRuleId" DataIDField="ManagerRuleId" AllowSorting="true" SortField="IssueDate,CompileDate" SortDirection="DESC" EnableColumnLines="true"
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true"
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:CheckBoxList runat="server" ID="cbIssue" ShowLabel="false" Width="150px" LabelAlign="Right">
<f:CheckItem Text="未发布" Value="0" Selected="true"/>
<f:CheckItem Text="已发布" Value="1" />
</f:CheckBoxList>
<f:TextBox runat="server" Label="编号" ID="txtManageRuleCode" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="名称" ID="txtManageRuleName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="分类" ID="txtManageRuleTypeName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" OnClick="TextBox_TextChanged" runat="server" >
</f:Button>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btnCompile" ToolTip="新增" Icon="Add" Hidden="true" runat="server" OnClick="btnCompile_Click" Text="新增">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<%--<f:TemplateField ColumnID="tfNumber" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="labNumber" runat="server" Text=' <%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1%>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<f:TemplateField ColumnID="tfManageRuleCode" Width="80px" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleCode">
<ItemTemplate>
<asp:Label ID="lblManageRuleCode" runat="server" Text='<%# Bind("ManageRuleCode") %>'
ToolTip='<%#Bind("ManageRuleCode") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfOldManageRuleCode" Width="220px" HeaderText="原编号" HeaderTextAlign="Center" TextAlign="Left"
SortField="OldManageRuleCode">
<ItemTemplate>
<asp:Label ID="lblOldManageRuleCode" runat="server" Text='<%# Bind("OldManageRuleCode") %>' ToolTip='<%#Bind("OldManageRuleCode") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfManageRuleName" Width="250px" HeaderText="文件名称" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleName">
<ItemTemplate>
<asp:Label ID="lblManageRuleName" runat="server" Text='<%# Bind("ManageRuleName") %>'
ToolTip='<%#Bind("ManageRuleName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfManageRuleTypeName" Width="150px" HeaderText="分类" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleTypeName">
<ItemTemplate>
<asp:Label ID="lblManageRuleTypeName" runat="server" Text='<%# Bind("ManageRuleTypeName") %>'
ToolTip='<%#Bind("ManageRuleTypeName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%-- <f:TemplateField ColumnID="tfShortRemark" Width="300px" HeaderText="摘要" HeaderTextAlign="Center" TextAlign="Left"
ExpandUnusedSpace="true" SortField="Remark">
<ItemTemplate>
<asp:Label ID="lblRemark" runat="server" Text='<%# Bind("ShortRemark") %>' ToolTip='<%#Bind("Remark") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<f:RenderField Width="100px" ColumnID="IssueDate" DataField="IssueDate" SortField="IssueDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发布时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="管理规定选择" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1100px"
OnClose="Window1_Close" Height="500px">
</f:Window>
<f:Window ID="Window2" Title="管理规定编辑" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1024px" Height="550px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="Pencil" Hidden="true">
</f:MenuButton>
<%--<f:MenuButton ID="btnMenuAudit" OnClick="btnMenuAudit_Click" EnablePostBack="true"
<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:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管理规定发布" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ManagerRuleId" DataIDField="ManagerRuleId" AllowSorting="true" SortField="IssueDate,CompileDate" SortDirection="DESC" EnableColumnLines="true"
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true"
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:CheckBoxList runat="server" ID="cbIssue" ShowLabel="false" Width="150px" LabelAlign="Right">
<f:CheckItem Text="未发布" Value="0" Selected="true" />
<f:CheckItem Text="已发布" Value="1" />
</f:CheckBoxList>
<f:TextBox runat="server" Label="编号" ID="txtManageRuleCode" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="名称" ID="txtManageRuleName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="分类" ID="txtManageRuleTypeName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" OnClick="TextBox_TextChanged" runat="server">
</f:Button>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btnCompile" ToolTip="新增" Icon="Add" Hidden="true" runat="server" OnClick="btnCompile_Click" Text="新增">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<%--<f:TemplateField ColumnID="tfNumber" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="labNumber" runat="server" Text=' <%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1%>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<f:TemplateField ColumnID="tfManageRuleCode" Width="80px" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleCode">
<ItemTemplate>
<asp:Label ID="lblManageRuleCode" runat="server" Text='<%# Bind("ManageRuleCode") %>'
ToolTip='<%#Bind("ManageRuleCode") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfOldManageRuleCode" Width="220px" HeaderText="原编号" HeaderTextAlign="Center" TextAlign="Left"
SortField="OldManageRuleCode">
<ItemTemplate>
<asp:Label ID="lblOldManageRuleCode" runat="server" Text='<%# Bind("OldManageRuleCode") %>' ToolTip='<%#Bind("OldManageRuleCode") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfManageRuleName" Width="250px" HeaderText="文件名称" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleName">
<ItemTemplate>
<asp:Label ID="lblManageRuleName" runat="server" Text='<%# Bind("ManageRuleName") %>'
ToolTip='<%#Bind("ManageRuleName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfManageRuleTypeName" Width="150px" HeaderText="分类" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleTypeName">
<ItemTemplate>
<asp:Label ID="lblManageRuleTypeName" runat="server" Text='<%# Bind("ManageRuleTypeName") %>'
ToolTip='<%#Bind("ManageRuleTypeName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%-- <f:TemplateField ColumnID="tfShortRemark" Width="300px" HeaderText="摘要" HeaderTextAlign="Center" TextAlign="Left"
ExpandUnusedSpace="true" SortField="Remark">
<ItemTemplate>
<asp:Label ID="lblRemark" runat="server" Text='<%# Bind("ShortRemark") %>' ToolTip='<%#Bind("Remark") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<f:RenderField Width="100px" ColumnID="IssueDate" DataField="IssueDate" SortField="IssueDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发布时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</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="1100px"
OnClose="Window1_Close" Height="500px">
</f:Window>
<f:Window ID="Window2" Title="管理规定编辑" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1024px" Height="550px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="Pencil" Hidden="true">
</f:MenuButton>
<%--<f:MenuButton ID="btnMenuAudit" OnClick="btnMenuAudit_Click" EnablePostBack="true"
Hidden="true" runat="server" Text="审核" Icon="ZoomIn">
</f:MenuButton>--%>
<f:MenuButton ID="btnMenuIssuance" Icon="BookNext" OnClick="btnMenuIssuance_Click"
EnablePostBack="true" Hidden="true" runat="server" Text="发布" >
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" Icon="Delete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
Hidden="true" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除" >
</f:MenuButton>
</f:Menu>
<f:MenuButton ID="btnMenuIssuance" Icon="BookNext" OnClick="btnMenuIssuance_Click"
EnablePostBack="true" Hidden="true" runat="server" Text="发布">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" Icon="Delete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
Hidden="true" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
@@ -13,6 +13,20 @@ namespace FineUIPro.Web.HSSE.ActionPlan
{
#region 定义项
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 管理规定发布主键
/// </summary>
public string ManagerRuleId
@@ -69,7 +83,20 @@ namespace FineUIPro.Web.HSSE.ActionPlan
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
this.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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;行数据吗?", Grid1.GetSelectedCountReference());
this.ManagerRuleListCode = Request.Params["managerRuleListCode"];
@@ -77,12 +104,32 @@ namespace FineUIPro.Web.HSSE.ActionPlan
BindGrid();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.BindGrid();
this.GetButtonPower();
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
//{
// btnNew.Hidden = true;
//}
}
/// <summary>
/// 加载数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = "SELECT ManagerRule.ManagerRuleId,CodeRecords.Code AS ManageRuleCode,ManagerRule.ProjectId,"
+ @"ManagerRule.OldManageRuleCode,ManagerRule.ManageRuleName,ManagerRule.ManageRuleTypeId,"
+ @"ManagerRule.VersionNo,"
@@ -113,7 +160,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
}
else
{
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
}
if (!string.IsNullOrEmpty(this.txtManageRuleCode.Text.Trim()))
{
@@ -133,11 +180,11 @@ namespace FineUIPro.Web.HSSE.ActionPlan
if (this.cbIssue.SelectedValueArray.Length == 1)
{
///是否发布
///是否发布
string selectValue = String.Join(", ", this.cbIssue.SelectedValueArray);
if (selectValue == "1")
{
strSql += " AND ManagerRule.IsIssue = 1 ";
strSql += " AND ManagerRule.IsIssue = 1 ";
}
else
{
@@ -148,7 +195,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
@@ -198,7 +245,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
{
this.DeleteData();
}
@@ -230,7 +277,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
BLL.LogService.AddSys_Log(this.CurrUser, manageRule.ManageRuleCode, manageRule.ManagerRuleId, BLL.Const.ActionPlan_ManagerRuleMenuId, Const.BtnDelete);
BLL.ActionPlan_ManagerRuleService.DeleteManageRuleById(rowID);
}
BindGrid();
ShowNotify("删除成功!", MessageBoxIcon.Success);
//}
@@ -306,14 +353,14 @@ namespace FineUIPro.Web.HSSE.ActionPlan
if (managerRule != null)
{
if (this.btnMenuEdit.Hidden || managerRule.State == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
{
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ManagerRuleView.aspx?ManagerRuleId={0}", managerRuleId, "查看 - ")));
}
else
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ManagerRuleEdit.aspx?ManagerRuleId={0}", managerRuleId, "编辑 - ")));
}
}
}
}
#endregion
@@ -420,7 +467,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
/// <param name="e"></param>
protected void btnMenuIssuance_Click(object sender, EventArgs e)
{
string strShowNotify = string.Empty;
string strShowNotify = string.Empty;
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
@@ -451,7 +498,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
else
{
strShowNotify += "管理规定:" + managerRule.ManageRuleName + ";";
}
}
}
@@ -513,7 +560,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ActionPlan_ManagerRuleMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ActionPlan_ManagerRuleMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
@@ -539,7 +586,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
}
}
#endregion
#region 查询
/// <summary>
/// 查询
@@ -549,7 +596,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
if(this.PageSize.HasValue)
if (this.PageSize.HasValue)
{
this.ddlPageSize.SelectedValue = this.PageSize.ToString();
}
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.ActionPlan {
public partial class ManagerRule {
namespace FineUIPro.Web.HSSE.ActionPlan
{
public partial class ManagerRule
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,43 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </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>
@@ -47,7 +85,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -56,7 +94,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// cbIssue 控件。
/// </summary>
@@ -65,7 +103,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList cbIssue;
/// <summary>
/// txtManageRuleCode 控件。
/// </summary>
@@ -74,7 +112,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleCode;
/// <summary>
/// txtManageRuleName 控件。
/// </summary>
@@ -83,7 +121,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleName;
/// <summary>
/// txtManageRuleTypeName 控件。
/// </summary>
@@ -92,7 +130,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleTypeName;
/// <summary>
/// btnQuery 控件。
/// </summary>
@@ -101,7 +139,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnCompile 控件。
/// </summary>
@@ -110,7 +148,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnCompile;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -119,7 +157,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// lblManageRuleCode 控件。
/// </summary>
@@ -128,7 +166,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblManageRuleCode;
/// <summary>
/// lblOldManageRuleCode 控件。
/// </summary>
@@ -137,7 +175,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblOldManageRuleCode;
/// <summary>
/// lblManageRuleName 控件。
/// </summary>
@@ -146,7 +184,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblManageRuleName;
/// <summary>
/// lblManageRuleTypeName 控件。
/// </summary>
@@ -155,7 +193,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblManageRuleTypeName;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -164,7 +202,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -173,7 +211,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -182,7 +220,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -191,7 +229,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
@@ -200,7 +238,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -209,7 +247,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
@@ -218,7 +256,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuIssuance 控件。
/// </summary>
@@ -227,7 +265,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuIssuance;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManagerRuleList.aspx.cs" Inherits="FineUIPro.Web.HSSE.ActionPlan.ManagerRuleList" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
@@ -9,106 +11,120 @@
<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:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管理规定清单" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ManagerRuleId" DataIDField="ManagerRuleId" AllowSorting="true"
SortField="CompileDate" SortDirection="ASC" EnableColumnLines="true" OnSort="Grid1_Sort" ForceFit="true"
AllowPaging="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:RadioButtonList runat="server" ID="rblType" ShowRedStar="true" AutoPostBack="true" Width="210px" OnSelectedIndexChanged="rblType_SelectedIndexChanged">
<f:RadioItem Text="集团" Value="集团" Selected="true" />
<f:RadioItem Text="公司" Value="公司" />
<f:RadioItem Text="项目" Value="项目" />
</f:RadioButtonList>
<f:TextBox runat="server" Label="编号" ID="txtManageRuleCode" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="名称" ID="txtManageRuleName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="分类" ID="txtManageRuleTypeName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" Text="查询"
OnClick="TextBox_TextChanged" runat="server">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfManageRuleCode" Width="80px" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleCode">
<ItemTemplate>
<asp:Label ID="lblManageRuleCode" runat="server" Text='<%# Bind("ManageRuleCode") %>'
ToolTip='<%#Bind("ManageRuleCode") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="220px" ColumnID="OldManageRuleCode" DataField="OldManageRuleCode"
SortField="OldManageRuleCode" FieldType="String" HeaderText="原编号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:TemplateField ColumnID="tfManageRuleName" Width="250px" HeaderText="文件名称" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleName">
<ItemTemplate>
<asp:Label ID="lblManageRuleName" runat="server" Text='<%# Bind("ManageRuleName") %>'
ToolTip='<%#Bind("ManageRuleName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfManageRuleTypeName" Width="150px" HeaderText="分类" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleTypeName">
<ItemTemplate>
<asp:Label ID="lblManageRuleTypeName" runat="server" Text='<%# Bind("ManageRuleTypeName") %>'
ToolTip='<%#Bind("ManageRuleTypeName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfVersionNo" Width="60px" HeaderText="版本" HeaderTextAlign="Center" TextAlign="Left"
SortField="VersionNo">
<ItemTemplate>
<asp:Label ID="lblVersionNo" runat="server" Text='<%# Bind("VersionNo") %>'
ToolTip='<%#Bind("VersionNo") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%-- <f:TemplateField ColumnID="tfRemark" Width="300px" HeaderText="摘要" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"
SortField="Remark">
<ItemTemplate>
<asp:Label ID="lblRemark" runat="server" Text='<%# Bind("ShortRemark") %>' ToolTip='<%#Bind("Remark") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<%--<f:WindowField TextAlign="Center" Width="120px" WindowID="WindowAtt" HeaderText="附件"
Text="附件上传查看" ToolTip="附件上传查看" DataIFrameUrlFields="ManagerRuleId" DataIFrameUrlFormatString="../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ActionPlanManagerRule&menuId=775EFCF4-DE5C-46E9-8EA3-B16270E2F6A6"
/>
<f:WindowField TextAlign="Center" Width="60px" WindowID="Window6" HeaderText="内容"
Text="编辑" ToolTip="编辑内容" DataIFrameUrlFields="ManagerRuleId" DataIFrameUrlFormatString="../ShowDialog/ShowSeeFile.aspx?toKeyId={0}&type=ActionPlanManageRule"
Title="编辑内容" />--%>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
<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="ManagerRuleId" DataIDField="ManagerRuleId" AllowSorting="true"
SortField="CompileDate" SortDirection="ASC" EnableColumnLines="true" OnSort="Grid1_Sort" ForceFit="true"
AllowPaging="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:RadioButtonList runat="server" ID="rblType" ShowRedStar="true" AutoPostBack="true" Width="210px" OnSelectedIndexChanged="rblType_SelectedIndexChanged">
<f:RadioItem Text="集团" Value="集团" Selected="true" />
<f:RadioItem Text="公司" Value="公司" />
<f:RadioItem Text="项目" Value="项目" />
</f:RadioButtonList>
<f:TextBox runat="server" Label="编号" ID="txtManageRuleCode" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="名称" ID="txtManageRuleName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="分类" ID="txtManageRuleTypeName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" Text="查询"
OnClick="TextBox_TextChanged" runat="server">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfManageRuleCode" Width="80px" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleCode">
<ItemTemplate>
<asp:Label ID="lblManageRuleCode" runat="server" Text='<%# Bind("ManageRuleCode") %>'
ToolTip='<%#Bind("ManageRuleCode") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="220px" ColumnID="OldManageRuleCode" DataField="OldManageRuleCode"
SortField="OldManageRuleCode" FieldType="String" HeaderText="原编号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:TemplateField ColumnID="tfManageRuleName" Width="250px" HeaderText="文件名称" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleName">
<ItemTemplate>
<asp:Label ID="lblManageRuleName" runat="server" Text='<%# Bind("ManageRuleName") %>'
ToolTip='<%#Bind("ManageRuleName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfManageRuleTypeName" Width="150px" HeaderText="分类" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleTypeName">
<ItemTemplate>
<asp:Label ID="lblManageRuleTypeName" runat="server" Text='<%# Bind("ManageRuleTypeName") %>'
ToolTip='<%#Bind("ManageRuleTypeName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfVersionNo" Width="60px" HeaderText="版本" HeaderTextAlign="Center" TextAlign="Left"
SortField="VersionNo">
<ItemTemplate>
<asp:Label ID="lblVersionNo" runat="server" Text='<%# Bind("VersionNo") %>'
ToolTip='<%#Bind("VersionNo") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%-- <f:TemplateField ColumnID="tfRemark" Width="300px" HeaderText="摘要" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"
SortField="Remark">
<ItemTemplate>
<asp:Label ID="lblRemark" runat="server" Text='<%# Bind("ShortRemark") %>' ToolTip='<%#Bind("Remark") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<%--<f:WindowField TextAlign="Center" Width="120px" WindowID="WindowAtt" HeaderText="附件"
Text="附件上传查看" ToolTip="附件上传查看" DataIFrameUrlFields="ManagerRuleId" DataIFrameUrlFormatString="../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ActionPlanManagerRule&menuId=775EFCF4-DE5C-46E9-8EA3-B16270E2F6A6"
/>
<f:WindowField TextAlign="Center" Width="60px" WindowID="Window6" HeaderText="内容"
Text="编辑" ToolTip="编辑内容" DataIFrameUrlFields="ManagerRuleId" DataIFrameUrlFormatString="../ShowDialog/ShowSeeFile.aspx?toKeyId={0}&type=ActionPlanManageRule"
Title="编辑内容" />--%>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="编辑内容" Hidden="true" EnableIFrame="true" EnableMaximize="true"
@@ -13,6 +13,20 @@ namespace FineUIPro.Web.HSSE.ActionPlan
{
#region 定义项
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 管理规定发布主键
/// </summary>
public string ManagerRuleId
@@ -51,7 +65,20 @@ namespace FineUIPro.Web.HSSE.ActionPlan
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;行数据吗?", Grid1.GetSelectedCountReference());
@@ -61,12 +88,31 @@ namespace FineUIPro.Web.HSSE.ActionPlan
BindGrid();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.BindGrid();
this.GetButtonPower();
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
//{
// btnNew.Hidden = true;
//}
}
/// <summary>
/// 加载数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = string.Empty;
if (this.rblType.SelectedValue == "集团")
{
@@ -98,7 +144,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
}
else
{
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
}
if (!string.IsNullOrEmpty(this.txtManageRuleCode.Text.Trim()))
@@ -341,7 +387,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ActionPlan_ManagerRuleListMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ActionPlan_ManagerRuleListMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnDelete))
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.ActionPlan {
public partial class ManagerRuleList {
namespace FineUIPro.Web.HSSE.ActionPlan
{
public partial class ManagerRuleList
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,43 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </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>
@@ -47,7 +85,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -56,7 +94,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// rblType 控件。
/// </summary>
@@ -65,7 +103,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblType;
/// <summary>
/// txtManageRuleCode 控件。
/// </summary>
@@ -74,7 +112,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleCode;
/// <summary>
/// txtManageRuleName 控件。
/// </summary>
@@ -83,7 +121,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleName;
/// <summary>
/// txtManageRuleTypeName 控件。
/// </summary>
@@ -92,7 +130,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleTypeName;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -101,7 +139,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnQuery 控件。
/// </summary>
@@ -110,7 +148,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -119,7 +157,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// lblManageRuleCode 控件。
/// </summary>
@@ -128,7 +166,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblManageRuleCode;
/// <summary>
/// lblManageRuleName 控件。
/// </summary>
@@ -137,7 +175,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblManageRuleName;
/// <summary>
/// lblManageRuleTypeName 控件。
/// </summary>
@@ -146,7 +184,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblManageRuleTypeName;
/// <summary>
/// lblVersionNo 控件。
/// </summary>
@@ -155,7 +193,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblVersionNo;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -164,7 +202,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -173,7 +211,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -182,7 +220,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -191,7 +229,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -200,7 +238,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -1,5 +1,8 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectManageRule.aspx.cs" Inherits="FineUIPro.Web.HSSE.ActionPlan.ProjectManageRule" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -10,81 +13,95 @@
<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" Height="550px ">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="公司安全管理制度发布" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ManagerRuleId" DataIDField="ManagerRuleId" AllowSorting="true" SortField="IssueDate,CompileDate" SortDirection="DESC" EnableColumnLines="true"
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true"
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:CheckBoxList runat="server" ID="cbIssue" ShowLabel="false" Width="150px" LabelAlign="Right">
<f:CheckItem Text="未发布" Value="0" Selected="true" />
<f:CheckItem Text="已发布" Value="1" />
</f:CheckBoxList>
<f:TextBox runat="server" Label="编号" ID="txtManageRuleCode" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="名称" ID="txtManageRuleName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="分类" ID="txtManageRuleTypeName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" OnClick="TextBox_TextChanged" Text="查询" runat="server">
</f:Button>
<f:Button ID="btnCompile" ToolTip="新增" Icon="Add" Hidden="true" runat="server" OnClick="btnCompile_Click" Text="新增">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RenderField Width="80px" ColumnID="ManageRuleCode" DataField="ManageRuleCode"
SortField="ManageRuleCode" FieldType="String" HeaderText="文件编号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:TemplateField ColumnID="tfManageRuleName" Width="250px" HeaderText="文件名称" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleName">
<ItemTemplate>
<asp:Label ID="lblManageRuleName" runat="server" Text='<%# Bind("ManageRuleName") %>'
ToolTip='<%#Bind("ManageRuleName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="160px" ColumnID="ManageRuleTypeName" DataField="ManageRuleTypeName"
SortField="ManageRuleTypeName" FieldType="String" HeaderText="分类" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="IssueDate" DataField="IssueDate" SortField="IssueDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发布时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
<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="ManagerRuleId" DataIDField="ManagerRuleId" AllowSorting="true" SortField="IssueDate,CompileDate" SortDirection="DESC" EnableColumnLines="true"
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true"
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:CheckBoxList runat="server" ID="cbIssue" ShowLabel="false" Width="150px" LabelAlign="Right">
<f:CheckItem Text="未发布" Value="0" Selected="true" />
<f:CheckItem Text="已发布" Value="1" />
</f:CheckBoxList>
<f:TextBox runat="server" Label="编号" ID="txtManageRuleCode" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="名称" ID="txtManageRuleName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:TextBox runat="server" Label="分类" ID="txtManageRuleTypeName" EmptyText="输入查询条件"
Width="210px" LabelWidth="60px"
LabelAlign="right">
</f:TextBox>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" OnClick="TextBox_TextChanged" Text="查询" runat="server">
</f:Button>
<f:Button ID="btnCompile" ToolTip="新增" Icon="Add" Hidden="true" runat="server" OnClick="btnCompile_Click" Text="新增">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RenderField Width="80px" ColumnID="ManageRuleCode" DataField="ManageRuleCode"
SortField="ManageRuleCode" FieldType="String" HeaderText="文件编号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:TemplateField ColumnID="tfManageRuleName" Width="250px" HeaderText="文件名称" HeaderTextAlign="Center" TextAlign="Left"
SortField="ManageRuleName">
<ItemTemplate>
<asp:Label ID="lblManageRuleName" runat="server" Text='<%# Bind("ManageRuleName") %>'
ToolTip='<%#Bind("ManageRuleName") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="160px" ColumnID="ManageRuleTypeName" DataField="ManageRuleTypeName"
SortField="ManageRuleTypeName" FieldType="String" HeaderText="分类" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="IssueDate" DataField="IssueDate" SortField="IssueDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发布时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="管理规定选择" Hidden="true" EnableIFrame="true" EnableMaximize="true"
@@ -14,6 +14,21 @@ namespace FineUIPro.Web.HSSE.ActionPlan
{
public partial class ProjectManageRule : PageBase
{
#region 项目主键
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 页面
/// </summary>
@@ -28,6 +43,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
ViewState["PageSize"] = value;
}
}
#endregion
#region 加载页面
/// <summary>
/// 加载页面
@@ -39,19 +55,52 @@ namespace FineUIPro.Web.HSSE.ActionPlan
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
this.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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;行数据吗?", Grid1.GetSelectedCountReference());
// 绑定表格
BindGrid();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.BindGrid();
this.GetButtonPower();
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
//{
// btnNew.Hidden = true;
//}
}
/// <summary>
/// 加载数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT ManagerRule.ManagerRuleId,ManagerRule.ProjectId,ManageRuleCode,
ManagerRule.ManageRuleName,
ManagerRule.VersionNo,
@@ -81,7 +130,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
}
else
{
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
}
if (!string.IsNullOrEmpty(this.txtManageRuleCode.Text.Trim()))
{
@@ -365,7 +414,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ActionPlan_ProjectManagerRuleMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ActionPlan_ProjectManagerRuleMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.ActionPlan {
public partial class ProjectManageRule {
namespace FineUIPro.Web.HSSE.ActionPlan
{
public partial class ProjectManageRule
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,43 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </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>
@@ -47,7 +85,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -56,7 +94,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// cbIssue 控件。
/// </summary>
@@ -65,7 +103,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList cbIssue;
/// <summary>
/// txtManageRuleCode 控件。
/// </summary>
@@ -74,7 +112,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleCode;
/// <summary>
/// txtManageRuleName 控件。
/// </summary>
@@ -83,7 +121,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleName;
/// <summary>
/// txtManageRuleTypeName 控件。
/// </summary>
@@ -92,7 +130,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtManageRuleTypeName;
/// <summary>
/// btnQuery 控件。
/// </summary>
@@ -101,7 +139,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnCompile 控件。
/// </summary>
@@ -110,7 +148,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnCompile;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -119,7 +157,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// lblManageRuleName 控件。
/// </summary>
@@ -128,7 +166,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblManageRuleName;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -137,7 +175,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -146,7 +184,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -155,7 +193,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -164,7 +202,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
@@ -173,7 +211,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -182,7 +220,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
@@ -191,7 +229,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuIssuance 控件。
/// </summary>
@@ -200,7 +238,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuIssuance;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>